[Insight-users] Load Vector Image with itk-Python

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Tue Jun 21 14:15:59 EDT 2011


Hi,

Le 21 juin 11 à 17:52, Oscar Esteban a écrit :

> Hi all,
>
> I'm trying to load a 62 component vector image with itk using the  
> Python wrapping. I executed this:
>
> 1: import itk
> 2: r = itk.ImageFileReader.VIUS3.New( FileName='DTI.nii.gz' )

can you run

   r.Update()
   print r

at this point, and give us the result?

> 3: im = r.GetOutput()
> 4: im.SetVectorLength(62)
> 5: w = itk.ImageFileWriter.VIUS3.New( im, FileName='test.nii.gz' )
> 6: w.Update()
>
> I also tried with im.SetNumberOfPixelCompoents( 62 )
>
>  But test.nii.gz only contains 1 component (and, I think it is  
> written as if it were a 62-component file).
>

can you show us the header of that file, or even better, the actual  
file?

> How should I configure the FileReader to get the 62 components?

It should read the image with the right number of components...

Regards,

Gaëtan


> How should I add new components?
>
> thanks. Best Regards,
>
> Oscar Esteban
>
>
> ______________________________________
> Oscar Esteban
> PhD Student / Researcher
> Biomedical Image Technologies (Universidad Politécnica de Madrid)
>
> ETSI Telecomunicación (Lab. C203)
> Av. Complutense s/n - E-28040 Madrid (Spain)
> +34 915 495 700 ext.4234
> +34 659 639 123
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users

-- 
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
http://mima2.jouy.inra.fr  http://www.itk.org
http://www.bepo.fr

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 203 bytes
Desc: Ceci est une signature ?lectronique PGP
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110621/9a7440fb/attachment.pgp>


More information about the Insight-users mailing list