View Issue Details

IDProjectCategoryView StatusLast Update
0004077Slicer4Core: Base Codepublic2018-03-02 11:02
ReporterfinetjulAssigned Tomayeul.chassagnard 
Status closedResolutionfixed 
Product VersionSlicer 4.4.0 
Target VersionFixed in VersionSlicer 4.7.0 
Summary0004077: Wrong slice bounds for some volumes

If a volume is not RAS aligned, then its slice bounds are not correctly computed.
The slice bounds are computed on the RAS bounds instead of the volume corners in RAS space.
This becomes a problem for the slice widget controller slider, its range can be far outside the true volume range.

Steps To Reproduce

a) Create a volume not RAS aligned. For example, look at the following nrrd header:


Complete NRRD file format specification at:

type: unsigned short
dimension: 3
space: left-posterior-superior
sizes: 170 128 12
space directions: (1.6909992321305192,-0.12739923828709859,-0.18527139430527523) (0.21662202213591641,1.2997798797394675,1.0833658764610223) (0.09537293140965461,-1.736983821374888,2.0648949665136946)
kinds: domain domain domain
endian: little
encoding: gzip
space origin: (-648.97216699034982,-301.81682802599005,-241.75236920734989)

b) Load it inside slicer
c) write python code that aligns the red slice to the volume:
redSlice = slicer.mrmlScene.GetNodeByID('vtkMRMLSliceNodeRed')
matrix = vtk.vtkMatrix4x4()
redSlice.GetSliceToRAS().DeepCopy( matrix )
-> look at the red slice widget slider, there is a lot of black

TagsNo tags attached.




2016-07-18 12:29

administrator   ~0014041

For reference, associated PR is



2017-06-20 00:39

developer   ~0014907

Fix was integrated - see

Issue History

Date Modified Username Field Change
2015-11-06 05:59 finetjul New Issue
2015-11-06 05:59 finetjul Status new => assigned
2015-11-06 05:59 finetjul Assigned To => finetjul
2016-07-18 12:29 jcfr Note Added: 0014041
2016-07-18 12:30 jcfr Assigned To finetjul => matthew-woehlke
2016-07-18 12:30 jcfr Assigned To matthew-woehlke => mayeul.chassagnard
2017-06-20 00:39 lassoan Status assigned => resolved
2017-06-20 00:39 lassoan Resolution open => fixed
2017-06-20 00:39 lassoan Fixed in Version => Slicer 4.7.0
2017-06-20 00:39 lassoan Note Added: 0014907
2018-03-02 11:02 jcfr Status resolved => closed