Import 2017-06-07 23:51:09: master 2525fc24

Author Committer Branch Timestamp Parent
jcfr jcfr master 2016-01-08 18:00:30 master bdbaeca7
Changeset

BUG: Fix display node copy in CloneVolume

Motivation :

If a volume is rendered through the Volume Rendering volume module
then cropped through the Crop Volume module, it is not possible to
display the volume rendering of the cropped volume: the original
volume would be displayed instead.

Reason :

In the Crop Volume module, the method vtkSlicerVolumesLogic::CloneVolume
was called. The volume and its first display node were cloned using
vtkMRMLVolumeNode::CopyWithScene, but the remaining display nodes were
ignored. This was resulting in having a cloned volume with references to
the original volume display nodes. In the case above, the display node of
type vtkMRMLVolumeRenderingDisplayNode was the same for the cropped and
original volumes, referencing the original volume for both of them.

Fix :

In this commit only the first display node is cloned, and the other display
nodes are removed. Cloning a vtkMRMLVolumeRenderingDisplayNode would not be
as straightforward as copying a vtkMRMLVolumeDisplayNode since the display
node itself has a VolumeNodeID, a ROINodeID and a VolumePropertyNodeID that
would need to be created/updated.

This fixes the issue 4109: http://na-mic.org/Mantis/view.php?id=4109

From: Alexis Girault <alexis.girault@kitware.com>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24861 3bd1e089-480b-0410-8dfb-8563597acbee

mod - Modules/Loadable/Volumes/Logic/vtkSlicerVolumesLogic.cxx Diff File