[Insight-users] bug report: Stack corruption while reading an image series with a single file

Sebastian Steger Sebastian.Steger at igd.fraunhofer.de
Tue Jun 9 05:53:03 EDT 2009


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




More information about the Insight-users mailing list