comparison Framework/Radiography/RadiographyLayer.h @ 1259:69177b10e2b9

various fixes for RadiographyScene: support text layers outside the dicom layer, fix background in this case + extract dicom from rendered scene
author Alain Mazy <alain@mazy.be>
date Tue, 21 Jan 2020 16:52:37 +0100
parents a5f2a6b04a31
children 2d8ab34c8c91 a989c7d46b9a
comparison
equal deleted inserted replaced
1258:9c20ae049669 1259:69177b10e2b9
215 Geometry geometry_; 215 Geometry geometry_;
216 RadiographyPhotometricDisplayMode prefferedPhotometricDisplayMode_; 216 RadiographyPhotometricDisplayMode prefferedPhotometricDisplayMode_;
217 const RadiographyScene& scene_; 217 const RadiographyScene& scene_;
218 218
219 protected: 219 protected:
220 virtual const AffineTransform2D& GetTransform() const
221 {
222 return transform_;
223 }
224
225 virtual const AffineTransform2D& GetTransformInverse() const
226 {
227 return transformInverse_;
228 }
229
230 void SetPreferredPhotomotricDisplayMode(RadiographyPhotometricDisplayMode prefferedPhotometricDisplayMode); 220 void SetPreferredPhotomotricDisplayMode(RadiographyPhotometricDisplayMode prefferedPhotometricDisplayMode);
231 221
232 private: 222 private:
233 void UpdateTransform(); 223 void UpdateTransform();
234 224
250 public: 240 public:
251 RadiographyLayer(MessageBroker& broker, const RadiographyScene& scene); 241 RadiographyLayer(MessageBroker& broker, const RadiographyScene& scene);
252 242
253 virtual ~RadiographyLayer() 243 virtual ~RadiographyLayer()
254 { 244 {
245 }
246
247 virtual const AffineTransform2D& GetTransform() const
248 {
249 return transform_;
250 }
251
252 virtual const AffineTransform2D& GetTransformInverse() const
253 {
254 return transformInverse_;
255 } 255 }
256 256
257 size_t GetIndex() const 257 size_t GetIndex() const
258 { 258 {
259 return index_; 259 return index_;
356 bool applyWindowing) const = 0; 356 bool applyWindowing) const = 0;
357 357
358 virtual bool GetRange(float& minValue, 358 virtual bool GetRange(float& minValue,
359 float& maxValue) const = 0; 359 float& maxValue) const = 0;
360 360
361 friend class RadiographyMaskLayer; // because it needs to GetTransform on the dicomLayer it relates to
362
363 virtual size_t GetApproximateMemoryUsage() const // this is used to limit the number of scenes loaded in RAM when resources are limited (we actually only count the size used by the images, not the C structs) 361 virtual size_t GetApproximateMemoryUsage() const // this is used to limit the number of scenes loaded in RAM when resources are limited (we actually only count the size used by the images, not the C structs)
364 { 362 {
365 return 0; 363 return 0;
366 } 364 }
367 }; 365 };