Hello all,
I am trying to implement a deformable registration for two pointsets in python-itk.
Being a newbie I started with the itk.PointSetToPointSetRegistrationMethod
, but got stuck when trying to set the metric for it (registration.setMetric(metric)
), getting the following error:
TypeError: in method 'itkPointSetToPointSetRegistrationMethodREGF3F3_SetMetric', argument 2 of type 'itkPointSetToPointSetMetricPSF3 *
Following this blog post I used this metric:
‘registration_method = itk.PointSetToPointSetRegistrationMethod.REGF3F3.New()’
when it didn’t work I kind of brute forced through every PointSet to PointSet metric defined here:
metric = itk.PointSetToPointSetMetric[type(fixed_set), type(fixed_set)].New()
metric = itk.PointSetToPointSetMetricv4[type(fixed_set)].New()
metric = itk.PointSetToPointSetMetricWithIndexv4[type(fixed_set)].New()
metric = itk.ExpectationBasedPointSetToPointSetMetricv4[type(fixed_set)].New()
metric = itk.EuclideanDistancePointSetToPointSetMetricv4[type(fixed_set)].New()
Am I doing something wrong or should I maybe use a different registration method?
In addition, I have trouble to decide which optimizer I should use.
I would be thankful for any help.
Backstory:
I want to register two stl-objects (S_sphere.stl and S_ellipsoid.stl). The code I have so far is in the testfile.py file.
testfile.py (1.5 KB)
S_ellipsoid.stl (82.1 KB)
S_sphere.stl (82.1 KB)