[Insight-users] debug with imagefilereader

Luis Ibanez luis.ibanez at kitware.com
Wed Jan 25 10:04:27 EST 2006


Hi Wang,

Please add a try/catch block around the Update() call
on your reader.


This is illustrated in many examples in the ITK Software Guide,

        http://www.itk.org/ItkSoftwareGuide.pdf


in particular in the "Reading and Writing Images" Chapter.



The most common reason for the exception to be thrown is
when you pass a filename for which the ImageFileReader cannot
find a corresponding file format.


The message returned by the exception will tell you what
the actual problem is.


Please refer to the ITK Software Guide and to the Wiki FAQ
http://www.itk.org/Wiki/ITK_FAQ#What_3D_file_formats_can_ITK_import_and_export.3F
for a full list of the file formats (and extensions) supported
in ITK.



    Regards,



        Luis



=======================
#WANG ZHIMIN# wrote:
> Hi,
> 
>  
> 
> When I debug my program, just a simple one with image file name and reader,
> 
>  
> 
> I got the following debug exception:
> 
>  
> 
> Unhandled exception at 0x7c81eb33 in myTest.exe: Microsoft C++ 
> exception: itk::ImageFileReaderException @ 0x0117f688.
> 
>  
> 
> And the cursor stops at
> 
>  
> 
> // Test if the file can be open for reading access.
> 
> std::ifstream readTester;
> 
>  
> 
>  
> 
> May I know the reason or mechanism behind this?
> 
>  
> 
> Thanks.
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users



More information about the Insight-users mailing list