Why does an `itk::PointSet` have "PointData"? Any existing use cases?

Obviously, itk::PointSet has a container of points (m_PointsContainer), but it also may have some extra data, named “PointData”, and stored in its m_PointDataContainer.

As was introduced by @willschroeder, more than 23 years ago:

Can anyone please tell me some existing use cases of these “PointData”?

It could be per-vertex color, or some other per-vertex measurement (thickness, curvature, strain, metabolic activity, etc).

1 Like

Thanks @dzenanz Are there any examples like that in practice? I’m interested to know how people are actually using the PointData of a PointSet.

Your reply suggests that PointSet::m_PointDataContainer typically has one element per point, right? In code: m_PointDataContainer->size() == m_PointsContainer->size()

Here is an example of it being used to hold cartilage thickness:

1 Like

Earlier in the same file, being set in ITK mesh:

1 Like

It’s in the B-spline fitting filter I wrote. It can be used to create B-spline objects of an arbitrary number of parametric dimensions and an arbitrary number of data dimensions. Each point represents a location in the parametric (Point) domain and the corresponding PointData represents the data associated with that point.

So, for example, the B-spline filter is used in N4 where the scalar bias field values are the 1-D PointData at their image (i.e. parametric) locations. In contrast, the B-spline SyN image method also uses the B-spline filter where the displacement vectors are the n-D PointData at the image locations.

2 Likes

@dzenanz @ntustison Thank you very much for your examples. So clearly the point data doesn’t always just contain pixel values. (Even though the point data container is defined as a container of pixel values: ITK/Modules/Core/Common/include/itkDefaultStaticMeshTraits.h at master · InsightSoftwareConsortium/ITK · GitHub)

I wanted to know this because we are considering to add PointSet support to the library interface of elastix But before doing so, I would like to know how it is actually being used, in practice :smiley:

Yes, in PointSet, PixelType is a placeholder for a name. It is essentially a per-vertex arbitrary data type, at least in C++.

1 Like

Thanks! Do you agree that it also happens in practice that a PointSet does not need any PointData at all? I’m considering to submit another pull request that would allow instantiating a PointSet<void> (TPixelType = void), to indicate that a certain pointset never has any PointData.

But first I hope we can figure out how to fix those Windows.Python SWIG errors from PointSetBase!

Yes, this makes sense!

1 Like