Import 2017-06-07 23:51:09: master 9b375df7

Author Committer Branch Timestamp Parent
lassoan lassoan master 2016-08-25 17:53:50 master 33bd9c04
Changeset

ENH: Improve compatibility of Segmentations saved in nrrd file

Extent of images stored in NRRD files always start from (0,0,0).
To be able to save/restore arbitrary extents, a private field (Segmentation_Extent) was used.
However, external software packages that ignored this private field did not display the segments in correct position.

The space origin is now set so that if the private Segmentation_ReferenceImageExtentOffset field is ignored, the segments
still appear in correct physical position. If Slicer reads the segmentation, it restores the extent by setting the extent
start to Segmentation_ReferenceImageExtentOffset and shifting back the image origin to the original position.

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

mod - Libs/MRML/Core/vtkMRMLSegmentationStorageNode.cxx Diff File