# slicerMorph - ALPACA registration error in open3d

**URL:** <https://discourse.slicer.org/t/slicermorph-alpaca-registration-error-in-open3d/22908>\
**Category:** SlicerMorph\
**Tags:** extensions-manager, slicermorph\
**Created:** [April 11, 2022, 2:22pm UTC](https://discourse.slicer.org/t/slicermorph-alpaca-registration-error-in-open3d/22908 "2022-04-11T14:22:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![MrMarkus](https://avatars.discourse-cdn.com/v4/letter/m/71e660/32.png) [@MrMarkus](https://discourse.slicer.org/u/MrMarkus)\
**Post date:** [April 11, 2022, 2:22pm UTC](https://discourse.slicer.org/t/slicermorph-alpaca-registration-error-in-open3d/22908/1 "2022-04-11T14:22:39Z")

</div>

Operating system: Windows 10  
Slicer version: 4.11.20210226 r29738 / 7a593c8

**Expected behavior:**  
I am trying to redo an example of the SlicerMORPH workshop ([S\_2020/README.md at master · SlicerMorph/S\_2020 · GitHub](https://github.com/SlicerMorph/S_2020/blob/master/Lab_ALPACA/README.md)). Data can be loaded in the ALPACA module, the “subsampling” step works too, and the points are visualized. Next the “rigid alignment” should work.

**Actual behavior:**  
But the “rigid alignment” does not work / start. Instead the following errors is shown:

Traceback (most recent call last):  
File “C:/Program Files/SlicerVersions/Slicer 4.11.20210226/NA-MIC/Extensions-29738/SlicerMorph/lib/Slicer-4.11/qt-scripted-modules/ALPACA.py”, line 513, in onAlignButton  
self.transformMatrix = logic.estimateTransform(self.sourcePoints, self.targetPoints, self.sourceFeatures, self.targetFeatures, self.voxelSize, self.skipScalingCheckBox.checked, self.parameterDictionary)  
File “C:/Program Files/SlicerVersions/Slicer 4.11.20210226/NA-MIC/Extensions-29738/SlicerMorph/lib/Slicer-4.11/qt-scripted-modules/ALPACA.py”, line 1048, in estimateTransform  
parameters[“distanceThreshold”], parameters[“maxRANSAC”], parameters[“maxRANSACValidation”], skipScaling)  
File “C:/Program Files/SlicerVersions/Slicer 4.11.20210226/NA-MIC/Extensions-29738/SlicerMorph/lib/Slicer-4.11/qt-scripted-modules/ALPACA.py”, line 1147, in execute\_global\_registration  
], registration.RANSACConvergenceCriteria(maxIter, maxValidation))  
TypeError: registration\_ransac\_based\_on\_feature\_matching(): incompatible function arguments. The following argument types are supported:  
1. (source: open3d.open3d\_pybind.geometry.PointCloud, target: open3d.open3d\_pybind.geometry.PointCloud, source\_feature: open3d::registration::Feature, target\_feature: open3d::registration::Feature, max\_correspondence\_distance: float, estimation\_method: open3d.open3d\_pybind.registration.TransformationEstimation = registration::TransformationEstimationPointToPoint without scaling., ransac\_n: int = 4, checkers: List[open3d.open3d\_pybind.registration.CorrespondenceChecker] = [], criteria: open3d.open3d\_pybind.registration.RANSACConvergenceCriteria = registration::RANSACConvergenceCriteria class with max\_iteration=100000, and max\_validation=100) → open3d.open3d\_pybind.registration.RegistrationResult

As an information:

- List item Extension “Sandbox” is not installed since it can´t be found in the extension manager

- List item the “Auto3dgm” module works fine.

Any idea how to solve this issue?

THANKS!!!

Best,  
Markus

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [April 12, 2022, 12:45am UTC](https://discourse.slicer.org/t/slicermorph-alpaca-registration-error-in-open3d/22908/2 "2022-04-12T00:45:29Z")

</div>

> [@MrMarkus](#):
>
> TypeError: registration\_ransac\_based\_on\_feature\_matching(): incompatible function arguments. The following argument types are supported:

This is due to a change in open3d (library we use for point cloud registration) versions. If you uninstall and reinstall SlicerMorph, this should be fixed (it should automatically update the open3d to the correct version).

Let us know if that doesn’t help.

---

<div class="post-metadata">

**Author:** ![MrMarkus](https://avatars.discourse-cdn.com/v4/letter/m/71e660/32.png) [@MrMarkus](https://discourse.slicer.org/u/MrMarkus)\
**Post date:** [April 12, 2022, 10:30am UTC](https://discourse.slicer.org/t/slicermorph-alpaca-registration-error-in-open3d/22908/3 "2022-04-12T10:30:41Z")

</div>

Hi,

I deinstalled:

- List item slicerMorph

- List item 3dgm

Now I try to perform the registration without the 3dgm model, which must fail since  
the module is not installed.

The error message is identical:

File “C:/Program Files/SlicerVersions/Slicer 4.11.20210226/NA-MIC/Extensions-29738/SlicerMorph/lib/Slicer-4.11/qt-scripted-modules/ALPACA.py”, line 513, in onAlignButton  
self.transformMatrix = logic.estimateTransform(self.sourcePoints, self.targetPoints, self.sourceFeatures, self.targetFeatures, self.voxelSize, self.skipScalingCheckBox.checked, self.parameterDictionary)  
File “C:/Program Files/SlicerVersions/Slicer 4.11.20210226/NA-MIC/Extensions-29738/SlicerMorph/lib/Slicer-4.11/qt-scripted-modules/ALPACA.py”, line 1048, in estimateTransform  
parameters[“distanceThreshold”], parameters[“maxRANSAC”], parameters[“maxRANSACValidation”], skipScaling)  
File “C:/Program Files/SlicerVersions/Slicer 4.11.20210226/NA-MIC/Extensions-29738/SlicerMorph/lib/Slicer-4.11/qt-scripted-modules/ALPACA.py”, line 1147, in execute\_global\_registration  
], registration.RANSACConvergenceCriteria(maxIter, maxValidation))  
TypeError: registration\_ransac\_based\_on\_feature\_matching(): incompatible function arguments. The following argument types are supported:  
1. (source: open3d.open3d\_pybind.geometry.PointCloud, target: open3d.open3d\_pybind.geometry.PointCloud, source\_feature: open3d::registration::Feature, target\_feature: open3d::registration::Feature, max\_correspondence\_distance: float, estimation\_method: open3d.open3d\_pybind.registration.TransformationEstimation = registration::TransformationEstimationPointToPoint without scaling., ransac\_n: int = 4, checkers: List[open3d.open3d\_pybind.registration.CorrespondenceChecker] = [], criteria: open3d.open3d\_pybind.registration.RANSACConvergenceCriteria = registration::RANSACConvergenceCriteria class with max\_iteration=100000, and max\_validation=100) → open3d.open3d\_pybind.registration.RegistrationResult

For my understanding:

- List item _open3d_
- List item _auto3dgm_

are two different modules / functions?

Thanks.

Best,  
Markus

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [April 12, 2022, 4:02pm UTC](https://discourse.slicer.org/t/slicermorph-alpaca-registration-error-in-open3d/22908/4 "2022-04-12T16:02:53Z")

</div>

> [@MrMarkus](#):
>
> I deinstalled:
> 
> - List item slicerMorph
> - List item 3dgm
> 
> Now I try to perform the registration without the 3dgm model, which must fail since  
> the module is not installed.

First off, Auto3Dgm has nothing to do with a ALPACA. They are separate modules and they do not work together or depend each other. They serve different functions as well.

There is currently an issue with the stable and open3d. If you want to use ALPACA, you have to options:

1. Download a preinstalled stable from this link and use as is, without updating anything. (I.e., just uncompress the zip file and run Slicer) [https://app.box.com/shared/static/xziombnoti3jbrc8hqp236v95ghcz2c2.zip](https://app.box.com/shared/static/xziombnoti3jbrc8hqp236v95ghcz2c2.zip)

2. Use the latest preview version and install SlicerMorph.

---

<div class="post-metadata">

**Author:** ![MrMarkus](https://avatars.discourse-cdn.com/v4/letter/m/71e660/32.png) [@MrMarkus](https://discourse.slicer.org/u/MrMarkus)\
**Post date:** [April 13, 2022, 9:36am UTC](https://discourse.slicer.org/t/slicermorph-alpaca-registration-error-in-open3d/22908/5 "2022-04-13T09:36:03Z")

</div>

Hi,

- List item preinstalled stable Slicer works; slicerMorph and ALPACA are running too; in the Extension there is also now the **SandBox** extension installed! Previously SandBox was not available in the ExtensionManager

- List item slicerMorph is not available in the ExtensionManager of the the latest preview version of 3DSlicer

For now I will work with the precompiled version of Slicer; as long as slicerMorph is not available for the latest preview version.

Best,  
Markus

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [April 13, 2022, 1:53pm UTC](https://discourse.slicer.org/t/slicermorph-alpaca-registration-error-in-open3d/22908/6 "2022-04-13T13:53:04Z")

</div>

> [@MrMarkus](#):
>
> List item slicerMorph is not available in the ExtensionManager of the the latest preview version of 3DSlicer

The extension had not yet completed its nightly build on the Windows platform. The build for it was started approximately 21 minutes after your post here at 9:57 UTC. SlicerMorph is one of the last extensions built for the night. Something SlicerMorph has knowledge about it and has created [Remove SlicerMorph dependencies but provide a convenient mechanism to install those extensions · Issue #195 · SlicerMorph/SlicerMorph · GitHub](https://github.com/SlicerMorph/SlicerMorph/issues/195).
