annotate OrthancCppClient/Series.h @ 1361:94ffb597d297

refactoring of C-Find SCP
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 15 May 2015 17:19:33 +0200
parents 6e7e5ed91c2d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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: 986
diff changeset
3 * Copyright (C) 2012-2015 Sebastien Jodogne, Medical Physics
6e7e5ed91c2d upgrade to year 2015
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 986
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 "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
ec19da4a1fe7 fix api
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 496
diff changeset
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 float voxelSizeX_;
ee33c7d0cda0 laaw runs correctly on the c++ api
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 500
diff changeset
66 float voxelSizeY_;
ee33c7d0cda0 laaw runs correctly on the c++ api
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 500
diff changeset
67 float voxelSizeZ_;
986
de18e90d5507 fix GetVoxelSizeZ
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 689
diff changeset
68 float sliceThickness_;
de18e90d5507 fix GetVoxelSizeZ
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 689
diff changeset
69
479
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
ffedcc8f0938 progress
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 506
diff changeset
83 void Load3DImageInternal(void* target,
ffedcc8f0938 progress
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 506
diff changeset
84 Orthanc::PixelFormat format,
ffedcc8f0938 progress
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 506
diff changeset
85 size_t lineStride,
ffedcc8f0938 progress
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 506
diff changeset
86 size_t stackStride,
ffedcc8f0938 progress
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 506
diff changeset
87 Orthanc::ThreadedCommandProcessor::IListener* listener);
479
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89 public:
593
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
90 /**
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
91 * {summary}{Create a connection to some series.}
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
92 * {param}{connection The remote instance of %Orthanc.}
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
93 * {param}{id The %Orthanc identifier of the series.}
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
94 **/
479
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
95 Series(const OrthancConnection& connection,
496
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 480
diff changeset
96 const char* id);
479
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
97
593
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
98 /**
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
99 * {summary}{Reload the instances of this series.}
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
100 * {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
101 **/
479
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
102 void Reload()
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
103 {
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
104 instances_.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
593
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
107 /**
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
108 * {summary}{Return the number of instances for this series.}
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
109 * {returns}{The number of instances.}
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
110 **/
496
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 480
diff changeset
111 uint32_t GetInstanceCount();
506
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 502
diff changeset
112
593
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
113 /**
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
114 * {summary}{Get some instance of this series.}
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
115 * {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
116 * {param}{index The index of the instance of interest.}
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
117 * {returns}{The instance.}
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
118 **/
496
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 480
diff changeset
119 Instance& GetInstance(uint32_t index);
479
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
120
593
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
121 /**
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
122 * {summary}{Get the %Orthanc identifier of this series.}
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
123 * {returns}{The identifier.}
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
124 **/
496
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 480
diff changeset
125 const char* GetId() const
479
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
126 {
496
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 480
diff changeset
127 return id_.c_str();
479
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
128 }
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: 585
diff changeset
130 /**
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
131 * {summary}{Returns the URL to this series.}
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
132 * {returns}{The URL.}
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
133 **/
500
ec19da4a1fe7 fix api
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 496
diff changeset
134 const char* GetUrl() const
ec19da4a1fe7 fix api
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 496
diff changeset
135 {
ec19da4a1fe7 fix api
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 496
diff changeset
136 return url_.c_str();
ec19da4a1fe7 fix api
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 496
diff changeset
137 }
479
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
138
593
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
139
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
140 /**
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
141 * {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
142 * {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
143 * {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
144 * {returns}{The value of the tag.}
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
145 **/
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
146 const char* GetMainDicomTag(const char* tag,
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
147 const char* defaultValue) const;
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
148
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
149 /**
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
150 * {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
151 * {returns}{"true" if and only if this is a 3D image.}
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
152 **/
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
153 bool Is3DImage();
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 /**
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
156 * {summary}{Get the width of the 3D image.}
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
157 * {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
158 * {returns}{The width.}
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
159 **/
496
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 480
diff changeset
160 uint32_t GetWidth();
479
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
161
593
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
162 /**
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
163 * {summary}{Get the height of the 3D image.}
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
164 * {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
165 * {returns}{The height.}
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
166 **/
496
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 480
diff changeset
167 uint32_t GetHeight();
479
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
168
593
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
169 /**
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
170 * {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
171 * {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
172 * {returns}{The voxel size.}
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
173 **/
502
ee33c7d0cda0 laaw runs correctly on the c++ api
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 500
diff changeset
174 float GetVoxelSizeX();
ee33c7d0cda0 laaw runs correctly on the c++ api
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 500
diff changeset
175
593
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
176 /**
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
177 * {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
178 * {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
179 * {returns}{The voxel size.}
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
180 **/
502
ee33c7d0cda0 laaw runs correctly on the c++ api
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 500
diff changeset
181 float GetVoxelSizeY();
ee33c7d0cda0 laaw runs correctly on the c++ api
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 500
diff changeset
182
593
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
183 /**
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
184 * {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
185 * {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
186 * {returns}{The voxel size.}
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
187 **/
502
ee33c7d0cda0 laaw runs correctly on the c++ api
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 500
diff changeset
188 float GetVoxelSizeZ();
479
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
189
986
de18e90d5507 fix GetVoxelSizeZ
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 689
diff changeset
190 /**
de18e90d5507 fix GetVoxelSizeZ
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 689
diff changeset
191 * {summary}{Get the slice thickness.}
de18e90d5507 fix GetVoxelSizeZ
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 689
diff changeset
192 * {description}{Get the slice thickness. This call is only valid if this series corresponds to a 3D image.}
de18e90d5507 fix GetVoxelSizeZ
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 689
diff changeset
193 * {returns}{The slice thickness.}
de18e90d5507 fix GetVoxelSizeZ
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 689
diff changeset
194 **/
de18e90d5507 fix GetVoxelSizeZ
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 689
diff changeset
195 float GetSliceThickness();
de18e90d5507 fix GetVoxelSizeZ
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 689
diff changeset
196
496
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 480
diff changeset
197 LAAW_API_INTERNAL void Load3DImage(void* target,
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 480
diff changeset
198 Orthanc::PixelFormat format,
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 480
diff changeset
199 int64_t lineStride,
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 480
diff changeset
200 int64_t stackStride,
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 480
diff changeset
201 Orthanc::ThreadedCommandProcessor::IListener& listener)
479
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
202 {
585
b2357f1f026f fix types
jodogne
parents: 548
diff changeset
203 Load3DImageInternal(target, format, static_cast<size_t>(lineStride),
b2357f1f026f fix types
jodogne
parents: 548
diff changeset
204 static_cast<size_t>(stackStride), &listener);
479
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
205 }
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
206
593
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
207 /**
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
208 * {summary}{Load the 3D image into a memory buffer.}
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
209 * {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
210 * {param}{target The target memory buffer.}
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
211 * {param}{format The memory layout of the voxels.}
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
212 * {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
213 * {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
214 **/
479
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
215 void Load3DImage(void* target,
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
216 Orthanc::PixelFormat format,
496
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 480
diff changeset
217 int64_t lineStride,
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 480
diff changeset
218 int64_t stackStride)
479
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
219 {
585
b2357f1f026f fix types
jodogne
parents: 548
diff changeset
220 Load3DImageInternal(target, format, static_cast<size_t>(lineStride),
b2357f1f026f fix types
jodogne
parents: 548
diff changeset
221 static_cast<size_t>(stackStride), NULL);
479
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
222 }
548
ffedcc8f0938 progress
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 506
diff changeset
223
593
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
224 /**
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
225 * {summary}{Load the 3D image into a memory buffer.}
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
226 * {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
227 * {param}{target The target memory buffer.}
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
228 * {param}{format The memory layout of the voxels.}
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 585
diff changeset
229 * {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
230 * {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
231 * {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
232 **/
548
ffedcc8f0938 progress
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 506
diff changeset
233 void Load3DImage(void* target,
ffedcc8f0938 progress
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 506
diff changeset
234 Orthanc::PixelFormat format,
ffedcc8f0938 progress
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 506
diff changeset
235 int64_t lineStride,
ffedcc8f0938 progress
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 506
diff changeset
236 int64_t stackStride,
ffedcc8f0938 progress
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 506
diff changeset
237 float* progress);
479
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
238 };
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
239 }