comparison Framework/Volumes/VolumeSceneLayerSource.cpp @ 1345:0d6a01ffa1dd broker

Clean version of the hack commited in the previous commit : the DicomStructureSetLoader now properly increments its revision during progressive loading. The "force update" method in the VolumeSceneLayerSource isn't needed anymore.
author Benjamin Golinvaux <bgo@osimis.io>
date Mon, 06 Apr 2020 09:17:40 +0200
parents 00c8322bbe69
children 8635b333fa5b
comparison
equal deleted inserted replaced
1344:00c8322bbe69 1345:0d6a01ffa1dd
100 100
101 return *configurator_; 101 return *configurator_;
102 } 102 }
103 103
104 104
105 void VolumeSceneLayerSource::Update(const CoordinateSystem3D& plane, bool forceLayerRecreation) 105 void VolumeSceneLayerSource::Update(const CoordinateSystem3D& plane)
106 { 106 {
107 assert(slicer_.get() != NULL); 107 assert(slicer_.get() != NULL);
108 std::unique_ptr<IVolumeSlicer::IExtractedSlice> slice(slicer_->ExtractSlice(plane)); 108 std::unique_ptr<IVolumeSlicer::IExtractedSlice> slice(slicer_->ExtractSlice(plane));
109 109
110 if (slice.get() == NULL) 110 if (slice.get() == NULL)
115 if (!slice->IsValid()) 115 if (!slice->IsValid())
116 { 116 {
117 // The slicer cannot handle this cutting plane: Clear the layer 117 // The slicer cannot handle this cutting plane: Clear the layer
118 ClearLayer(); 118 ClearLayer();
119 } 119 }
120 else if (!forceLayerRecreation && 120 else if (lastPlane_.get() != NULL &&
121 lastPlane_.get() != NULL &&
122 IsSameCuttingPlane(*lastPlane_, plane) && 121 IsSameCuttingPlane(*lastPlane_, plane) &&
123 lastRevision_ == slice->GetRevision()) 122 lastRevision_ == slice->GetRevision())
124 { 123 {
125 // The content of the slice has not changed: Don't update the 124 // The content of the slice has not changed: Don't update the
126 // layer content, but possibly update its style 125 // layer content, but possibly update its style