View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0009149ITKpublic2009-06-12 19:212010-10-21 12:31
ReporterCarlos Barrales Ruiz 
Assigned ToLuis Ibanez 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionITK-3-14 
Target VersionFixed in Version 
Summary0009149: Little overflow while setting bounds in itkImageSeriesReader causes reader to fail with 2D Images.
DescriptionitkImageSeriesReader.txx has a wrong pointer aritmetic confussion in method ImageSeriesReader<TOutputImage>::GenerateData() that causes my system (Mac OS X) not to load any kind of 2D images loaded from DICOM.
Ex:

File: /usr/local/include/InsightToolkit-3.14.0/IO/itkImageSeriesReader.cxx
Line: 353
Description: itk::ERROR: ImageSeriesReader(0x19163620): Size mismatch! The size of /Users/cbruiz/data/breast.dcm is [2048, 1536, 1] and does not match the required size [0, 1536, 1] from file /Users/cbruiz/data/breast.dcm

In my compiled code, the line:
sliceStartIndex[m_NumberOfDimensionsInImage] = i;
overwrites the nearest aligned integer position in stack. That is: validSize. Because m_NumberOfDimensionsInImage = 3;

I'm sure that, as you know, any other compiler may hide or override this behaviour.

I attach the patch solving the issue.

Thank you.
Additional InformationI'm not sure, but I believe that this piece of code:

if (TOutputImage::ImageDimension != m_NumberOfDimensionsInImage)
{
   validSize[m_NumberOfDimensionsInImage] = 1;
   sliceRequestedRegion.SetSize( m_NumberOfDimensionsInImage, 1 );
   sliceRequestedRegion.SetIndex( m_NumberOfDimensionsInImage, 0 );
}

may be problematic too.
TagsNo tags attached.
Resolution Date
Sprint
Sprint Status
Attached Filesdiff file icon itkImageSeriesReader_overflow_patch.diff [^] (534 bytes) 2009-06-12 19:21 [Show Content]

 Relationships
duplicate of 0009205closedLuis Ibanez Stack corruption while reading an image series with a single file 

  Notes
(0016992)
Luis Ibanez (manager)
2009-07-28 18:16

Added test
Testing/Code/IO/itkDICOMImageSeriesTest2.cxx
to exercise this condition.
(0016994)
Luis Ibanez (manager)
2009-07-28 18:17

We verified this problem by using the new test:
Testing/Code/IO/itkDICOMImageSeriesTest2.cxx
(0016998)
Luis Ibanez (manager)
2009-07-28 18:50

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.


See further information in bug: 9205
which is a duplicate of this one.
(0016999)
Luis Ibanez (manager)
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...
(0017028)
Bradley Lowekamp (developer)
2009-07-31 09:02

Added test to read single image into series reader of different dimension:
http://public.kitware.com/cgi-bin/viewcvs.cgi/Testing/Code/IO/itkImageSeriesReaderDimensionsTest.cxx?cvsroot=Insight&rev=1.1&view=markup [^]

Committed fix:
http://public.kitware.com/cgi-bin/viewcvs.cgi/Code/IO/itkImageSeriesReader.h?root=Insight&r1=1.17&r2=1.18 [^]
http://public.kitware.com/cgi-bin/viewcvs.cgi/Code/IO/itkImageSeriesReader.txx?root=Insight&r1=1.37&r2=1.38 [^]
(0017029)
Bradley Lowekamp (developer)
2009-07-31 09:04

New test seems to be passing on the dash board.

 Issue History
Date Modified Username Field Change
2009-06-12 19:21 Carlos Barrales Ruiz New Issue
2009-06-12 19:21 Carlos Barrales Ruiz File Added: itkImageSeriesReader_overflow_patch.diff
2009-07-06 16:23 Bradley Lowekamp Status new => assigned
2009-07-06 16:23 Bradley Lowekamp Assigned To => Bradley Lowekamp
2009-07-28 18:04 Luis Ibanez Relationship added duplicate of 0009205
2009-07-28 18:16 Luis Ibanez Note Added: 0016992
2009-07-28 18:17 Luis Ibanez Assigned To Bradley Lowekamp => Luis Ibanez
2009-07-28 18:17 Luis Ibanez Note Added: 0016994
2009-07-28 18:17 Luis Ibanez Status assigned => confirmed
2009-07-28 18:50 Luis Ibanez Note Added: 0016998
2009-07-28 18:51 Luis Ibanez Note Added: 0016999
2009-07-28 18:51 Luis Ibanez Status confirmed => resolved
2009-07-28 18:51 Luis Ibanez Resolution open => fixed
2009-07-31 09:02 Bradley Lowekamp Note Added: 0017028
2009-07-31 09:02 Bradley Lowekamp Status resolved => feedback
2009-07-31 09:02 Bradley Lowekamp Resolution fixed => reopened
2009-07-31 09:04 Bradley Lowekamp Note Added: 0017029
2009-07-31 09:04 Bradley Lowekamp Status feedback => resolved
2009-07-31 09:04 Bradley Lowekamp Resolution reopened => fixed
2010-10-21 12:31 Gabe Hart Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team