Use EuclideanDistancePointMetric in python itk

wrapping

(Roulbac) #1

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.


(Dženan Zukić) #2

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!


(Matt McCormick) #3

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.


(Roulbac) #4

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


(Dženan Zukić) #5

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


(Roulbac) #6

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?