Mercurial > hg > orthanc
annotate OrthancCppClient/Instance.h @ 659:443cced10836
code cleaning
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 04 Nov 2013 14:41:46 +0100 |
parents | 9d2592c08919 |
children | 2d0a347e8cfc |
rev | line source |
---|---|
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1 /** |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
2 * Orthanc - A Lightweight, RESTful DICOM Store |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
3 * Copyright (C) 2012-2013 Medical Physics Department, CHU of Liege, |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
4 * Belgium |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
5 * |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
6 * This program is free software: you can redistribute it and/or |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
7 * modify it under the terms of the GNU General Public License as |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
8 * published by the Free Software Foundation, either version 3 of the |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
9 * License, or (at your option) any later version. |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
10 * |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
11 * In addition, as a special exception, the copyright holders of this |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
12 * program give permission to link the code of its release with the |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
13 * OpenSSL project's "OpenSSL" library (or with modified versions of it |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
14 * that use the same license as the "OpenSSL" library), and distribute |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
15 * the linked executables. You must obey the GNU General Public License |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
16 * in all respects for all of the code used other than "OpenSSL". If you |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
17 * modify file(s) with this exception, you may extend this exception to |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
18 * your version of the file(s), but you are not obligated to do so. If |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
19 * you do not wish to do so, delete this exception statement from your |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
20 * version. If you delete this exception statement from all source files |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
21 * in the program, then also delete it here. |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
22 * |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
23 * This program is distributed in the hope that it will be useful, but |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
24 * WITHOUT ANY WARRANTY; without even the implied warranty of |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
26 * General Public License for more details. |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
27 * |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
28 * You should have received a copy of the GNU General Public License |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
29 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
30 **/ |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
31 |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
32 |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
33 #pragma once |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
34 |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
35 #include <string> |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
36 #include <json/value.h> |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
37 |
504 | 38 #include "OrthancClientException.h" |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
39 #include "../Core/IDynamicObject.h" |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
40 #include "../Core/FileFormats/PngReader.h" |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
41 |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
42 namespace OrthancClient |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
43 { |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
44 class OrthancConnection; |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
45 |
593
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
46 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
47 * {summary}{Connection to an instance stored in %Orthanc.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
48 * {description}{This class encapsulates a connection to an image instance |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
49 * from a remote instance of %Orthanc.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
50 **/ |
496
7f7a2d174acb
preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
480
diff
changeset
|
51 class LAAW_API Instance : public Orthanc::IDynamicObject |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
52 { |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
53 private: |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
54 const OrthancConnection& connection_; |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
55 std::string id_; |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
56 Json::Value tags_; |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
57 std::auto_ptr<Orthanc::PngReader> reader_; |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
58 Orthanc::ImageExtractionMode mode_; |
540 | 59 std::auto_ptr<std::string> dicom_; |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
60 |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
61 void DownloadImage(); |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
62 |
540 | 63 void DownloadDicom(); |
64 | |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
65 public: |
593
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
66 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
67 * {summary}{Create a connection to some image instance.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
68 * {param}{connection The remote instance of %Orthanc.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
69 * {param}{id The %Orthanc identifier of the image instance.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
70 **/ |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
71 Instance(const OrthancConnection& connection, |
496
7f7a2d174acb
preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
480
diff
changeset
|
72 const char* id); |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
73 |
593
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
74 |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
75 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
76 * {summary}{Get the %Orthanc identifier of this identifier.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
77 * {returns}{The identifier.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
78 **/ |
496
7f7a2d174acb
preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
480
diff
changeset
|
79 const char* GetId() const |
480
482cde3f3c14
sample of c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
479
diff
changeset
|
80 { |
496
7f7a2d174acb
preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
480
diff
changeset
|
81 return id_.c_str(); |
480
482cde3f3c14
sample of c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
479
diff
changeset
|
82 } |
482cde3f3c14
sample of c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
479
diff
changeset
|
83 |
593
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
84 |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
85 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
86 * {summary}{Set the extraction mode for the 2D image corresponding to this instance.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
87 * {param}{mode The extraction mode.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
88 **/ |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
89 void SetImageExtractionMode(Orthanc::ImageExtractionMode mode); |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
90 |
593
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
91 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
92 * {summary}{Get the extraction mode for the 2D image corresponding to this instance.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
93 * {returns}{The extraction mode.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
94 **/ |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
95 Orthanc::ImageExtractionMode GetImageExtractionMode() const |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
96 { |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
97 return mode_; |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
98 } |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
99 |
593
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
100 |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
101 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
102 * {summary}{Get the string value of some DICOM tag of this instance.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
103 * {param}{tag The name of the tag of interest.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
104 * {returns}{The value of the tag.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
105 **/ |
500 | 106 const char* GetTagAsString(const char* tag) const; |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
107 |
593
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
108 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
109 * {summary}{Get the floating point value that is stored in some DICOM tag of this instance.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
110 * {param}{tag The name of the tag of interest.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
111 * {returns}{The value of the tag.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
112 **/ |
500 | 113 float GetTagAsFloat(const char* tag) const; |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
114 |
593
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
115 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
116 * {summary}{Get the integer value that is stored in some DICOM tag of this instance.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
117 * {param}{tag The name of the tag of interest.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
118 * {returns}{The value of the tag.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
119 **/ |
500 | 120 int32_t GetTagAsInt(const char* tag) const; |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
121 |
593
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
122 |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
123 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
124 * {summary}{Get the width of the 2D image.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
125 * {description}{Get the width of the 2D image that is encoded by this DICOM instance.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
126 * {returns}{The width.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
127 **/ |
496
7f7a2d174acb
preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
480
diff
changeset
|
128 uint32_t GetWidth(); |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
129 |
593
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
130 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
131 * {summary}{Get the height of the 2D image.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
132 * {description}{Get the height of the 2D image that is encoded by this DICOM instance.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
133 * {returns}{The height.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
134 **/ |
496
7f7a2d174acb
preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
480
diff
changeset
|
135 uint32_t GetHeight(); |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
136 |
593
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
137 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
138 * {summary}{Get the number of bytes between two lines of the image (pitch).} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
139 * {description}{Get the number of bytes between two lines of the image in the memory buffer returned by GetBuffer(). This value depends on the extraction mode for the image.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
140 * {returns}{The pitch.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
141 **/ |
496
7f7a2d174acb
preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
480
diff
changeset
|
142 uint32_t GetPitch(); |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
143 |
593
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
144 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
145 * {summary}{Get the format of the pixels of the 2D image.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
146 * {description}{Return the memory layout that is used for the 2D image that is encoded by this DICOM instance. This value depends on the extraction mode for the image.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
147 * {returns}{The pixel format.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
148 **/ |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
149 Orthanc::PixelFormat GetPixelFormat(); |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
150 |
593
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
151 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
152 * {summary}{Access the memory buffer in which the raw pixels of the 2D image are stored.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
153 * {returns}{A pointer to the memory buffer.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
154 **/ |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
155 const void* GetBuffer(); |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
156 |
593
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
157 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
158 * {summary}{Access the memory buffer in which the raw pixels of some line of the 2D image are stored.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
159 * {param}{y The line of interest.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
160 * {returns}{A pointer to the memory buffer.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
161 **/ |
496
7f7a2d174acb
preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
480
diff
changeset
|
162 const void* GetBuffer(uint32_t y); |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
163 |
593
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
164 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
165 * {summary}{Get the size of the DICOM file corresponding to this instance.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
166 * {returns}{The file size.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
167 **/ |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
168 const uint64_t GetDicomSize(); |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
169 |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
170 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
171 * {summary}{Get a pointer to the content of the DICOM file corresponding to this instance.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
172 * {returns}{The DICOM file.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
173 **/ |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
174 const void* GetDicom(); |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
175 |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
176 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
177 * {summary}{Discard the downloaded 2D image, so as to make room in memory.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
178 **/ |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
179 void DiscardImage(); |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
180 |
593
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
181 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
182 * {summary}{Discard the downloaded DICOM file, so as to make room in memory.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
183 **/ |
540 | 184 void DiscardDicom(); |
185 | |
496
7f7a2d174acb
preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
480
diff
changeset
|
186 LAAW_API_INTERNAL void SplitVectorOfFloats(std::vector<float>& target, |
7f7a2d174acb
preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
480
diff
changeset
|
187 const char* tag); |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
188 }; |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
189 } |