[Insight-users] Reading TIFF

Luis Ibanez luis.ibanez at kitware.com
Tue, 27 Jan 2004 07:22:54 -0500


Hi Swati,

What version of ITK are you using ?

The TIFF ImageIO class was added only
recently (Nov 25 2003). It may be that
your version is previous to this addition.
For example, if you are using ITK 1.4, the
tiff reader/writer will not be available.

Have you set a try/catch block around
the Update() call ?

The message from the exception will
help you figure out the source of the
error.


I just verified using:

  Insight/Examples/IO/RGBImageReadWrite.cxx

and works fine for converting the image:

  Insight/Examples/Data/VisibleWomanEyeSlice.png

into

   VisibleWomanEyeSlice.tif

or

   VisibleWomanEyeSlice.tiff


No modifications are needed in the
RGBImageReadWrite.cxx file.


Regards,


    Luis


-------------------
Swati Mital wrote:

> I am trying to read/write a tiff file using itkFileReader as in 
> RGBReadWrite.cxx example.  The program throws exception when trying to 
> Update() writer.  Basically, m_input and m_output values of the Smart 
> Pointer are not being set.
>  
> I tried alternatively by reading the TIFF file using libtiff and then 
> importing the data into ITK data structures.  It seems to be working 
> fine, but when I call SetInput on a pointer in order to load the image 
> data it doesn't work.
>  
> I think the problem lies in configuring the toolkit using CMake.  I may 
> have missed to turn on some option.  Can anyone please let me know what 
> are the minimum options required to get the examples in the IO directory 
> of the toolkit working?
>  
> Thank you
> Swati
> 
>