[Insight-users] ImageReadWrite.cxx Error Message
ExceptionObjectcaught !
Iván Macía
imacia at vicomtech.es
Mon Sep 4 11:06:49 EDT 2006
Hi Jörg,
Your problem has nothing to do with the configuration process. Try to change
the pixel type in the ImageReadWrite example in this line
typedef short PixelType;
to
typedef unsigned short PixelType
or
typedef unsigned char PixelType
The exception is saying that you cannot save a png image with a pixel type
different from unsigned short or unsigned char and you are using pixels of
type short here. Another option is to change the type of input and/or output
image and not use png.
Best regards
Iván
-----Mensaje original-----
De: insight-users-bounces+imacia=vicomtech.es at itk.org
[mailto:insight-users-bounces+imacia=vicomtech.es at itk.org] En nombre de
"Jörg P.Pfannmöller"
Enviado el: lunes, 04 de septiembre de 2006 16:10
Para: insight-users at itk.org
Asunto: [Insight-users] ImageReadWrite.cxx Error Message
ExceptionObjectcaught !
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/itkPNGI
mageIO.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
_______________________________________________
Insight-users mailing list
Insight-users at itk.org
http://www.itk.org/mailman/listinfo/insight-users
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.11.7/436 - Release Date: 01/09/2006
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.11.7/436 - Release Date: 01/09/2006
More information about the Insight-users
mailing list