# HG changeset patch # User Benjamin Golinvaux # Date 1586157460 -7200 # Node ID 0d6a01ffa1dd20ba1dae79d4d8c7e9fc1b0277bb # Parent 00c8322bbe69d1e3df1814c81e76df0703b66e22 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. diff -r 00c8322bbe69 -r 0d6a01ffa1dd Framework/Loaders/DicomStructureSetLoader.cpp --- a/Framework/Loaders/DicomStructureSetLoader.cpp Mon Apr 06 08:44:10 2020 +0200 +++ b/Framework/Loaders/DicomStructureSetLoader.cpp Mon Apr 06 09:17:40 2020 +0200 @@ -76,6 +76,7 @@ loader.countProcessedInstances_ ++; assert(loader.countProcessedInstances_ <= loader.countReferencedInstances_); + loader.revision_++; loader.SetStructuresUpdated(); if (loader.countProcessedInstances_ == loader.countReferencedInstances_) diff -r 00c8322bbe69 -r 0d6a01ffa1dd Framework/Volumes/VolumeSceneLayerSource.cpp --- a/Framework/Volumes/VolumeSceneLayerSource.cpp Mon Apr 06 08:44:10 2020 +0200 +++ b/Framework/Volumes/VolumeSceneLayerSource.cpp Mon Apr 06 09:17:40 2020 +0200 @@ -102,7 +102,7 @@ } - void VolumeSceneLayerSource::Update(const CoordinateSystem3D& plane, bool forceLayerRecreation) + void VolumeSceneLayerSource::Update(const CoordinateSystem3D& plane) { assert(slicer_.get() != NULL); std::unique_ptr slice(slicer_->ExtractSlice(plane)); @@ -117,8 +117,7 @@ // The slicer cannot handle this cutting plane: Clear the layer ClearLayer(); } - else if (!forceLayerRecreation && - lastPlane_.get() != NULL && + else if (lastPlane_.get() != NULL && IsSameCuttingPlane(*lastPlane_, plane) && lastRevision_ == slice->GetRevision()) { diff -r 00c8322bbe69 -r 0d6a01ffa1dd Framework/Volumes/VolumeSceneLayerSource.h --- a/Framework/Volumes/VolumeSceneLayerSource.h Mon Apr 06 08:44:10 2020 +0200 +++ b/Framework/Volumes/VolumeSceneLayerSource.h Mon Apr 06 09:17:40 2020 +0200 @@ -80,6 +80,6 @@ you can lock the whole viewport data (including scene) by means of the IViewport::Lock method. */ - void Update(const CoordinateSystem3D& plane, bool forceLayerRecreation = false); + void Update(const CoordinateSystem3D& plane); }; }