Use EuclideanDistancePointMetric in python itk

Hi all,

I need to use the EuclideanDistancePointMetric but it does not come with PyPi’s itk.
I tried compiling itk with Python wrapping but I can’t find the build configuration that wraps that class, which belongs to Registration.Common. I work with itk 4.13.1.
I checked registration/common/wrapping folder and I can’t find a .wrap file for my class of interest.
Does it work if i write its .wrap file? If so, any guidelines on how to write such a .wrap file? Maybe I can contribute it to the repo if it works properly.
If that’s not the fix, please let me know what is.

It should work if you write .wrap file. The usual way is to find a similar class, and use its .wrap file as a starting point. Contributions are welcome!

Hi @Roulbac,

It is recommended to use the awesome new itk.PointSetToPointSetMetricv4 classes, which are already wrapped in Python, instead of the older v3 classes.

I tried, but it seems that there is no PointSetToPointSetRegistrationMethodv4, not even in C++ ITK.
My goal here is to register point clouds.

The class is called Metric, not Method. Here is a link to a concrete implementation’s documentation.

Thanks for the quick responsiveness.
Initially I was going to use the metric with the PointSetToPointSetRegitrationMethod here.
Isn’t that how ITK registration works? Pick a registration method, set a metric, an optimizer and an initial transform then let it run?
I’m confused, how am I supposed to use PointSetToPointSetMetricv4 then?

1 Like