Mercurial > hg > orthanc-stone
comparison Framework/Toolbox/SubvoxelReader.h @ 1488:7f16987131e1
Missing include + docs + public getter for volume geometry in multiframe loader
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Tue, 23 Jun 2020 13:44:23 +0200 |
parents | 30deba7bc8e2 |
children |
comparison
equal
deleted
inserted
replaced
1486:b931ddbe070e | 1488:7f16987131e1 |
---|---|
31 | 31 |
32 namespace OrthancStone | 32 namespace OrthancStone |
33 { | 33 { |
34 namespace Internals | 34 namespace Internals |
35 { | 35 { |
36 /* | |
37 WARNING : the slice order is different between this class and ImageBuffer3D | |
38 | |
39 See the comment above ImageBuffer3D declaration. | |
40 | |
41 The slices are supposed to be stored in INCREASING z-order in this class! | |
42 */ | |
36 class SubvoxelReaderBase : public boost::noncopyable | 43 class SubvoxelReaderBase : public boost::noncopyable |
37 { | 44 { |
38 private: | 45 private: |
39 const ImageBuffer3D& source_; | 46 const ImageBuffer3D& source_; |
40 unsigned int width_; | 47 unsigned int width_; |
82 } | 89 } |
83 }; | 90 }; |
84 } | 91 } |
85 | 92 |
86 | 93 |
94 /* | |
95 WARNING : the slice order is different between this class and ImageBuffer3D | |
96 | |
97 See the comment above ImageBuffer3D declaration. | |
98 | |
99 The slices are supposed to be stored in INCREASING z-order in this class! | |
100 */ | |
87 template <Orthanc::PixelFormat Format, | 101 template <Orthanc::PixelFormat Format, |
88 ImageInterpolation Interpolation> | 102 ImageInterpolation Interpolation> |
89 class SubvoxelReader; | 103 class SubvoxelReader; |
90 | 104 |
91 | 105 |
106 /* | |
107 WARNING : the slice order is different between this class and ImageBuffer3D | |
108 | |
109 See the comment above ImageBuffer3D declaration. | |
110 | |
111 The slices are supposed to be stored in INCREASING z-order in this class! | |
112 */ | |
92 template <Orthanc::PixelFormat Format> | 113 template <Orthanc::PixelFormat Format> |
93 class SubvoxelReader<Format, ImageInterpolation_Nearest> : | 114 class SubvoxelReader<Format, ImageInterpolation_Nearest> : |
94 public Internals::SubvoxelReaderBase | 115 public Internals::SubvoxelReaderBase |
95 { | 116 { |
96 public: | 117 public: |
112 float y, | 133 float y, |
113 float z) const; | 134 float z) const; |
114 }; | 135 }; |
115 | 136 |
116 | 137 |
138 /* | |
139 WARNING : the slice order is different between this class and ImageBuffer3D | |
140 | |
141 See the comment above ImageBuffer3D declaration. | |
142 | |
143 The slices are supposed to be stored in INCREASING z-order in this class! | |
144 */ | |
117 template <Orthanc::PixelFormat Format> | 145 template <Orthanc::PixelFormat Format> |
118 class SubvoxelReader<Format, ImageInterpolation_Bilinear> : | 146 class SubvoxelReader<Format, ImageInterpolation_Bilinear> : |
119 public Internals::SubvoxelReaderBase | 147 public Internals::SubvoxelReaderBase |
120 { | 148 { |
121 public: | 149 public: |
145 float y, | 173 float y, |
146 float z) const; | 174 float z) const; |
147 }; | 175 }; |
148 | 176 |
149 | 177 |
178 /* | |
179 WARNING : the slice order is different between this class and ImageBuffer3D | |
180 | |
181 See the comment above ImageBuffer3D declaration. | |
182 | |
183 The slices are supposed to be stored in INCREASING z-order in this class! | |
184 */ | |
150 template <Orthanc::PixelFormat Format> | 185 template <Orthanc::PixelFormat Format> |
151 class SubvoxelReader<Format, ImageInterpolation_Trilinear> : | 186 class SubvoxelReader<Format, ImageInterpolation_Trilinear> : |
152 public Internals::SubvoxelReaderBase | 187 public Internals::SubvoxelReaderBase |
153 { | 188 { |
154 private: | 189 private: |
174 float y, | 209 float y, |
175 float z) const; | 210 float z) const; |
176 }; | 211 }; |
177 | 212 |
178 | 213 |
214 /* | |
215 See important comment above | |
216 */ | |
179 | 217 |
180 template <Orthanc::PixelFormat Format> | 218 template <Orthanc::PixelFormat Format> |
181 bool SubvoxelReader<Format, ImageInterpolation_Nearest>::GetValue(PixelType& target, | 219 bool SubvoxelReader<Format, ImageInterpolation_Nearest>::GetValue(PixelType& target, |
182 float x, | 220 float x, |
183 float y, | 221 float y, |
228 return false; | 266 return false; |
229 } | 267 } |
230 } | 268 } |
231 | 269 |
232 | 270 |
271 /* | |
272 See important comment above | |
273 */ | |
233 | 274 |
234 template <Orthanc::PixelFormat Format> | 275 template <Orthanc::PixelFormat Format> |
235 bool SubvoxelReader<Format, ImageInterpolation_Bilinear>::Sample(float& f00, | 276 bool SubvoxelReader<Format, ImageInterpolation_Bilinear>::Sample(float& f00, |
236 float& f01, | 277 float& f01, |
237 float& f10, | 278 float& f10, |
282 | 323 |
283 return true; | 324 return true; |
284 } | 325 } |
285 | 326 |
286 | 327 |
328 /* | |
329 See important comment above | |
330 */ | |
287 | 331 |
288 template <Orthanc::PixelFormat Format> | 332 template <Orthanc::PixelFormat Format> |
289 bool SubvoxelReader<Format, ImageInterpolation_Bilinear>::GetFloatValue(float& target, | 333 bool SubvoxelReader<Format, ImageInterpolation_Bilinear>::GetFloatValue(float& target, |
290 float x, | 334 float x, |
291 float y, | 335 float y, |
321 } | 365 } |
322 } | 366 } |
323 } | 367 } |
324 | 368 |
325 | 369 |
370 /* | |
371 See important comment above | |
372 */ | |
326 | 373 |
327 template <Orthanc::PixelFormat Format> | 374 template <Orthanc::PixelFormat Format> |
328 bool SubvoxelReader<Format, ImageInterpolation_Bilinear>::GetValue(PixelType& target, | 375 bool SubvoxelReader<Format, ImageInterpolation_Bilinear>::GetValue(PixelType& target, |
329 float x, | 376 float x, |
330 float y, | 377 float y, |
395 } | 442 } |
396 } | 443 } |
397 } | 444 } |
398 | 445 |
399 | 446 |
447 /* | |
448 See important comment above | |
449 */ | |
450 | |
400 | 451 |
401 template <Orthanc::PixelFormat Format> | 452 template <Orthanc::PixelFormat Format> |
402 bool SubvoxelReader<Format, ImageInterpolation_Trilinear>::GetValue(PixelType& target, | 453 bool SubvoxelReader<Format, ImageInterpolation_Trilinear>::GetValue(PixelType& target, |
403 float x, | 454 float x, |
404 float y, | 455 float y, |