[Insight-users] vtkview and files converted by ITK

Luis Ibanez luis.ibanez at kitware.com
Fri Oct 15 11:44:54 EDT 2004


Hi Perrine,

The Example

   Insight/Examples/IO/ImageReadWrite.cxx

uses pixel type "unsigned short" in line 87.

I wonder if the pixel type that you need is
"unsigned char". You may want to try changing
the pixel type, recompiling the example and
converting your PNG images again into GIPL
and HDR.


Please let us know if you find any further
problems.


   Thanks


      Luis


-------------------
Perrine Paul wrote:

> Hello,
> I would like to use vtkview from CISG (www.imageregistration.com) to
> non-rigidly register 2 images originally in png.
> So I need to convert my files.
> 
> vtkview accepts .gipl or analyse files (.hdr and .img)
> I tried to used the ITK IO example ImageReadWrite:
> ImageReadWrite myimage.png mynewimage.gipl
> 
> The created file seems to be corrupted: if i tried to read it using
> ImageReadWrite mynewimage.gipl mynewimage.gipl
> description: itk::ERROR: GiplImageIO(0x80901b0): Unknown component type: 0
> 
> I tried the same thing with analyse file
> 
> ImageReadWrite myimage.png mynewimage.hdr
> ImageReadWrite mynewimage.hdr mytest.hdr
> 
> There was no problem when reading the file.
> 
> The problem appeared when I tried to use vtkview with the .hdr:
> vtkCISGAnalyseReader had a problem with the header: unknown pixel type: 132.
> 
> 
> Can you help me?
> How can I convert a png file in a format compatible with CISG vtkview?
> 
> Thanks in advance.
> 
> Perrine
> 






More information about the Insight-users mailing list