Mercurial > hg > orthanc-stone
comparison Framework/Volumes/DicomVolumeImageMPRSlicer.h @ 817:68f888812af4
simplification of DicomVolumeImageMPRSlicer::ExtractedSlice
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 29 May 2019 08:36:13 +0200 |
parents | aead999345e0 |
children | 401808e7ff2e |
comparison
equal
deleted
inserted
replaced
816:1f85e9c7d020 | 817:68f888812af4 |
---|---|
38 public: | 38 public: |
39 class Slice : public IExtractedSlice | 39 class Slice : public IExtractedSlice |
40 { | 40 { |
41 private: | 41 private: |
42 const DicomVolumeImage& volume_; | 42 const DicomVolumeImage& volume_; |
43 uint64_t revision_; | |
43 bool valid_; | 44 bool valid_; |
44 VolumeProjection projection_; | 45 VolumeProjection projection_; |
45 unsigned int sliceIndex_; | 46 unsigned int sliceIndex_; |
46 | 47 |
47 void CheckValid() const; | 48 void CheckValid() const; |
48 | |
49 protected: | |
50 // Can be overloaded in subclasses | |
51 virtual uint64_t GetRevisionInternal(VolumeProjection projection, | |
52 unsigned int sliceIndex) const | |
53 { | |
54 return volume_.GetRevision(); | |
55 } | |
56 | 49 |
57 public: | 50 public: |
58 /** | 51 /** |
59 Represents a slice of a volume image that is parallel to the | 52 Represents a slice of a volume image that is parallel to the |
60 coordinate system axis. | 53 coordinate system axis. |
62 coronal) and the corresponding slice index, from the cutting plane. | 55 coronal) and the corresponding slice index, from the cutting plane. |
63 */ | 56 */ |
64 Slice(const DicomVolumeImage& volume, | 57 Slice(const DicomVolumeImage& volume, |
65 const CoordinateSystem3D& cuttingPlane); | 58 const CoordinateSystem3D& cuttingPlane); |
66 | 59 |
60 void SetRevision(uint64_t revision) | |
61 { | |
62 revision_ = revision; | |
63 } | |
64 | |
67 VolumeProjection GetProjection() const; | 65 VolumeProjection GetProjection() const; |
68 | 66 |
69 unsigned int GetSliceIndex() const; | 67 unsigned int GetSliceIndex() const; |
70 | 68 |
71 virtual bool IsValid() | 69 virtual bool IsValid() |
72 { | 70 { |
73 return valid_; | 71 return valid_; |
74 } | 72 } |
75 | 73 |
76 virtual uint64_t GetRevision(); | 74 virtual uint64_t GetRevision() |
75 { | |
76 return revision_; | |
77 } | |
77 | 78 |
78 virtual ISceneLayer* CreateSceneLayer(const ILayerStyleConfigurator* configurator, | 79 virtual ISceneLayer* CreateSceneLayer(const ILayerStyleConfigurator* configurator, |
79 const CoordinateSystem3D& cuttingPlane); | 80 const CoordinateSystem3D& cuttingPlane); |
80 }; | 81 }; |
81 | 82 |