# Use ANTsRegistration Extension 's QuickSyN get error

**URL:** <https://discourse.slicer.org/t/use-antsregistration-extension-s-quicksyn-get-error/43053>\
**Category:** Development\
**Tags:** registration\
**Created:** [May 23, 2025, 5:21am UTC](https://discourse.slicer.org/t/use-antsregistration-extension-s-quicksyn-get-error/43053 "2025-05-23T05:21:17Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhaokaien](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/zhaokaien/32/80265_2.png) [@zhaokaien](https://discourse.slicer.org/u/zhaokaien)\
**Post date:** [May 23, 2025, 5:21am UTC](https://discourse.slicer.org/t/use-antsregistration-extension-s-quicksyn-get-error/43053/1 "2025-05-23T05:21:17Z")

</div>

Hello,

I’m trying to register two volumes using the **AntsRegistration** plugin. I’ve had no issues when using the **Rigid** and **Affine+Rigid** modes in ANTs. However, I consistently encounter an error when attempting to use **QuickSyN**. The error message is as follows:  
"  
WARNING: In C:\D\P\S-0-build\ITK\Modules\Core\Common\include\itkImageBase.hxx, line 87

Image (000001CB03ED4C70): Negative spacing is not supported and may result in undefined behavior.

Proceeding to set spacing to [-inf, 0.0358951]

C:\D\P\S-0-build\ITK\Modules\ThirdParty\VNL\src\vxl\core\vnl/algo/vnl\_svd.hxx: suspicious return value (2) from SVDC

C:\D\P\S-0-build\ITK\Modules\ThirdParty\VNL\src\vxl\core\vnl/algo/vnl\_svd.hxx: M is 2x2

M = [ …

-inf 0

-nan(ind) 0.0358951193547 ]  
"

I’ve spent a considerable amount of time trying to resolve this, including adjusting **convergence parameters** and **shrink factor parameters** , but I haven’t been able to get past it. I suspect I might be doing something incorrectly, but I’m completely stuck.

Could anyone please offer some assistance?

---

<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:** [May 23, 2025, 5:29am UTC](https://discourse.slicer.org/t/use-antsregistration-extension-s-quicksyn-get-error/43053/2 "2025-05-23T05:29:15Z")

</div>

> [@zhaokaien](#):
>
> Could anyone please offer some assistance?

What are the spacing of your input images (both reference and moving)? The error is related to a nonsensical spacing. Also I am also seeing two dimensions? Are these 2D images you are trying to register?

---

<div class="post-metadata">

**Author:** ![zhaokaien](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/zhaokaien/32/80265_2.png) [@zhaokaien](https://discourse.slicer.org/u/zhaokaien)\
**Post date:** [May 23, 2025, 6:53am UTC](https://discourse.slicer.org/t/use-antsregistration-extension-s-quicksyn-get-error/43053/3 "2025-05-23T06:53:05Z")

</div>

> [@muratmaga](#):
>
> ur input images (both reference and moving)? The error is related to a nonsensical spacing. Also I am also seeing two dimensions? Are these 2D images you are trying to register?

thank you for your replying, the fixed image and the moving image 's spaces are 0.1852mm and 0.1774mm

the full command is  
[VTK] E:/D/SR/Slicer-build/slicer.org/Extensions-33563/SlicerANTs/lib/Slicer-5.9/cli-modules/antsRegistrationCLI.exe --antsCommand --dimensionality 3 --use-histogram-matching 0 --winsorize-image-intensities [0.005,0.995] --float $useFloat --verbose 1 --interpolation Linear --output [$outputBase,$outputVolume] --write-composite-transform 1 --collapse-output-transforms 1 --transform Rigid[0.1] --metric MI[$inputVolume01,$inputVolume02,1,32,Regular,0.25] --convergence [1000x500x250x1,1e-6,10] --smoothing-sigmas 4x3x2x1vox --shrink-factors 12x8x4x2 --transform Affine[0.1] --metric MI[$inputVolume01,$inputVolume02,1,32,Regular,0.25] --convergence [1000x500x250x0,1e-6,10] --smoothing-sigmas 4x3x2x1vox --shrink-factors 12x8x4x2 --transform SyN[0.1,3,0] --metric MI[$inputVolume01,$inputVolume02,1,32,Regular,0.25] --convergence [100x100x70x50x0,1e-6,10] --smoothing-sigmas 5x3x2x1x0vox --shrink-factors 10x6x4x2x1 --inputVolume01 C:/Users/Administrator/AppData/Local/Temp/Slicer/BDDHG\_vtkMRMLScalarVolumeNodeB.nrrd --inputVolume02 C:/Users/Administrator/AppData/Local/Temp/Slicer/BDDHG\_vtkMRMLScalarVolumeNodeC.nrrd --outputVolume C:/Users/Administrator/AppData/Local/Temp/Slicer/BDDHG\_vtkMRMLScalarVolumeNodeD.nrrd --outputCompositeTransform C:/Users/Administrator/AppData/Local/Temp/Slicer/BDDHG\_vtkMRMLTransformNodeBComposite.h5 --useFloat

[VTK] Zero-valued spacing is not supported and may result in undefined behavior.

[VTK] Refusing to change spacing from [1, 1] to [0.0358338, 0]

[VTK]

[VTK]

[VTK] antsRegistrationCLI completed with errors

---

<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:** [May 23, 2025, 3:02pm UTC](https://discourse.slicer.org/t/use-antsregistration-extension-s-quicksyn-get-error/43053/4 "2025-05-23T15:02:55Z")

</div>

Given that these looks like 2D images, you will probably better of trying to run the registration directly from ANTs (e.g., ANTsPy), instead of Slicer. I don’t think if anybody tested antsRegistration implementation in Slicer with 2D data (since we all work with 3D).

---

<div class="post-metadata">

**Author:** ![zhaokaien](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/zhaokaien/32/80265_2.png) [@zhaokaien](https://discourse.slicer.org/u/zhaokaien)\
**Post date:** [May 30, 2025, 2:06am UTC](https://discourse.slicer.org/t/use-antsregistration-extension-s-quicksyn-get-error/43053/5 "2025-05-30T02:06:02Z")

</div>

Hello, I’m not using 2D images. I’m working with 3D data. Specifically, the two volumes I’m using for registration were converted from models into labelmap binary volumes.

---

<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:** [May 30, 2025, 2:44am UTC](https://discourse.slicer.org/t/use-antsregistration-extension-s-quicksyn-get-error/43053/6 "2025-05-30T02:44:55Z")

</div>

Your log shows only two dimensions. So I would double check your data. There is something wrong there…

> [@zhaokaien](#):
>
> change spacing from [1, 1] to [0.0358338, 0]

---

<div class="post-metadata">

**Author:** ![zhaokaien](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/zhaokaien/32/80265_2.png) [@zhaokaien](https://discourse.slicer.org/u/zhaokaien)\
**Post date:** [June 2, 2025, 2:53am UTC](https://discourse.slicer.org/t/use-antsregistration-extension-s-quicksyn-get-error/43053/7 "2025-06-02T02:53:21Z")

</div>

Thank you for your replying！
