[Insight-users] ExceptionObject error while saving as VTK

Luis Ibanez luis.ibanez at kitware.com
Fri, 09 Apr 2004 17:39:29 -0400


Hi Mohammed,

In order to use the ImageReadWriteVTK example
outside of the Insight/Examples/IO directory
you can simply follow the instructions on the
Tutorials

   http://www.itk.org/HTML/Tutorials.htm

In particular the instructions for configuring
your first application as given in

http://www.itk.org/CourseWare/Training/GettingStarted-I.pdf


Note that you *don't* need VTK for this particular
example. ITK has a VTKImageIO writer and it is
the one used in this particular example.


You will find similar instructions for
configuring a project that depends on ITK,
in the SoftwareGuide

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

Section 2.2, pdf-page 42.  The only thing you
need to change is to add the ITKIO library in
the TARGET_LINK_LIBRARIES() command of your
CMakeLists.txt file.



   Regards,


     Luis



----------------------
Alam, Mohammed wrote:

> Hello,
> 
>  
> 
> I was able to compile the example you mentioned.
> 
>  
> 
> Now the next step is to use this example as an independent application. 
> Please guide to achieve this. I have copied the vtk from 
> ITK_Application/Auxillary, but the problem is how to change the cmake 
> file to locate the ITKImageFileWriter.h  and ItkVtkImageIO.h, which are 
> needed in order to generate a 3D VTK object.
> 
>  
> 
> Best Wishes
> 
>  
> 
> -----Original Message-----
> *From:* Kaur, Gulsheen [mailto:gkaur at neurosurgery.wayne.edu]
> *Sent:* Monday, March 22, 2004 4:39 PM
> *To:* insight-users at itk.org
> *Subject:* [Insight-users] ExceptionObject error while saving as VTK
> 
>  
> 
>  
> 
> Hello,
> 
>  
> 
> I am trying to build an independent application using some ITK 
> functionalities. One of that is saving the image as VTK. To start with, 
> I tried running one of the examples under Examples/IO/ImageReadExportVTK.cxx
> 
>  
> 
> But am not successful in executing the same. I tried various kinds of 
> input images (jpeg, png, ...) and even different paths for the image but 
> always got the same exception error  "itk::ImageFileReaderException"  
> "Location:Unknown"
> 
>  
> 
> Please let me know the format for the input image.
> 
>  
> 
> Also, what should be done to use this example with the independent 
> application?
> 
> Best Wishes,
> Gulsheen Kaur
> 
>  
>