annotate Framework/Toolbox/DicomInstanceParameters.h @ 1106:c7388dfcd555

Added tag toa2019102801 for changeset 640feb146fa8
author Benjamin Golinvaux <bgo@osimis.io>
date Mon, 28 Oct 2019 11:14:05 +0100
parents 5a18e6a395bc
children 7681f3943748
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
746
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 * Stone of Orthanc
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 * Department, University Hospital of Liege, Belgium
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 * Copyright (C) 2017-2019 Osimis S.A., Belgium
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 *
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 * This program is free software: you can redistribute it and/or
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * modify it under the terms of the GNU Affero General Public License
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * as published by the Free Software Foundation, either version 3 of
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 * the License, or (at your option) any later version.
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 *
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful, but
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * Affero General Public License for more details.
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 *
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 * You should have received a copy of the GNU Affero General Public License
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 **/
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 #pragma once
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 #include "../StoneEnumerations.h"
768
55411e7da2f7 LookupTableTextureSceneLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 746
diff changeset
25 #include "../Scene2D/LookupTableTextureSceneLayer.h"
746
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 #include "../Toolbox/CoordinateSystem3D.h"
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 #include <Core/IDynamicObject.h>
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 #include <Core/DicomFormat/DicomImageInformation.h>
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 namespace OrthancStone
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 {
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 class DicomInstanceParameters :
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 public Orthanc::IDynamicObject /* to be used as a payload to SlicesSorter */
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 {
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 // This class supersedes the deprecated "DicomFrameConverter"
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 private:
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 struct Data // Struct to ease the copy constructor
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 {
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 std::string orthancInstanceId_;
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 std::string studyInstanceUid_;
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 std::string seriesInstanceUid_;
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 std::string sopInstanceUid_;
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 Orthanc::DicomImageInformation imageInformation_;
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 SopClassUid sopClassUid_;
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 double thickness_;
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 double pixelSpacingX_;
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 double pixelSpacingY_;
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 CoordinateSystem3D geometry_;
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 Vector frameOffsets_;
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 bool isColor_;
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 bool hasRescale_;
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 double rescaleIntercept_;
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 double rescaleSlope_;
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 bool hasDefaultWindowing_;
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 float defaultWindowingCenter_;
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 float defaultWindowingWidth_;
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 Orthanc::PixelFormat expectedPixelFormat_;
980
8e497a4e3d96 DicomInstanceParameters::GetIndexInSeries()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 782
diff changeset
60 bool hasIndexInSeries_;
8e497a4e3d96 DicomInstanceParameters::GetIndexInSeries()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 782
diff changeset
61 unsigned int indexInSeries_;
1091
5a18e6a395bc Added DoseUnit tag retrieval to DicomInstanceParameters
Benjamin Golinvaux <bgo@osimis.io>
parents: 1016
diff changeset
62 std::string doseUnits_;
746
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 void ComputeDoseOffsets(const Orthanc::DicomMap& dicom);
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66 Data(const Orthanc::DicomMap& dicom);
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68 CoordinateSystem3D GetFrameGeometry(unsigned int frame) const;
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70 bool IsPlaneWithinSlice(unsigned int frame,
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71 const CoordinateSystem3D& plane) const;
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73 void ApplyRescale(Orthanc::ImageAccessor& image,
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74 bool useDouble) const;
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75 };
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78 Data data_;
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81 public:
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
82 DicomInstanceParameters(const DicomInstanceParameters& other) :
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83 data_(other.data_)
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
84 {
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
85 }
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
86
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87 DicomInstanceParameters(const Orthanc::DicomMap& dicom) :
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88 data_(dicom)
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89 {
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90 }
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91
782
b24c208fa953 VolumeImageReslicer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 768
diff changeset
92 DicomInstanceParameters* Clone() const
b24c208fa953 VolumeImageReslicer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 768
diff changeset
93 {
b24c208fa953 VolumeImageReslicer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 768
diff changeset
94 return new DicomInstanceParameters(*this);
b24c208fa953 VolumeImageReslicer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 768
diff changeset
95 }
b24c208fa953 VolumeImageReslicer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 768
diff changeset
96
746
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
97 void SetOrthancInstanceIdentifier(const std::string& id)
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
98 {
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
99 data_.orthancInstanceId_ = id;
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
100 }
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
101
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
102 const std::string& GetOrthancInstanceIdentifier() const
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
103 {
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
104 return data_.orthancInstanceId_;
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105 }
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
106
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
107 const Orthanc::DicomImageInformation& GetImageInformation() const
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
108 {
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
109 return data_.imageInformation_;
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
110 }
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
111
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
112 const std::string& GetStudyInstanceUid() const
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
113 {
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
114 return data_.studyInstanceUid_;
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
115 }
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
116
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
117 const std::string& GetSeriesInstanceUid() const
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
118 {
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
119 return data_.seriesInstanceUid_;
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
120 }
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
121
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
122 const std::string& GetSopInstanceUid() const
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
123 {
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
124 return data_.sopInstanceUid_;
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
125 }
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
126
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
127 SopClassUid GetSopClassUid() const
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
128 {
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
129 return data_.sopClassUid_;
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
130 }
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
131
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
132 double GetThickness() const
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
133 {
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
134 return data_.thickness_;
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
135 }
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
136
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
137 double GetPixelSpacingX() const
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
138 {
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
139 return data_.pixelSpacingX_;
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
140 }
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
141
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
142 double GetPixelSpacingY() const
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
143 {
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
144 return data_.pixelSpacingY_;
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
145 }
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
146
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
147 const CoordinateSystem3D& GetGeometry() const
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
148 {
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
149 return data_.geometry_;
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
150 }
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
151
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
152 CoordinateSystem3D GetFrameGeometry(unsigned int frame) const
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
153 {
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
154 return data_.GetFrameGeometry(frame);
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
155 }
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
156
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
157 bool IsPlaneWithinSlice(unsigned int frame,
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
158 const CoordinateSystem3D& plane) const
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
159 {
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
160 return data_.IsPlaneWithinSlice(frame, plane);
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
161 }
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
162
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
163 bool IsColor() const
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
164 {
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
165 return data_.isColor_;
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
166 }
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
167
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
168 bool HasRescale() const
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
169 {
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
170 return data_.hasRescale_;
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
171 }
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
172
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
173 double GetRescaleIntercept() const;
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
174
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
175 double GetRescaleSlope() const;
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
176
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
177 bool HasDefaultWindowing() const
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
178 {
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
179 return data_.hasDefaultWindowing_;
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
180 }
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
181
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
182 float GetDefaultWindowingCenter() const;
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
183
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
184 float GetDefaultWindowingWidth() const;
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
185
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
186 Orthanc::PixelFormat GetExpectedPixelFormat() const
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
187 {
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
188 return data_.expectedPixelFormat_;
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
189 }
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
190
1016
78a516d5ead5 making DicomInstanceParameters::ConvertToFloat() public
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 980
diff changeset
191 Orthanc::ImageAccessor* ConvertToFloat(const Orthanc::ImageAccessor& pixelData) const;
78a516d5ead5 making DicomInstanceParameters::ConvertToFloat() public
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 980
diff changeset
192
746
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
193 TextureBaseSceneLayer* CreateTexture(const Orthanc::ImageAccessor& pixelData) const;
768
55411e7da2f7 LookupTableTextureSceneLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 746
diff changeset
194
55411e7da2f7 LookupTableTextureSceneLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 746
diff changeset
195 LookupTableTextureSceneLayer* CreateLookupTableTexture(const Orthanc::ImageAccessor& pixelData) const;
980
8e497a4e3d96 DicomInstanceParameters::GetIndexInSeries()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 782
diff changeset
196
8e497a4e3d96 DicomInstanceParameters::GetIndexInSeries()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 782
diff changeset
197 bool HasIndexInSeries() const
8e497a4e3d96 DicomInstanceParameters::GetIndexInSeries()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 782
diff changeset
198 {
8e497a4e3d96 DicomInstanceParameters::GetIndexInSeries()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 782
diff changeset
199 return data_.hasIndexInSeries_;
8e497a4e3d96 DicomInstanceParameters::GetIndexInSeries()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 782
diff changeset
200 }
8e497a4e3d96 DicomInstanceParameters::GetIndexInSeries()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 782
diff changeset
201
8e497a4e3d96 DicomInstanceParameters::GetIndexInSeries()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 782
diff changeset
202 unsigned int GetIndexInSeries() const;
1091
5a18e6a395bc Added DoseUnit tag retrieval to DicomInstanceParameters
Benjamin Golinvaux <bgo@osimis.io>
parents: 1016
diff changeset
203
5a18e6a395bc Added DoseUnit tag retrieval to DicomInstanceParameters
Benjamin Golinvaux <bgo@osimis.io>
parents: 1016
diff changeset
204 const std::string& GetDoseUnits() const
5a18e6a395bc Added DoseUnit tag retrieval to DicomInstanceParameters
Benjamin Golinvaux <bgo@osimis.io>
parents: 1016
diff changeset
205 {
5a18e6a395bc Added DoseUnit tag retrieval to DicomInstanceParameters
Benjamin Golinvaux <bgo@osimis.io>
parents: 1016
diff changeset
206 return data_.doseUnits_;
5a18e6a395bc Added DoseUnit tag retrieval to DicomInstanceParameters
Benjamin Golinvaux <bgo@osimis.io>
parents: 1016
diff changeset
207 }
746
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
208 };
d716bfb3e07c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
209 }