Mercurial > hg > orthanc
annotate OrthancCppClient/Series.h @ 851:e30d22020e35 jpeg
notes
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 06 Jun 2014 09:59:40 +0200 |
parents | 2d0a347e8cfc |
children | de18e90d5507 |
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 |
689 | 3 * Copyright (C) 2012-2014 Medical Physics Department, CHU of Liege, |
479
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 "Instance.h" |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
36 |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
37 #include "../Core/MultiThreading/ArrayFilledByThreads.h" |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
38 #include "../Core/MultiThreading/ThreadedCommandProcessor.h" |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
39 |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
40 namespace OrthancClient |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
41 { |
593
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
42 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
43 * {summary}{Connection to a series stored in %Orthanc.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
44 * {description}{This class encapsulates a connection to a series |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
45 * from a remote instance of %Orthanc.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
46 **/ |
496
7f7a2d174acb
preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
480
diff
changeset
|
47 class LAAW_API Series : |
480
482cde3f3c14
sample of c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
479
diff
changeset
|
48 public Orthanc::IDynamicObject, |
482cde3f3c14
sample of c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
479
diff
changeset
|
49 private Orthanc::ArrayFilledByThreads::IFiller |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
50 { |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
51 private: |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
52 enum Status3DImage |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
53 { |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
54 Status3DImage_NotTested, |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
55 Status3DImage_True, |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
56 Status3DImage_False |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
57 }; |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
58 |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
59 const OrthancConnection& connection_; |
500 | 60 std::string id_, url_; |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
61 Json::Value series_; |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
62 Orthanc::ArrayFilledByThreads instances_; |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
63 Status3DImage status_; |
502
ee33c7d0cda0
laaw runs correctly on the c++ api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
500
diff
changeset
|
64 |
ee33c7d0cda0
laaw runs correctly on the c++ api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
500
diff
changeset
|
65 bool isVoxelSizeRead_; |
ee33c7d0cda0
laaw runs correctly on the c++ api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
500
diff
changeset
|
66 float voxelSizeX_; |
ee33c7d0cda0
laaw runs correctly on the c++ api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
500
diff
changeset
|
67 float voxelSizeY_; |
ee33c7d0cda0
laaw runs correctly on the c++ api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
500
diff
changeset
|
68 float voxelSizeZ_; |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
69 |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
70 void Check3DImage(); |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
71 |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
72 bool Is3DImageInternal(); |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
73 |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
74 void ReadSeries(); |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
75 |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
76 virtual size_t GetFillerSize() |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
77 { |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
78 return series_["Instances"].size(); |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
79 } |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
80 |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
81 virtual Orthanc::IDynamicObject* GetFillerItem(size_t index); |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
82 |
548 | 83 void Load3DImageInternal(void* target, |
84 Orthanc::PixelFormat format, | |
85 size_t lineStride, | |
86 size_t stackStride, | |
87 Orthanc::ThreadedCommandProcessor::IListener* listener); | |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
88 |
502
ee33c7d0cda0
laaw runs correctly on the c++ api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
500
diff
changeset
|
89 void LoadVoxelSize(); |
ee33c7d0cda0
laaw runs correctly on the c++ api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
500
diff
changeset
|
90 |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
91 public: |
593
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
92 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
93 * {summary}{Create a connection to some series.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
94 * {param}{connection The remote instance of %Orthanc.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
95 * {param}{id The %Orthanc identifier of the series.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
96 **/ |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
97 Series(const OrthancConnection& connection, |
496
7f7a2d174acb
preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
480
diff
changeset
|
98 const char* id); |
479
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:
585
diff
changeset
|
100 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
101 * {summary}{Reload the instances of this series.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
102 * {description}{This method will reload the list of the instances of this series. Pay attention to the fact that the instances that have been previously returned by GetInstance() will be invalidated.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
103 **/ |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
104 void Reload() |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
105 { |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
106 instances_.Reload(); |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
107 } |
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:
585
diff
changeset
|
109 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
110 * {summary}{Return the number of instances for this series.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
111 * {returns}{The number of instances.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
112 **/ |
496
7f7a2d174acb
preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
480
diff
changeset
|
113 uint32_t GetInstanceCount(); |
506
6e4bd06c17c5
the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
502
diff
changeset
|
114 |
593
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
115 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
116 * {summary}{Get some instance of this series.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
117 * {description}{This method will return an object that contains information about some instance. The instances are indexed by a number between 0 (inclusive) and the result of GetInstanceCount() (exclusive).} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
118 * {param}{index The index of the instance of interest.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
119 * {returns}{The instance.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
120 **/ |
496
7f7a2d174acb
preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
480
diff
changeset
|
121 Instance& GetInstance(uint32_t index); |
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:
585
diff
changeset
|
123 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
124 * {summary}{Get the %Orthanc identifier of this series.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
125 * {returns}{The identifier.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
126 **/ |
496
7f7a2d174acb
preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
480
diff
changeset
|
127 const char* GetId() const |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
128 { |
496
7f7a2d174acb
preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
480
diff
changeset
|
129 return id_.c_str(); |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
130 } |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
131 |
593
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
132 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
133 * {summary}{Returns the URL to this series.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
134 * {returns}{The URL.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
135 **/ |
500 | 136 const char* GetUrl() const |
137 { | |
138 return url_.c_str(); | |
139 } | |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
140 |
593
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
141 |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
142 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
143 * {summary}{Get the value of one of the main DICOM tags for this series.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
144 * {param}{tag The name of the tag of interest ("Modality", "Manufacturer", "SeriesDate", "SeriesDescription", "SeriesInstanceUID"...).} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
145 * {param}{defaultValue The default value to be returned if this tag does not exist.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
146 * {returns}{The value of the tag.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
147 **/ |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
148 const char* GetMainDicomTag(const char* tag, |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
149 const char* defaultValue) const; |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
150 |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
151 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
152 * {summary}{Test whether this series encodes a 3D image that can be downloaded from %Orthanc.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
153 * {returns}{"true" if and only if this is a 3D image.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
154 **/ |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
155 bool Is3DImage(); |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
156 |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
157 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
158 * {summary}{Get the width of the 3D image.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
159 * {description}{Get the width of the 3D image (i.e. along the X-axis). This call is only valid if this series corresponds to a 3D image.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
160 * {returns}{The width.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
161 **/ |
496
7f7a2d174acb
preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
480
diff
changeset
|
162 uint32_t GetWidth(); |
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:
585
diff
changeset
|
164 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
165 * {summary}{Get the height of the 3D image.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
166 * {description}{Get the height of the 3D image (i.e. along the Y-axis). This call is only valid if this series corresponds to a 3D image.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
167 * {returns}{The height.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
168 **/ |
496
7f7a2d174acb
preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
480
diff
changeset
|
169 uint32_t GetHeight(); |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
170 |
593
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
171 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
172 * {summary}{Get the physical size of a voxel along the X-axis.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
173 * {description}{Get the physical size of a voxel along the X-axis. This call is only valid if this series corresponds to a 3D image.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
174 * {returns}{The voxel size.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
175 **/ |
502
ee33c7d0cda0
laaw runs correctly on the c++ api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
500
diff
changeset
|
176 float GetVoxelSizeX(); |
ee33c7d0cda0
laaw runs correctly on the c++ api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
500
diff
changeset
|
177 |
593
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
178 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
179 * {summary}{Get the physical size of a voxel along the Y-axis.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
180 * {description}{Get the physical size of a voxel along the Y-axis. This call is only valid if this series corresponds to a 3D image.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
181 * {returns}{The voxel size.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
182 **/ |
502
ee33c7d0cda0
laaw runs correctly on the c++ api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
500
diff
changeset
|
183 float GetVoxelSizeY(); |
ee33c7d0cda0
laaw runs correctly on the c++ api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
500
diff
changeset
|
184 |
593
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
185 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
186 * {summary}{Get the physical size of a voxel along the Z-axis.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
187 * {description}{Get the physical size of a voxel along the Z-axis. This call is only valid if this series corresponds to a 3D image.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
188 * {returns}{The voxel size.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
189 **/ |
502
ee33c7d0cda0
laaw runs correctly on the c++ api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
500
diff
changeset
|
190 float GetVoxelSizeZ(); |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
191 |
496
7f7a2d174acb
preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
480
diff
changeset
|
192 LAAW_API_INTERNAL void Load3DImage(void* target, |
7f7a2d174acb
preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
480
diff
changeset
|
193 Orthanc::PixelFormat format, |
7f7a2d174acb
preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
480
diff
changeset
|
194 int64_t lineStride, |
7f7a2d174acb
preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
480
diff
changeset
|
195 int64_t stackStride, |
7f7a2d174acb
preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
480
diff
changeset
|
196 Orthanc::ThreadedCommandProcessor::IListener& listener) |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
197 { |
585 | 198 Load3DImageInternal(target, format, static_cast<size_t>(lineStride), |
199 static_cast<size_t>(stackStride), &listener); | |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
200 } |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
201 |
593
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
202 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
203 * {summary}{Load the 3D image into a memory buffer.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
204 * {description}{Load the 3D image into a memory buffer. This call is only valid if this series corresponds to a 3D image. The "target" buffer must be wide enough to store all the voxels of the image.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
205 * {param}{target The target memory buffer.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
206 * {param}{format The memory layout of the voxels.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
207 * {param}{lineStride The number of bytes between two lines in the target memory buffer.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
208 * {param}{stackStride The number of bytes between two 2D slices in the target memory buffer.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
209 **/ |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
210 void Load3DImage(void* target, |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
211 Orthanc::PixelFormat format, |
496
7f7a2d174acb
preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
480
diff
changeset
|
212 int64_t lineStride, |
7f7a2d174acb
preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
480
diff
changeset
|
213 int64_t stackStride) |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
214 { |
585 | 215 Load3DImageInternal(target, format, static_cast<size_t>(lineStride), |
216 static_cast<size_t>(stackStride), NULL); | |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
217 } |
548 | 218 |
593
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
219 /** |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
220 * {summary}{Load the 3D image into a memory buffer.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
221 * {description}{Load the 3D image into a memory buffer. This call is only valid if this series corresponds to a 3D image. The "target" buffer must be wide enough to store all the voxels of the image. This method will also update a progress indicator to monitor the loading of the image.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
222 * {param}{target The target memory buffer.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
223 * {param}{format The memory layout of the voxels.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
224 * {param}{lineStride The number of bytes between two lines in the target memory buffer.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
225 * {param}{stackStride The number of bytes between two 2D slices in the target memory buffer.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
226 * {param}{progress A pointer to a floating-point number that is continuously updated by the download threads to reflect the percentage of completion (between 0 and 1). This value can be read from a separate thread.} |
9d2592c08919
documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
227 **/ |
548 | 228 void Load3DImage(void* target, |
229 Orthanc::PixelFormat format, | |
230 int64_t lineStride, | |
231 int64_t stackStride, | |
232 float* progress); | |
479
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
233 }; |
0cd977e94479
initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
234 } |