[Insight-users] Use of PointSet and VectorContainer in python
Gaëtan Lehmann
gaetan.lehmann at jouy.inra.fr
Sun May 29 16:02:05 EDT 2011
Hi Roel,
Le 27 mai 11 à 11:23, Roel Zinkstok a écrit :
> Hi Matt,
>
> Thanks for your response!
>
> > I am not sure, but Python(x,y) probably uses WrapITK. There is some
> > documentation here, e.g.,
> > http://mima2.jouy.inra.fr/darcs/contrib-itk/WrapITK/WrapITK_-
> > _Enhanced_languages_support_for_the_Insight_Toolkit.pdf
>
> I already have that document, and ik does give a lot of info on
> images but not on pointsets or meshes, unfortunately...
>
> > The easiest way to figure out what is support may be to fire up an
> IPython shell
> > and use the tab completion.
>
> > In [2]: itk.VectorContainer.<TAB>
>
> Using print itk.VectorContainer.keys() gives even more usefull
> information. That shows that Python(x,y) has the following types are
> supported for the VectorContainer:
>
> (<itkCType unsigned int>, <class 'itkLevelSet.itkLevelSetNodeUS3'>),
> (<itkCType unsigned int>, <class 'itkLevelSet.itkLevelSetNodeF3'>),
> (<itkCType unsigned int>, <class 'itkLevelSet.itkLevelSetNodeUC3'>),
> (<itkCType unsigned int>, <class 'itkLevelSet.itkLevelSetNodeUS2'>),
> (<itkCType unsigned long>, <class 'itkVector.itkVectorD3'>),
> (<itkCType unsigned int>, <class 'itkLevelSet.itkLevelSetNodeF2'>),
> (<itkCType unsigned long>, <class 'itkVector.itkVectorD2'>),
> (<itkCType unsigned int>, <class 'itkLevelSet.itkLevelSetNodeUC2'>)
>
> So it seems I cannot use itk.Point for elements in the container. I
> guess that prevents me from building a PointSet then?
> Funny thing is that when I create a Pointset, and then request its
> pointscontainer, I get a pointer to a VectorContainer that is
> templated over Points, if I am not mistaken:
>
> pointset.GetPoints()
>
> results in:
>
> '_80e2a804_p_itk__VectorContainerTunsigned_long_itk__PointTdouble_3u_t_t
> '
>
> I have no clue how to use this pointer though... would that be an
> option?
Unfortunately it means that you can't use it.
This type has not been covered in the WrapITK version used in
Python(x,y).
The next versions of WrapITK are made to ensure that this won't happen.
Regards,
Gaëtan
--
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://voxel.jouy.inra.fr http://www.itk.org
http://www.mandriva.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/20110529/77c849b4/attachment.pgp>
More information about the Insight-users
mailing list