Mercurial > hg > orthanc-stone
comparison Framework/Volumes/VolumeSceneLayerSource.cpp @ 1344:00c8322bbe69 broker
Ability to force a re-slice of the structure set volume.
This is a fix for the fact that the structure set does not
increase the slice revision when new polygons are added.
This should be fixed in the slicer but this is a temporary
fix until this is done properly.
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Mon, 06 Apr 2020 08:44:10 +0200 |
parents | 4d8d642f7036 |
children | 0d6a01ffa1dd |
comparison
equal
deleted
inserted
replaced
1343:e92c516adcbd | 1344:00c8322bbe69 |
---|---|
100 | 100 |
101 return *configurator_; | 101 return *configurator_; |
102 } | 102 } |
103 | 103 |
104 | 104 |
105 void VolumeSceneLayerSource::Update(const CoordinateSystem3D& plane) | 105 void VolumeSceneLayerSource::Update(const CoordinateSystem3D& plane, bool forceLayerRecreation) |
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 (lastPlane_.get() != NULL && | 120 else if (!forceLayerRecreation && |
121 lastPlane_.get() != NULL && | |
121 IsSameCuttingPlane(*lastPlane_, plane) && | 122 IsSameCuttingPlane(*lastPlane_, plane) && |
122 lastRevision_ == slice->GetRevision()) | 123 lastRevision_ == slice->GetRevision()) |
123 { | 124 { |
124 // The content of the slice has not changed: Don't update the | 125 // The content of the slice has not changed: Don't update the |
125 // layer content, but possibly update its style | 126 // layer content, but possibly update its style |