[Insight-users] ImageReadWrite.cxx Error Message ExceptionObject caught !

"Jörg P.Pfannmöller" J.Pfannmoeller at gmx.de
Mon Sep 4 10:10:26 EDT 2006


Hello,

I have compiled ITK and ITK-Snap. The HelloWorld program compiled and everything with ITK-Snap is ok. Now I am trying to pass some of the examples from the software guide. I did not compile the tests, the examples and the shared libs when I was compiling ITK. ccmake looked like that:

BUILD_EXAMPLES = OFF
BUILD_TESTING = OFF
BUILD_SHARED_LIBS = OFF
CMAKE_BUILD_TYPE = Release

Now, I have copied the ImageReadWrite.cxx into a seperate directory away from the ITK directory tree. I also created a CMakeLists.txt with the content:

PROJECT(ImageReadWrite)

# Find ITK.
FIND_PACKAGE(ITK)
IF(ITK_FOUND)
  INCLUDE(${ITK_USE_FILE})
ELSE(ITK_FOUND)
  MESSAGE(FATAL_ERROR
          "Cannot build without ITK.  Please set ITK_DIR.")
ENDIF(ITK_FOUND)

ADD_EXECUTABLE(ImageReadWrite ImageReadWrite.cxx )
TARGET_LINK_LIBRARIES(ImageReadWrite ITKCommon ITKIO)

The ccmake options have been:

 CMAKE_BACKWARDS_COMPATIBILITY    2.4                                                            
 CMAKE_BUILD_TYPE                 Release                                                        
 CMAKE_INSTALL_PREFIX             /usr/local                                                     
 EXECUTABLE_OUTPUT_PATH           /home/pfannmoe/Sourcen/workdir/dki-gf-detect/Insight/joerg-bin/
 ITK_DIR                          /home/pfannmoe/Sourcen/workdir/dki-gf-detect/Insight/bin/ITK   
 LIBRARY_OUTPUT_PATH                                                                          
/home/pfannmoe/Sourcen/workdir/dki-gf-detect/Insight/joerg-bin/

I would say that this is okay. The compilation process worked without any problem, but the program does not work properly. When I execute a strange mistake is printed out:

./ImageReadWrite a.png b.png

ExceptionObject caught !

itk::ExceptionObject (0x84589e8)
Location: "Unknown" 
File: /home/pfannmoe/Sourcen/workdir/dki-gf-detect/Insight/src/ITK/Code/IO/itkPNGImageIO.c
Line: 473
Description: PNG supports unsigned char and unsigned short

I really don't know what went wrong. Can somebody help me?

So long pfannmoe


-- 
**********************************************************
Jörg P.Pfannmöller                                
In der Köhlertanne 56
64295 Darmstadt  

Telnr.:+491714615381                          
Homepage: www.pfannmoeller.de.vu                      
GnuPG KeyID: B7CA2E9F
**********************************************************

Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer


More information about the Insight-users mailing list