MantisBT - ITK
View Issue Details
0008476ITKpublic2009-02-05 16:112010-10-21 12:32
Mathieu Coursolle 
Don Bigler 
normalcrashalways
closedfixed 
ITK-3-10 
ITK-3-10 
0008476: itkPhilipsRECImageIO throws an exception when reading 4D images.
In PhilipsRECImageIO, the direction cosines are not defined for dimensions higher than 3. Therefore, a 4D image with default orientation would have it direction set to {{1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, 1, 0}, {0, 0, 0, 0}}.

Note that the last direction vector is all zeros. This causes an exception when the direction is validated, as {0, 0, 0, 0} does not define a valid orientation in space (See ComputeIndexToPhysicalPointMatrices() in itkImageBase.txx).

A solution would be to initialize the direction of the last direction to {0, 0, 0, 1}.

A proposed patch is attached.
No tags attached.
related to 0005454closed Luis Ibanez Support Philips PAR/REC image files in ITK 
txt patch_itkPhilipsRECImageIO_Exception.txt (275) 2009-02-05 16:11
https://public.kitware.com/Bug/file/2035/patch_itkPhilipsRECImageIO_Exception.txt
Issue History
2009-02-05 16:11Mathieu CoursolleNew Issue
2009-02-05 16:11Mathieu CoursolleFile Added: patch_itkPhilipsRECImageIO_Exception.txt
2009-02-05 16:11Mathieu CoursolleStatusnew => assigned
2009-02-05 16:11Mathieu CoursolleAssigned To => Don Bigler
2009-02-06 15:26Sean McBrideRelationship addedrelated to 0005454
2009-02-24 22:30Don BiglerNote Added: 0015362
2009-02-24 22:30Don BiglerStatusassigned => confirmed
2009-02-24 22:34Don BiglerNote Added: 0015363
2009-02-24 22:34Don BiglerNote Added: 0015364
2009-02-24 22:34Don BiglerStatusconfirmed => resolved
2009-02-24 22:34Don BiglerFixed in Version => ITK-3-10
2009-02-24 22:34Don BiglerResolutionopen => fixed
2010-10-21 12:32Gabe HartStatusresolved => closed

Notes
(0015362)
Don Bigler   
2009-02-24 22:30   
Confirmed the bug. When trying to read a 4D Philips REC image using ITK 3.10.2, an exception is thrown when the direction cosines are checked.
(0015363)
Don Bigler   
2009-02-24 22:34   
Applying the patch eliminates the exception when reading a 4D Philips REC image. Committed the patched file to cvs.
(0015364)
Don Bigler   
2009-02-24 22:34   
Applying the patch eliminates the exception when reading a 4D Philips REC image. Committed the patched file to cvs.