Mercurial > hg > orthanc
annotate OrthancCppClient/Instance.h @ 4686:d28eab3994f9 Orthanc-0.8.6
hotpatch to make Orthanc 0.8.6 compile on Ubuntu 18.04
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 09 Jun 2021 14:57:16 +0200 |
parents | 6e7e5ed91c2d |
children |
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 |
1288
6e7e5ed91c2d
upgrade to year 2015
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
799
diff
changeset
|
3 * Copyright (C) 2012-2015 Sebastien Jodogne, Medical Physics |
6e7e5ed91c2d
upgrade to year 2015
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
799
diff
changeset
|
4 * Department, University Hospital of Liege, Belgium |
479
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" |
799 | 40 #include "../Core/ImageFormats/PngReader.h" |
479
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_; |
728
d380222b4c2a
Load a raw tag from the DICOM file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
60 std::string content_; |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
61 |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
62 void DownloadImage(); |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
63 |
540 | 64 void DownloadDicom(); |
65 | |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
66 public: |
593
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
67 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
68 * {summary}{Create a connection to some image instance.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
69 * {param}{connection The remote instance of %Orthanc.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
70 * {param}{id The %Orthanc identifier of the image instance.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
71 **/ |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
72 Instance(const OrthancConnection& connection, |
496
7f7a2d174acb
preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
480
diff
changeset
|
73 const char* id); |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
74 |
593
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 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
77 * {summary}{Get the %Orthanc identifier of this identifier.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
78 * {returns}{The identifier.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
79 **/ |
496
7f7a2d174acb
preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
480
diff
changeset
|
80 const char* GetId() const |
480
482cde3f3c14
sample of c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
479
diff
changeset
|
81 { |
496
7f7a2d174acb
preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
480
diff
changeset
|
82 return id_.c_str(); |
480
482cde3f3c14
sample of c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
479
diff
changeset
|
83 } |
482cde3f3c14
sample of c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
479
diff
changeset
|
84 |
593
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 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
87 * {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
|
88 * {param}{mode The extraction mode.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
89 **/ |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
90 void SetImageExtractionMode(Orthanc::ImageExtractionMode mode); |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
91 |
593
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
92 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
93 * {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
|
94 * {returns}{The extraction mode.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
95 **/ |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
96 Orthanc::ImageExtractionMode GetImageExtractionMode() const |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
97 { |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
98 return mode_; |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
99 } |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
100 |
593
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 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
103 * {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
|
104 * {param}{tag The name of the tag of interest.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
105 * {returns}{The value of the tag.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
106 **/ |
500 | 107 const char* GetTagAsString(const char* tag) const; |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
108 |
593
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
109 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
110 * {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
|
111 * {param}{tag The name of the tag of interest.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
112 * {returns}{The value of the tag.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
113 **/ |
500 | 114 float GetTagAsFloat(const char* tag) const; |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
115 |
593
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
116 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
117 * {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
|
118 * {param}{tag The name of the tag of interest.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
119 * {returns}{The value of the tag.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
120 **/ |
500 | 121 int32_t GetTagAsInt(const char* tag) const; |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
122 |
593
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 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
125 * {summary}{Get the width of the 2D image.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
126 * {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
|
127 * {returns}{The width.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
128 **/ |
496
7f7a2d174acb
preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
480
diff
changeset
|
129 uint32_t GetWidth(); |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
130 |
593
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
131 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
132 * {summary}{Get the height of the 2D image.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
133 * {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
|
134 * {returns}{The height.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
135 **/ |
496
7f7a2d174acb
preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
480
diff
changeset
|
136 uint32_t GetHeight(); |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
137 |
593
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
138 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
139 * {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
|
140 * {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
|
141 * {returns}{The pitch.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
142 **/ |
496
7f7a2d174acb
preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
480
diff
changeset
|
143 uint32_t GetPitch(); |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
144 |
593
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
145 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
146 * {summary}{Get the format of the pixels of the 2D image.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
147 * {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
|
148 * {returns}{The pixel format.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
149 **/ |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
150 Orthanc::PixelFormat GetPixelFormat(); |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
151 |
593
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
152 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
153 * {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
|
154 * {returns}{A pointer to the memory buffer.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
155 **/ |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
156 const void* GetBuffer(); |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
157 |
593
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
158 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
159 * {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
|
160 * {param}{y The line of interest.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
161 * {returns}{A pointer to the memory buffer.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
162 **/ |
496
7f7a2d174acb
preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
480
diff
changeset
|
163 const void* GetBuffer(uint32_t y); |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
164 |
593
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
165 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
166 * {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
|
167 * {returns}{The file size.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
168 **/ |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
169 const uint64_t GetDicomSize(); |
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 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
172 * {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
|
173 * {returns}{The DICOM file.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
174 **/ |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
175 const void* GetDicom(); |
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 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
178 * {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
|
179 **/ |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
180 void DiscardImage(); |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
181 |
593
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
182 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
540
diff
changeset
|
183 * {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
|
184 **/ |
540 | 185 void DiscardDicom(); |
186 | |
496
7f7a2d174acb
preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
480
diff
changeset
|
187 LAAW_API_INTERNAL void SplitVectorOfFloats(std::vector<float>& target, |
7f7a2d174acb
preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
480
diff
changeset
|
188 const char* tag); |
728
d380222b4c2a
Load a raw tag from the DICOM file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
189 |
d380222b4c2a
Load a raw tag from the DICOM file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
190 /** |
d380222b4c2a
Load a raw tag from the DICOM file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
191 * {summary}{Load a raw tag from the DICOM file.} |
d380222b4c2a
Load a raw tag from the DICOM file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
192 * {param}{path The path to the tag of interest (e.g. "0020-000d").} |
d380222b4c2a
Load a raw tag from the DICOM file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
193 **/ |
d380222b4c2a
Load a raw tag from the DICOM file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
194 void LoadTagContent(const char* path); |
d380222b4c2a
Load a raw tag from the DICOM file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
195 |
d380222b4c2a
Load a raw tag from the DICOM file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
196 /** |
d380222b4c2a
Load a raw tag from the DICOM file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
197 * {summary}{Return the value of the raw tag that was loaded by LoadContent.} |
d380222b4c2a
Load a raw tag from the DICOM file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
198 * {returns}{The tag value.} |
d380222b4c2a
Load a raw tag from the DICOM file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
199 **/ |
d380222b4c2a
Load a raw tag from the DICOM file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
200 const char* GetLoadedTagContent() const; |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
201 }; |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
202 } |