comparison Framework/Toolbox/Slice.h @ 117:42c05a3baee3 wasm

loading multi-frame instances as 3D volumes
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 28 Sep 2017 16:55:51 +0200
parents 53025eecbc95
children a4d0b6c82b29
comparison
equal deleted inserted replaced
116:4c5f7cda8624 117:42c05a3baee3
31 private: 31 private:
32 enum Type 32 enum Type
33 { 33 {
34 Type_Invalid, 34 Type_Invalid,
35 Type_Standalone, 35 Type_Standalone,
36 Type_OrthancInstance 36 Type_OrthancDecodableFrame,
37 Type_OrthancRawFrame
37 // TODO A slice could come from some DICOM file (URL) 38 // TODO A slice could come from some DICOM file (URL)
38 }; 39 };
39 40
41 bool ComputeRTDoseGeometry(const OrthancPlugins::DicomDatasetReader& reader,
42 unsigned int frame);
43
40 Type type_; 44 Type type_;
41 std::string orthancInstanceId_; 45 std::string orthancInstanceId_;
46 std::string sopClassUid_;
42 unsigned int frame_; 47 unsigned int frame_;
48 unsigned int frameCount_;
43 CoordinateSystem3D geometry_; 49 CoordinateSystem3D geometry_;
44 double pixelSpacingX_; 50 double pixelSpacingX_;
45 double pixelSpacingY_; 51 double pixelSpacingY_;
46 double thickness_; 52 double thickness_;
47 unsigned int width_; 53 unsigned int width_;
57 // layers within LayerWidget? 63 // layers within LayerWidget?
58 Slice(const CoordinateSystem3D& plane, 64 Slice(const CoordinateSystem3D& plane,
59 double thickness) : 65 double thickness) :
60 type_(Type_Standalone), 66 type_(Type_Standalone),
61 frame_(0), 67 frame_(0),
68 frameCount_(0),
62 geometry_(plane), 69 geometry_(plane),
63 pixelSpacingX_(1), 70 pixelSpacingX_(1),
64 pixelSpacingY_(1), 71 pixelSpacingY_(1),
65 thickness_(thickness), 72 thickness_(thickness),
66 width_(0), 73 width_(0),
74 double thickness, 81 double thickness,
75 unsigned int width, 82 unsigned int width,
76 unsigned int height, 83 unsigned int height,
77 const DicomFrameConverter& converter) : 84 const DicomFrameConverter& converter) :
78 type_(Type_Standalone), 85 type_(Type_Standalone),
86 frameCount_(1),
79 geometry_(plane), 87 geometry_(plane),
80 pixelSpacingX_(pixelSpacingX), 88 pixelSpacingX_(pixelSpacingX),
81 pixelSpacingY_(pixelSpacingY), 89 pixelSpacingY_(pixelSpacingY),
82 thickness_(thickness), 90 thickness_(thickness),
83 width_(width), 91 width_(width),
93 101
94 bool ParseOrthancFrame(const OrthancPlugins::IDicomDataset& dataset, 102 bool ParseOrthancFrame(const OrthancPlugins::IDicomDataset& dataset,
95 const std::string& instanceId, 103 const std::string& instanceId,
96 unsigned int frame); 104 unsigned int frame);
97 105
98 bool IsOrthancInstance() const 106 bool HasOrthancDecoding() const
99 { 107 {
100 return type_ == Type_OrthancInstance; 108 return type_ == Type_OrthancDecodableFrame;
101 } 109 }
102 110
103 const std::string GetOrthancInstanceId() const; 111 const std::string GetOrthancInstanceId() const;
104 112
105 unsigned int GetFrame() const; 113 unsigned int GetFrame() const;