Mercurial > hg > orthanc-stone
comparison Framework/Loaders/OrthancSeriesVolumeProgressiveLoader.cpp @ 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 | a68cd7ae8838 |
comparison
equal
deleted
inserted
replaced
816:1f85e9c7d020 | 817:68f888812af4 |
---|---|
34 class OrthancSeriesVolumeProgressiveLoader::ExtractedSlice : public DicomVolumeImageMPRSlicer::Slice | 34 class OrthancSeriesVolumeProgressiveLoader::ExtractedSlice : public DicomVolumeImageMPRSlicer::Slice |
35 { | 35 { |
36 private: | 36 private: |
37 const OrthancSeriesVolumeProgressiveLoader& that_; | 37 const OrthancSeriesVolumeProgressiveLoader& that_; |
38 | 38 |
39 protected: | |
40 virtual uint64_t GetRevisionInternal(VolumeProjection projection, | |
41 unsigned int sliceIndex) const | |
42 { | |
43 if (projection == VolumeProjection_Axial) | |
44 { | |
45 return that_.seriesGeometry_.GetSliceRevision(sliceIndex); | |
46 } | |
47 else | |
48 { | |
49 // For coronal and sagittal projections, we take the global | |
50 // revision of the volume because even if a single slice changes, | |
51 // this means the projection will yield a different result --> | |
52 // we must increase the revision as soon as any slice changes | |
53 return that_.volume_->GetRevision(); | |
54 } | |
55 } | |
56 | |
57 public: | 39 public: |
58 ExtractedSlice(const OrthancSeriesVolumeProgressiveLoader& that, | 40 ExtractedSlice(const OrthancSeriesVolumeProgressiveLoader& that, |
59 const CoordinateSystem3D& plane) : | 41 const CoordinateSystem3D& plane) : |
60 DicomVolumeImageMPRSlicer::Slice(*that.volume_, plane), | 42 DicomVolumeImageMPRSlicer::Slice(*that.volume_, plane), |
61 that_(that) | 43 that_(that) |
62 { | 44 { |
45 if (GetProjection() == VolumeProjection_Axial) | |
46 { | |
47 // For coronal and sagittal projections, we take the global | |
48 // revision of the volume because even if a single slice changes, | |
49 // this means the projection will yield a different result --> | |
50 // we must increase the revision as soon as any slice changes | |
51 SetRevision(that_.seriesGeometry_.GetSliceRevision(GetSliceIndex())); | |
52 } | |
53 | |
63 if (that_.strategy_.get() != NULL && | 54 if (that_.strategy_.get() != NULL && |
64 IsValid() && | 55 IsValid() && |
65 GetProjection() == VolumeProjection_Axial) | 56 GetProjection() == VolumeProjection_Axial) |
66 { | 57 { |
67 that_.strategy_->SetCurrent(GetSliceIndex()); | 58 that_.strategy_->SetCurrent(GetSliceIndex()); |