python example for point set not working with itk 5.0.1

I’m trying to create a point set and I followed the python example here, but there is some “type errors” :

itkTemplate.TemplateTypeError: itk.PointSet is not wrapped for input type `itk.F, int, itk.DefaultStaticMeshTraits[itk.F,2] 

I manage to get a working piece of code for creating a meshtrait:

PixelType = itk.F
Dimension = 2

MeshTraits = itk.DefaultStaticMeshTraits[PixelType, Dimension, Dimension]

PointSetType = itk.PointSet[PixelType, Dimension, MeshTraits]

I changed the MeshTraits grid to:

MeshTraits = itk.DefaultStaticMeshTraits[PixelType, Dimension]
PointSetType = itk.PointSet[PixelType, Dimension]

I guess the documentation is wrong on this point compared to what is compiled.

Am I doing right ?

Yes, the point set wrapping was simplified for ITK 5, but the website has not yet been updated.

Correct!

This has been updated in the repository:

Thanks for the report – we will update the website next week.

1 Like