[Insight-users] Re: vtkview and files converted by ITK

Luis Ibanez luis.ibanez at kitware.com
Tue Oct 19 10:21:56 EDT 2004


Hi Paul,


I'm affraid that you will require the assistance of the
team that developed vtkview at (www.imageregistration.com).
As you probably know, this project is unrelated to ITK.


If you want to perform registration with ITK code you can
look at the examples on rigid registration illustrated in
the ITK Software Guide.

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


All the source code for those examples is available under

              Insight/Examples/Registration


For Rigid Registration of 2D images you may want to take
a close look to the example:

        Insight/Examples/Registration/
                     ImageRegistration5.cxx

This example is described in detail in the ITK Software Guide
in Section 8.5.1, "Rigid Registration in 2D", pdf-pages 263-272.

You run this example by simply providing in the command line
the filenames of the two images to be registeres, and the
filename to be used for saving the resampled registered image.



Please let us know if you have any further questions,


     Thanks


       Luis



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

> Hello Luis,
> I have changed the unsigned short pixel type in unsigned char.
> The results are:
> For GIPL, I have the same problem when I tried to read again the file I
> created with unsigned char. 
> ImageReadWrite mynewimage.gipl mynewimage.gipl
> I have the same error:
> itk::ExceptionObject (0x8092ee0)
> Location: "Unknown"
> File: /usr/local/src/InsightToolkit-1.8.0/Code/IO/itkImageIOBase.cxx
> Line: 121
> Description: itk::ERROR: GiplImageIO(0x80929c8): Unknown component type:
> 0
> 
> For Analyse:
> Vtkview accepts to read and dispaly these analyse files, but when I want
> to perform registration:
>  
> Start registration: ERROR: In
> /staff/th04/project/linux/vtkCISG/objects/library/CISGRegistration/vtkC
> ISGRegistration.cxx, line 778
> vtkCISGFFDRegistration (0x804f1b8): ::Run: target must be SHORT image
> 
> Thank you for your help.
> 
> On Fri, 15 Oct 2004 17:19:17 +0200
> "Perrine Paul" <perrine.paul at chu-rennes.fr> 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
>>
>>-- 
>>Perrine PAUL - PHD student
>>+33 2 23 23 49 93
>>Laboratoire IDM, UPRES 3192
>>Université de Rennes 1, Faculté de médecine
>>http://idm.univ-rennes1.fr
> 
> 
> 






More information about the Insight-users mailing list