MantisBT - ITK
View Issue Details
0009205ITKpublic2009-06-25 10:232010-10-21 12:31
Bradley Lowekamp 
Luis Ibanez 
normalmajorhave not tried
closedfixed 
 
 
0009205: Stack corruption while reading an image series with a single file
Reported by Sebastian Steger on Insight-users:

Hi,

I used the itk::ImageSeriesReader to read a single file containing an
image with dimensions [X,Y,1] - a 2D image.
This results in corruption of the stack.

The reason for that can be found in Code\IO\itkImageSeriesReader.txx
R1.35, line 316: sliceStartIndex[m_NumberOfDimensionsInImage] = i;
'sliceStartIndex' is in my case an array with 3 elements and
'm_NumberOfDimensionsInImage' is set to 3!

For more than one image, 'm_NumberOfDimensionsInImage' is reduced
correctly in line 160. Introducing the same dimension reduction logic
(lines 151-166) to the 1 file case (line 140) solves the problem.

Best regards,
Sebastian

No tags attached.
has duplicate 0009149closed Luis Ibanez Little overflow while setting bounds in itkImageSeriesReader causes reader to fail with 2D Images. 
Issue History
2009-06-25 10:23Bradley LowekampNew Issue
2009-07-06 16:22Bradley LowekampStatusnew => assigned
2009-07-06 16:22Bradley LowekampAssigned To => Bradley Lowekamp
2009-07-28 18:04Luis IbanezRelationship addedhas duplicate 0009149
2009-07-28 18:16Luis IbanezNote Added: 0016993
2009-07-28 18:17Luis IbanezAssigned ToBradley Lowekamp => Luis Ibanez
2009-07-28 18:18Luis IbanezNote Added: 0016995
2009-07-28 18:18Luis IbanezStatusassigned => confirmed
2009-07-28 18:42Luis IbanezNote Added: 0016997
2009-07-28 18:51Luis IbanezNote Added: 0017000
2009-07-28 18:51Luis IbanezStatusconfirmed => resolved
2009-07-28 18:51Luis IbanezResolutionopen => fixed
2010-10-21 12:31Gabe HartStatusresolved => closed

Notes
(0016993)
Luis Ibanez   
2009-07-28 18:16   
Added test
Testing/Code/IO/itkDICOMImageSeriesTest2.cxx
to exercise this condition.
(0016995)
Luis Ibanez   
2009-07-28 18:18   
we verified this problem with the new test:
Testing/Code/IO/itkDICOMImageSeriesTest2.cxx
(0016997)
Luis Ibanez   
2009-07-28 18:42   
Added a method for collapsing dimensions when necessary

http://public.kitware.com/cgi-bin/viewcvs.cgi/Code/IO/itkImageSeriesReader.h?root=Insight&r1=1.16&r2=1.17 [^]
http://public.kitware.com/cgi-bin/viewcvs.cgi/Code/IO/itkImageSeriesReader.txx?root=Insight&r1=1.36&r2=1.37 [^]

According to Sebastian Steger advice.
(0017000)
Luis Ibanez   
2009-07-28 18:51   
We believe the problem is fixed.

Will wait to see a green dashboard tomorrow, before closing the bug.

Confirmation from the bug reporter will also be nice...