[Insight-users] Can't create PoinSet type - WrapITK Python

Carlos Moro cfmoro at gmail.com
Sun Jul 5 16:15:36 EDT 2009


Hi!

I'm trying to create a PointSet type with the following code:

import itk
pixelType = itk.US
dimension = 3
PointSetType = itk.PointSet[pixelType, dimension]

But I get the following error:

Traceback (most recent call last):
  File "PointSet1.py", line 53, in <module>
    PointSetType = itk.PointSet[pixelType, dimension]
  File "/usr/lib/WrapITK/Python/itkTemplate.py", line 215, in __getitem__
    raise KeyError, 'itkTemplate : No template %s for the %s class' %
(str(parameters), self.__name__)
KeyError: 'itkTemplate : No template (<itkCType unsigned short>, 3) for the
itk::PointSet class'

Looking at WrapITK/lib/itkPointSet.py, there are definitions like
itkPointSetD3D:
   def __repr__(self):
        return "<C
itk::PointSet<(double,3u,itk::DefaultDynamicMeshTraits<(double,3u,3u,double,float,double)>)>
instance at %s>" % (self.this,)
... but I can't figure out how to template them .

I'm using ubuntu + paulnovo.org packages with WrapITK.

Best regards,
Carlos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090705/23794e6e/attachment.htm>


More information about the Insight-users mailing list