View Issue Details

IDProjectCategoryView StatusLast Update
0004077Slicer4Core: Base Codepublic2017-06-20 00:39
ReporterfinetjulAssigned Tomayeul.chassagnard 
PrioritynormalSeverityminorReproducibilitysometimes
Status resolvedResolutionfixed 
Product VersionSlicer 4.4.0 
Target VersionFixed in VersionSlicer 4.7.0 
Summary0004077: Wrong slice bounds for some volumes
Description

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:

NRRD0004

Complete NRRD file format specification at:

http://teem.sourceforge.net/nrrd/format.html

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()
volume.GetIJKToRASMatrix(matrix)
redSlice.SetOrientationToReformat()
redSlice.GetSliceToRAS().DeepCopy( matrix )
redSlice.UpdateMatrices()
-> look at the red slice widget slider, there is a lot of black

TagsNo tags attached.

Activities

jcfr

jcfr

2016-07-18 12:29

administrator   ~0014041

For reference, associated PR is https://github.com/Slicer/Slicer/pull/401

lassoan

lassoan

2017-06-20 00:39

developer   ~0014907

Fix was integrated - see https://github.com/Slicer/Slicer/pull/401

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