Mercurial > hg > orthanc-stone
annotate OrthancStone/Sources/Toolbox/DicomInstanceParameters.h @ 1883:fba6e550e0ee
apply rescale slope/intercept in rendering plugin
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 12 Jan 2022 18:26:05 +0100 |
parents | 7053b8a0aaec |
children | ed4831e08961 |
rev | line source |
---|---|
746 | 1 /** |
2 * Stone of Orthanc | |
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics | |
4 * Department, University Hospital of Liege, Belgium | |
1871
7053b8a0aaec
upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1870
diff
changeset
|
5 * Copyright (C) 2017-2022 Osimis S.A., Belgium |
7053b8a0aaec
upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1870
diff
changeset
|
6 * Copyright (C) 2021-2022 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
746 | 7 * |
8 * This program is free software: you can redistribute it and/or | |
1598
8563ea5d8ae4
relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
9 * modify it under the terms of the GNU Lesser General Public License |
746 | 10 * as published by the Free Software Foundation, either version 3 of |
11 * the License, or (at your option) any later version. | |
12 * | |
13 * This program is distributed in the hope that it will be useful, but | |
14 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
1598
8563ea5d8ae4
relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
8563ea5d8ae4
relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
16 * Lesser General Public License for more details. |
1596
4fb8fdf03314
removed annoying whitespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1571
diff
changeset
|
17 * |
1598
8563ea5d8ae4
relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
18 * You should have received a copy of the GNU Lesser General Public |
8563ea5d8ae4
relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
19 * License along with this program. If not, see |
8563ea5d8ae4
relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
20 * <http://www.gnu.org/licenses/>. |
746 | 21 **/ |
22 | |
23 | |
24 #pragma once | |
25 | |
1642
5cc589bfb385
lazy computation of DicomInstanceParameters::GetImageInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1637
diff
changeset
|
26 #include "../Scene2D/LookupTableTextureSceneLayer.h" |
746 | 27 #include "../StoneEnumerations.h" |
28 #include "../Toolbox/CoordinateSystem3D.h" | |
29 | |
1455
30deba7bc8e2
simplifying include_directories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1279
diff
changeset
|
30 #include <IDynamicObject.h> |
30deba7bc8e2
simplifying include_directories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1279
diff
changeset
|
31 #include <DicomFormat/DicomImageInformation.h> |
746 | 32 |
33 namespace OrthancStone | |
34 { | |
35 class DicomInstanceParameters : | |
36 public Orthanc::IDynamicObject /* to be used as a payload to SlicesSorter */ | |
37 { | |
38 // This class supersedes the deprecated "DicomFrameConverter" | |
39 | |
40 private: | |
1636 | 41 struct Data // Plain old struct to ease the copy constructor |
746 | 42 { |
1642
5cc589bfb385
lazy computation of DicomInstanceParameters::GetImageInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1637
diff
changeset
|
43 std::string orthancInstanceId_; |
5cc589bfb385
lazy computation of DicomInstanceParameters::GetImageInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1637
diff
changeset
|
44 std::string studyInstanceUid_; |
5cc589bfb385
lazy computation of DicomInstanceParameters::GetImageInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1637
diff
changeset
|
45 std::string seriesInstanceUid_; |
5cc589bfb385
lazy computation of DicomInstanceParameters::GetImageInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1637
diff
changeset
|
46 std::string sopInstanceUid_; |
5cc589bfb385
lazy computation of DicomInstanceParameters::GetImageInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1637
diff
changeset
|
47 SopClassUid sopClassUid_; |
5cc589bfb385
lazy computation of DicomInstanceParameters::GetImageInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1637
diff
changeset
|
48 unsigned int numberOfFrames_; |
5cc589bfb385
lazy computation of DicomInstanceParameters::GetImageInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1637
diff
changeset
|
49 unsigned int width_; |
5cc589bfb385
lazy computation of DicomInstanceParameters::GetImageInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1637
diff
changeset
|
50 unsigned int height_; |
5cc589bfb385
lazy computation of DicomInstanceParameters::GetImageInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1637
diff
changeset
|
51 double sliceThickness_; |
5cc589bfb385
lazy computation of DicomInstanceParameters::GetImageInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1637
diff
changeset
|
52 double pixelSpacingX_; |
5cc589bfb385
lazy computation of DicomInstanceParameters::GetImageInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1637
diff
changeset
|
53 double pixelSpacingY_; |
5cc589bfb385
lazy computation of DicomInstanceParameters::GetImageInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1637
diff
changeset
|
54 CoordinateSystem3D geometry_; |
5cc589bfb385
lazy computation of DicomInstanceParameters::GetImageInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1637
diff
changeset
|
55 Vector frameOffsets_; |
5cc589bfb385
lazy computation of DicomInstanceParameters::GetImageInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1637
diff
changeset
|
56 bool hasRescale_; |
5cc589bfb385
lazy computation of DicomInstanceParameters::GetImageInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1637
diff
changeset
|
57 double rescaleIntercept_; |
5cc589bfb385
lazy computation of DicomInstanceParameters::GetImageInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1637
diff
changeset
|
58 double rescaleSlope_; |
1679
5b8b88e5bfd6
successfully running unit tests in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1677
diff
changeset
|
59 Vector windowingPresetCenters_; |
5b8b88e5bfd6
successfully running unit tests in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1677
diff
changeset
|
60 Vector windowingPresetWidths_; |
1642
5cc589bfb385
lazy computation of DicomInstanceParameters::GetImageInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1637
diff
changeset
|
61 bool hasIndexInSeries_; |
5cc589bfb385
lazy computation of DicomInstanceParameters::GetImageInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1637
diff
changeset
|
62 unsigned int indexInSeries_; |
5cc589bfb385
lazy computation of DicomInstanceParameters::GetImageInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1637
diff
changeset
|
63 std::string doseUnits_; |
5cc589bfb385
lazy computation of DicomInstanceParameters::GetImageInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1637
diff
changeset
|
64 double doseGridScaling_; |
1646
4e14735e98f8
preparing to remove FrameExtent
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1642
diff
changeset
|
65 std::string frameOfReferenceUid_; |
1821
36430d73e36c
introducing measure units in AnnotationsSceneLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
66 bool hasPixelSpacing_; |
1846
2789b4b0e0a8
DicomInstanceParameters::HasNumberOfFrames() and DicomInstanceParameters::GetInstanceNumber()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1822
diff
changeset
|
67 bool hasNumberOfFrames_; |
2789b4b0e0a8
DicomInstanceParameters::HasNumberOfFrames() and DicomInstanceParameters::GetInstanceNumber()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1822
diff
changeset
|
68 int32_t instanceNumber_; |
746 | 69 |
1571 | 70 explicit Data(const Orthanc::DicomMap& dicom); |
746 | 71 }; |
72 | |
73 | |
1642
5cc589bfb385
lazy computation of DicomInstanceParameters::GetImageInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1637
diff
changeset
|
74 Data data_; |
5cc589bfb385
lazy computation of DicomInstanceParameters::GetImageInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1637
diff
changeset
|
75 std::unique_ptr<Orthanc::DicomMap> tags_; |
5cc589bfb385
lazy computation of DicomInstanceParameters::GetImageInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1637
diff
changeset
|
76 std::unique_ptr<Orthanc::DicomImageInformation> imageInformation_; // Lazy evaluation |
746 | 77 |
1636 | 78 void ApplyRescaleAndDoseScaling(Orthanc::ImageAccessor& image, |
79 bool useDouble) const; | |
746 | 80 |
81 public: | |
1571 | 82 explicit DicomInstanceParameters(const DicomInstanceParameters& other) : |
1642
5cc589bfb385
lazy computation of DicomInstanceParameters::GetImageInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1637
diff
changeset
|
83 data_(other.data_), |
5cc589bfb385
lazy computation of DicomInstanceParameters::GetImageInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1637
diff
changeset
|
84 tags_(other.tags_->Clone()) |
746 | 85 { |
86 } | |
87 | |
1571 | 88 explicit DicomInstanceParameters(const Orthanc::DicomMap& dicom) : |
1642
5cc589bfb385
lazy computation of DicomInstanceParameters::GetImageInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1637
diff
changeset
|
89 data_(dicom), |
5cc589bfb385
lazy computation of DicomInstanceParameters::GetImageInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1637
diff
changeset
|
90 tags_(dicom.Clone()) |
746 | 91 { |
92 } | |
93 | |
782
b24c208fa953
VolumeImageReslicer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
768
diff
changeset
|
94 DicomInstanceParameters* Clone() const |
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 return new DicomInstanceParameters(*this); |
b24c208fa953
VolumeImageReslicer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
768
diff
changeset
|
97 } |
b24c208fa953
VolumeImageReslicer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
768
diff
changeset
|
98 |
746 | 99 void SetOrthancInstanceIdentifier(const std::string& id) |
100 { | |
101 data_.orthancInstanceId_ = id; | |
102 } | |
103 | |
104 const std::string& GetOrthancInstanceIdentifier() const | |
105 { | |
106 return data_.orthancInstanceId_; | |
107 } | |
108 | |
1642
5cc589bfb385
lazy computation of DicomInstanceParameters::GetImageInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1637
diff
changeset
|
109 const Orthanc::DicomMap& GetTags() const |
746 | 110 { |
1642
5cc589bfb385
lazy computation of DicomInstanceParameters::GetImageInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1637
diff
changeset
|
111 return *tags_; |
746 | 112 } |
113 | |
114 const std::string& GetStudyInstanceUid() const | |
115 { | |
116 return data_.studyInstanceUid_; | |
117 } | |
118 | |
119 const std::string& GetSeriesInstanceUid() const | |
120 { | |
121 return data_.seriesInstanceUid_; | |
122 } | |
123 | |
124 const std::string& GetSopInstanceUid() const | |
125 { | |
126 return data_.sopInstanceUid_; | |
127 } | |
128 | |
129 SopClassUid GetSopClassUid() const | |
130 { | |
131 return data_.sopClassUid_; | |
132 } | |
133 | |
1635
1a714e21ea7c
start refactoring DicomInstanceParameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1634
diff
changeset
|
134 unsigned int GetNumberOfFrames() const |
1a714e21ea7c
start refactoring DicomInstanceParameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1634
diff
changeset
|
135 { |
1a714e21ea7c
start refactoring DicomInstanceParameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1634
diff
changeset
|
136 return data_.numberOfFrames_; |
1a714e21ea7c
start refactoring DicomInstanceParameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1634
diff
changeset
|
137 } |
1a714e21ea7c
start refactoring DicomInstanceParameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1634
diff
changeset
|
138 |
1a714e21ea7c
start refactoring DicomInstanceParameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1634
diff
changeset
|
139 unsigned int GetWidth() const |
1a714e21ea7c
start refactoring DicomInstanceParameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1634
diff
changeset
|
140 { |
1a714e21ea7c
start refactoring DicomInstanceParameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1634
diff
changeset
|
141 return data_.width_; |
1a714e21ea7c
start refactoring DicomInstanceParameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1634
diff
changeset
|
142 } |
1a714e21ea7c
start refactoring DicomInstanceParameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1634
diff
changeset
|
143 |
1a714e21ea7c
start refactoring DicomInstanceParameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1634
diff
changeset
|
144 unsigned int GetHeight() const |
1a714e21ea7c
start refactoring DicomInstanceParameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1634
diff
changeset
|
145 { |
1a714e21ea7c
start refactoring DicomInstanceParameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1634
diff
changeset
|
146 return data_.height_; |
1a714e21ea7c
start refactoring DicomInstanceParameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1634
diff
changeset
|
147 } |
1a714e21ea7c
start refactoring DicomInstanceParameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1634
diff
changeset
|
148 |
1634
a4418a489e86
improving robustness of DicomInstanceParameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1598
diff
changeset
|
149 double GetSliceThickness() const |
746 | 150 { |
1634
a4418a489e86
improving robustness of DicomInstanceParameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1598
diff
changeset
|
151 return data_.sliceThickness_; |
746 | 152 } |
153 | |
154 double GetPixelSpacingX() const | |
155 { | |
156 return data_.pixelSpacingX_; | |
157 } | |
158 | |
159 double GetPixelSpacingY() const | |
160 { | |
161 return data_.pixelSpacingY_; | |
162 } | |
163 | |
164 const CoordinateSystem3D& GetGeometry() const | |
165 { | |
166 return data_.geometry_; | |
167 } | |
168 | |
1642
5cc589bfb385
lazy computation of DicomInstanceParameters::GetImageInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1637
diff
changeset
|
169 // WARNING - Calling this method can throw exception |
5cc589bfb385
lazy computation of DicomInstanceParameters::GetImageInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1637
diff
changeset
|
170 const Orthanc::DicomImageInformation& GetImageInformation() const; |
5cc589bfb385
lazy computation of DicomInstanceParameters::GetImageInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1637
diff
changeset
|
171 |
1636 | 172 CoordinateSystem3D GetFrameGeometry(unsigned int frame) const; |
746 | 173 |
174 bool IsPlaneWithinSlice(unsigned int frame, | |
1636 | 175 const CoordinateSystem3D& plane) const; |
746 | 176 |
1637 | 177 bool IsColor() const; |
746 | 178 |
179 bool HasRescale() const | |
180 { | |
181 return data_.hasRescale_; | |
182 } | |
183 | |
184 double GetRescaleIntercept() const; | |
185 | |
186 double GetRescaleSlope() const; | |
187 | |
1679
5b8b88e5bfd6
successfully running unit tests in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1677
diff
changeset
|
188 size_t GetWindowingPresetsCount() const; |
5b8b88e5bfd6
successfully running unit tests in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1677
diff
changeset
|
189 |
5b8b88e5bfd6
successfully running unit tests in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1677
diff
changeset
|
190 float GetWindowingPresetCenter(size_t i) const; |
746 | 191 |
1679
5b8b88e5bfd6
successfully running unit tests in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1677
diff
changeset
|
192 float GetWindowingPresetWidth(size_t i) const; |
746 | 193 |
1679
5b8b88e5bfd6
successfully running unit tests in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1677
diff
changeset
|
194 void GetWindowingPresetsUnion(float& center, |
5b8b88e5bfd6
successfully running unit tests in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1677
diff
changeset
|
195 float& width) const; |
746 | 196 |
1637 | 197 Orthanc::PixelFormat GetExpectedPixelFormat() const; |
746 | 198 |
1016
78a516d5ead5
making DicomInstanceParameters::ConvertToFloat() public
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
980
diff
changeset
|
199 Orthanc::ImageAccessor* ConvertToFloat(const Orthanc::ImageAccessor& pixelData) const; |
78a516d5ead5
making DicomInstanceParameters::ConvertToFloat() public
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
980
diff
changeset
|
200 |
746 | 201 TextureBaseSceneLayer* CreateTexture(const Orthanc::ImageAccessor& pixelData) const; |
768
55411e7da2f7
LookupTableTextureSceneLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
746
diff
changeset
|
202 |
55411e7da2f7
LookupTableTextureSceneLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
746
diff
changeset
|
203 LookupTableTextureSceneLayer* CreateLookupTableTexture(const Orthanc::ImageAccessor& pixelData) const; |
980
8e497a4e3d96
DicomInstanceParameters::GetIndexInSeries()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
782
diff
changeset
|
204 |
8e497a4e3d96
DicomInstanceParameters::GetIndexInSeries()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
782
diff
changeset
|
205 bool HasIndexInSeries() const |
8e497a4e3d96
DicomInstanceParameters::GetIndexInSeries()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
782
diff
changeset
|
206 { |
8e497a4e3d96
DicomInstanceParameters::GetIndexInSeries()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
782
diff
changeset
|
207 return data_.hasIndexInSeries_; |
8e497a4e3d96
DicomInstanceParameters::GetIndexInSeries()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
782
diff
changeset
|
208 } |
8e497a4e3d96
DicomInstanceParameters::GetIndexInSeries()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
782
diff
changeset
|
209 |
8e497a4e3d96
DicomInstanceParameters::GetIndexInSeries()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
782
diff
changeset
|
210 unsigned int GetIndexInSeries() const; |
1091
5a18e6a395bc
Added DoseUnit tag retrieval to DicomInstanceParameters
Benjamin Golinvaux <bgo@osimis.io>
parents:
1016
diff
changeset
|
211 |
5a18e6a395bc
Added DoseUnit tag retrieval to DicomInstanceParameters
Benjamin Golinvaux <bgo@osimis.io>
parents:
1016
diff
changeset
|
212 const std::string& GetDoseUnits() const |
5a18e6a395bc
Added DoseUnit tag retrieval to DicomInstanceParameters
Benjamin Golinvaux <bgo@osimis.io>
parents:
1016
diff
changeset
|
213 { |
5a18e6a395bc
Added DoseUnit tag retrieval to DicomInstanceParameters
Benjamin Golinvaux <bgo@osimis.io>
parents:
1016
diff
changeset
|
214 return data_.doseUnits_; |
5a18e6a395bc
Added DoseUnit tag retrieval to DicomInstanceParameters
Benjamin Golinvaux <bgo@osimis.io>
parents:
1016
diff
changeset
|
215 } |
1141
7681f3943748
Changed handling of DoseGridScaling: before this commit, rescaleSlope was set to
Benjamin Golinvaux <bgo@osimis.io>
parents:
1091
diff
changeset
|
216 |
1161
19b1c8caade4
fix sagittal geometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1159
diff
changeset
|
217 void SetDoseGridScaling(double value) |
19b1c8caade4
fix sagittal geometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1159
diff
changeset
|
218 { |
19b1c8caade4
fix sagittal geometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1159
diff
changeset
|
219 data_.doseGridScaling_ = value; |
19b1c8caade4
fix sagittal geometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1159
diff
changeset
|
220 } |
19b1c8caade4
fix sagittal geometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1159
diff
changeset
|
221 |
1141
7681f3943748
Changed handling of DoseGridScaling: before this commit, rescaleSlope was set to
Benjamin Golinvaux <bgo@osimis.io>
parents:
1091
diff
changeset
|
222 double GetDoseGridScaling() const |
7681f3943748
Changed handling of DoseGridScaling: before this commit, rescaleSlope was set to
Benjamin Golinvaux <bgo@osimis.io>
parents:
1091
diff
changeset
|
223 { |
7681f3943748
Changed handling of DoseGridScaling: before this commit, rescaleSlope was set to
Benjamin Golinvaux <bgo@osimis.io>
parents:
1091
diff
changeset
|
224 return data_.doseGridScaling_; |
7681f3943748
Changed handling of DoseGridScaling: before this commit, rescaleSlope was set to
Benjamin Golinvaux <bgo@osimis.io>
parents:
1091
diff
changeset
|
225 } |
1159
acb399643945
DicomInstanceParameters::ApplyRescale()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
226 |
1636 | 227 double ApplyRescale(double value) const; |
1161
19b1c8caade4
fix sagittal geometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1159
diff
changeset
|
228 |
19b1c8caade4
fix sagittal geometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1159
diff
changeset
|
229 // Required for RT-DOSE |
1636 | 230 bool ComputeRegularSpacing(double& target) const; |
1646
4e14735e98f8
preparing to remove FrameExtent
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1642
diff
changeset
|
231 |
4e14735e98f8
preparing to remove FrameExtent
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1642
diff
changeset
|
232 const std::string& GetFrameOfReferenceUid() const |
4e14735e98f8
preparing to remove FrameExtent
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1642
diff
changeset
|
233 { |
4e14735e98f8
preparing to remove FrameExtent
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1642
diff
changeset
|
234 return data_.frameOfReferenceUid_; |
4e14735e98f8
preparing to remove FrameExtent
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1642
diff
changeset
|
235 } |
1821
36430d73e36c
introducing measure units in AnnotationsSceneLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
236 |
36430d73e36c
introducing measure units in AnnotationsSceneLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
237 bool HasPixelSpacing() const |
36430d73e36c
introducing measure units in AnnotationsSceneLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
238 { |
36430d73e36c
introducing measure units in AnnotationsSceneLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
239 return data_.hasPixelSpacing_; |
36430d73e36c
introducing measure units in AnnotationsSceneLayer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
240 } |
1822
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1821
diff
changeset
|
241 |
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1821
diff
changeset
|
242 void SetPixelSpacing(double pixelSpacingX, |
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1821
diff
changeset
|
243 double pixelSpacingY); |
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1821
diff
changeset
|
244 |
0489fe25ce48
support of pixel spacing in ultrasound images from tag SequenceOfUltrasoundRegions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1821
diff
changeset
|
245 void EnrichUsingDicomWeb(const Json::Value& dicomweb); |
1846
2789b4b0e0a8
DicomInstanceParameters::HasNumberOfFrames() and DicomInstanceParameters::GetInstanceNumber()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1822
diff
changeset
|
246 |
2789b4b0e0a8
DicomInstanceParameters::HasNumberOfFrames() and DicomInstanceParameters::GetInstanceNumber()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1822
diff
changeset
|
247 bool HasNumberOfFrames() const |
2789b4b0e0a8
DicomInstanceParameters::HasNumberOfFrames() and DicomInstanceParameters::GetInstanceNumber()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1822
diff
changeset
|
248 { |
2789b4b0e0a8
DicomInstanceParameters::HasNumberOfFrames() and DicomInstanceParameters::GetInstanceNumber()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1822
diff
changeset
|
249 return data_.hasNumberOfFrames_; |
2789b4b0e0a8
DicomInstanceParameters::HasNumberOfFrames() and DicomInstanceParameters::GetInstanceNumber()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1822
diff
changeset
|
250 } |
2789b4b0e0a8
DicomInstanceParameters::HasNumberOfFrames() and DicomInstanceParameters::GetInstanceNumber()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1822
diff
changeset
|
251 |
2789b4b0e0a8
DicomInstanceParameters::HasNumberOfFrames() and DicomInstanceParameters::GetInstanceNumber()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1822
diff
changeset
|
252 int32_t GetInstanceNumber() const |
2789b4b0e0a8
DicomInstanceParameters::HasNumberOfFrames() and DicomInstanceParameters::GetInstanceNumber()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1822
diff
changeset
|
253 { |
2789b4b0e0a8
DicomInstanceParameters::HasNumberOfFrames() and DicomInstanceParameters::GetInstanceNumber()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1822
diff
changeset
|
254 return data_.instanceNumber_; |
2789b4b0e0a8
DicomInstanceParameters::HasNumberOfFrames() and DicomInstanceParameters::GetInstanceNumber()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1822
diff
changeset
|
255 } |
746 | 256 }; |
257 } |