comparison Framework/Toolbox/Slice.h @ 102:fcec0ab44054 wasm

display volumes
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 31 May 2017 17:01:18 +0200
parents efd9ef2b67f1
children 53025eecbc95
comparison
equal deleted inserted replaced
101:af312ce4fe59 102:fcec0ab44054
30 { 30 {
31 private: 31 private:
32 enum Type 32 enum Type
33 { 33 {
34 Type_Invalid, 34 Type_Invalid,
35 Type_Detached, 35 Type_Standalone,
36 Type_OrthancInstance 36 Type_OrthancInstance
37 // TODO A slice could come from some DICOM file (URL) 37 // TODO A slice could come from some DICOM file (URL)
38 }; 38 };
39 39
40 Type type_; 40 Type type_;
55 55
56 // TODO Is this constructor the best way to go to tackle missing 56 // TODO Is this constructor the best way to go to tackle missing
57 // layers within LayerWidget? 57 // layers within LayerWidget?
58 Slice(const SliceGeometry& plane, 58 Slice(const SliceGeometry& plane,
59 double thickness) : 59 double thickness) :
60 type_(Type_Detached), 60 type_(Type_Standalone),
61 frame_(0), 61 frame_(0),
62 geometry_(plane), 62 geometry_(plane),
63 pixelSpacingX_(1), 63 pixelSpacingX_(1),
64 pixelSpacingY_(1), 64 pixelSpacingY_(1),
65 thickness_(thickness), 65 thickness_(thickness),
66 width_(0), 66 width_(0),
67 height_(0) 67 height_(0)
68 { 68 {
69 }
70
71 Slice(const SliceGeometry& plane,
72 double pixelSpacingX,
73 double pixelSpacingY,
74 double thickness,
75 unsigned int width,
76 unsigned int height,
77 const DicomFrameConverter& converter) :
78 type_(Type_Standalone),
79 geometry_(plane),
80 pixelSpacingX_(pixelSpacingX),
81 pixelSpacingY_(pixelSpacingY),
82 thickness_(thickness),
83 width_(width),
84 height_(height),
85 converter_(converter)
86 {
69 } 87 }
70 88
71 bool IsValid() const 89 bool IsValid() const
72 { 90 {
73 return type_ != Type_Invalid; 91 return type_ != Type_Invalid;
99 unsigned int GetHeight() const; 117 unsigned int GetHeight() const;
100 118
101 const DicomFrameConverter& GetConverter() const; 119 const DicomFrameConverter& GetConverter() const;
102 120
103 bool ContainsPlane(const SliceGeometry& plane) const; 121 bool ContainsPlane(const SliceGeometry& plane) const;
122
123 void GetExtent(std::vector<Vector>& points) const;
104 }; 124 };
105 } 125 }