View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004713ITKpublic2007-03-29 06:042007-04-02 14:39
ReporterFucang Jia 
Assigned ToLuis Ibanez 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0004713: BMPImageIO problem when used in ImageSeriesReader
DescriptionWhen I use ImageSeriesReadWrite in Examples/IO to read a series of BMP image files, the program crashed with exception:
itkExceptionMacro("BMPImageIO could not open file: "
                      << this->GetFileName() << " for reading."
                      << std::endl
                      << "Reason: "
                      << itksys::SystemTools::GetLastSystemError());

I saw that it is because the m_Ifstream was not closed when reopen. So when it is closed the problem work.

I added one line "m_Ifstream.close();" at the end of ReadImageInformation function.

added one line at the begin of the Read function
m_Ifstream.open( m_FileName.c_str(), std::ios::in | std::ios::binary );

added comments the m_Ifstream.close(); in the destruction function.
TagsNo tags attached.
Resolution Date
Sprint
Sprint Status
Attached Filescxx file icon itkBMPImageIO_new.cxx [^] (22,775 bytes) 1969-12-31 19:00

 Relationships

  Notes
(0007059)
Luis Ibanez (manager)
2007-04-02 14:39

Thanks for sending the fix.
The code has been committed to CVS:
http://www.itk.org/cgi-bin/viewcvs.cgi/Code/IO/itkBMPImageIO.cxx?root=Insight&sortby=date&r2=1.20&r1=1.19 [^]

 Issue History
Date Modified Username Field Change


Copyright © 2000 - 2018 MantisBT Team