comparison Framework/Volumes/ImageBuffer3D.h @ 683:dbc1d8bfc68a

reorganizing ImageBuffer3D
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 16 May 2019 16:01:36 +0200
parents b70e9be013e4
children 7719eb852dd5
comparison
equal deleted inserted replaced
681:9723fceccb9f 683:dbc1d8bfc68a
33 { 33 {
34 class ImageBuffer3D : public boost::noncopyable 34 class ImageBuffer3D : public boost::noncopyable
35 { 35 {
36 private: 36 private:
37 CoordinateSystem3D axialGeometry_; 37 CoordinateSystem3D axialGeometry_;
38 CoordinateSystem3D coronalGeometry_;
39 CoordinateSystem3D sagittalGeometry_;
38 Vector voxelDimensions_; 40 Vector voxelDimensions_;
39 Orthanc::Image image_; 41 Orthanc::Image image_;
40 Orthanc::PixelFormat format_; 42 Orthanc::PixelFormat format_;
41 unsigned int width_; 43 unsigned int width_;
42 unsigned int height_; 44 unsigned int height_;
43 unsigned int depth_; 45 unsigned int depth_;
44 bool computeRange_; 46 bool computeRange_;
45 bool hasRange_; 47 bool hasRange_;
46 float minValue_; 48 float minValue_;
47 float maxValue_; 49 float maxValue_;
50 Matrix transform_;
51 Matrix transformInverse_;
52
53 void UpdateGeometry();
48 54
49 void ExtendImageRange(const Orthanc::ImageAccessor& slice); 55 void ExtendImageRange(const Orthanc::ImageAccessor& slice);
50 56
51 void GetAxialSliceAccessor(Orthanc::ImageAccessor& target, 57 void GetAxialSliceAccessor(Orthanc::ImageAccessor& target,
52 unsigned int slice, 58 unsigned int slice,
84 const CoordinateSystem3D& GetAxialGeometry() const 90 const CoordinateSystem3D& GetAxialGeometry() const
85 { 91 {
86 return axialGeometry_; 92 return axialGeometry_;
87 } 93 }
88 94
95 const CoordinateSystem3D& GetCoronalGeometry() const
96 {
97 return coronalGeometry_;
98 }
99
100 const CoordinateSystem3D& GetSagittalGeometry() const
101 {
102 return sagittalGeometry_;
103 }
104
89 void SetVoxelDimensions(double x, 105 void SetVoxelDimensions(double x,
90 double y, 106 double y,
91 double z); 107 double z);
92 108
93 Vector GetVoxelDimensions(VolumeProjection projection) const; 109 Vector GetVoxelDimensions(VolumeProjection projection) const;
119 Orthanc::PixelFormat GetFormat() const 135 Orthanc::PixelFormat GetFormat() const
120 { 136 {
121 return format_; 137 return format_;
122 } 138 }
123 139
140 // TODO - Remove
124 ParallelSlices* GetGeometry(VolumeProjection projection) const; 141 ParallelSlices* GetGeometry(VolumeProjection projection) const;
125 142
126 uint64_t GetEstimatedMemorySize() const; 143 uint64_t GetEstimatedMemorySize() const;
127 144
128 bool GetRange(float& minValue, 145 bool GetRange(float& minValue,
164 // lie in the [0;1] range 181 // lie in the [0;1] range
165 Vector GetCoordinates(float x, 182 Vector GetCoordinates(float x,
166 float y, 183 float y,
167 float z) const; 184 float z) const;
168 185
186 bool DetectProjection(VolumeProjection& projection,
187 const CoordinateSystem3D& plane) const;
188
169 189
170 class SliceReader : public boost::noncopyable 190 class SliceReader : public boost::noncopyable
171 { 191 {
172 private: 192 private:
173 Orthanc::ImageAccessor accessor_; 193 Orthanc::ImageAccessor accessor_;