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

Oscar Esteban oesteban at die.upm.es
Tue Jun 21 11:52:23 EDT 2011


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' )
> 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).

How should I configure the FileReader to get the 62 components?
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110621/0d616a52/attachment.htm>


More information about the Insight-users mailing list