[Insight-users] Use of PointSet and VectorContainer in python

Roel Zinkstok rzinkstok at gmail.com
Fri May 27 05:23:01 EDT 2011


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?


Roel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110527/3826b968/attachment.htm>


More information about the Insight-users mailing list