Hi all,<br><br>I'm trying to set the points in a PointSet with a code like:<br><br>pointType = itk.Point[itk.D , dim]<br>pointSetType = itk.PointSet[ itk.D, dim, traitstype ]<br>pointSet = pointSetType.New()<br>p0 = pointType()<br>
p0.SetElement(0,-1)<br>p0.SetElement(1,0)<br>p0.SetElement(2,0)<br>points = (p0,p1)<br>pointSet.SetPoints( cont )<br><br>Doubt 1: Is there any way to set the values of the points in a unique line, something like [-1,0,0]<br>
Doubt 2: With such code, I get this error:<br> File "/usr/lib/WrapITK/lib/itkPointSet.py", line 1207, in SetPoints<br> def SetPoints(*args): return _itkPointSet.itkPointSetD3S_Pointer_SetPoints(*args)<br>
TypeError: Expected a pointer<br><br>Looking in the documentation, the points are stored in a PointsContainer, that in this case should be a<br>VectorContainer. But If I try to create a VectorContainer like this: cont = itk.VectorContainer[pointType],<br>
I get this error:<br> File "/usr/lib/WrapITK/Python/itkTemplate.py", line 215, in __getitem__<br> raise KeyError, 'itkTemplate : No template %s for the %s class' % (str(parameters), self.__name__)<br>
KeyError: "itkTemplate : No template [<class 'itkPoint.itkPointD3'>] for the itk::VectorContainer class"<br><br>Best regards,<br>Carlos<br>