Skip to content

Registration does not run, no error #1866

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
gkroesc opened this issue Apr 3, 2025 · 4 comments
Open

Registration does not run, no error #1866

gkroesc opened this issue Apr 3, 2025 · 4 comments

Comments

@gkroesc
Copy link

gkroesc commented Apr 3, 2025

Operating system and version

Windows 10 Pro

CPU architecture

x86_64 (PC, Intel Mac, other Intel/AMD)

ANTs code version

2.5.4-g8d891c2

ANTs installation type

Downloaded Github release binaries

Summary of the problem

I am trying to run antsRegistration, and it seems like it is working, however there is no output. I am trying to do a more complicated registration, but I have simplified it down to a pretty basic command just to see if I can get it working, and so far I have not been successful. Here is my registration call:

antsRegistration --output [\path\to\output\output_prefix, \path\to\output\output_image.nii.gz] --dimensionality 3 --float 1 --interpolation Linear --winsorize-image-intensities [0.005,0.995] --use-histogram-matching 0 --transform Rigid[0.1] --metric MI[\path\to\input\reference_image.nii.gz,\path\to\input\moving_image.nii.gz,1,32,Regular,0.25] --convergence [500x250] --shrink-factors 12x8 --smoothing-sigmas 4x3vox

It seems like it is working initially because I get the first few lines of output that resembles what the it looks like when I have gotten it to work on other workstations (see below) but then it just stops and the command line pops back up. It does not show any actual progress of any warping and there are no files with the output prefix at the output path specified. I even tried making synthetic 50x50x50 images (which I have included below for reference) to make sure it is not a memory issue and even with these <100 KB files it still fails. I also have been monitoring the task manager while running the call, and although I can see antsRegistration.exe pop up in the details window briefly it does not appear there is anything obvious causing a massive surge in memory usage or anything that could be causing the failure.

I have not been able to produce any error code when running from the command line, it just runs as if it were working, and then randomly stops and there is no output. I have one other clue because I originally am running the call through a python script, and the error I get within the python script comes back as flag -1073741819, not sure if this is helpful or not.

Commands to reproduce the problem.

antsRegistration --output [\path\to\output\output_prefix, \path\to\output\output_image.nii.gz] --dimensionality 3 --float 1 --interpolation Linear --winsorize-image-intensities [0.005,0.995] --use-histogram-matching 0 --transform Rigid[0.1] --metric MI[\path\to\input\reference_image.nii.gz,\path\to\input\moving_image.nii.gz,1,32,Regular,0.25] --convergence [500x250] --shrink-factors 12x8 --smoothing-sigmas 4x3vox

Output of the command with verbose output.

All_Command_lines_OK
Using single precision for computations.
number of levels = 2
fixed image: \path\to\input\reference_image.nii.gz
moving image: \path\to\input\moving_image.nii.gz

This is all of the output that I get and then the command line reappears

Data to reproduce the problem

moving_image.nii.gz

fixed_image.nii.gz

@gdevenyi
Copy link
Contributor

gdevenyi commented Apr 3, 2025

Add --verbose

@cookpa
Copy link
Member

cookpa commented Apr 4, 2025

This script works for me

antsRegistration -r [reference_image.nii.gz,moving_image.nii.gz,1] --output [output_prefix, output_image.nii.gz] --dimensionality 3 --float 1 --interpolation Linear --winsorize-image-intensities [0.005,0.995] --use-histogram-matching 0 --transform Rigid[0.1] --metric MI[reference_image.nii.gz,moving_image.nii.gz,1,32,Regular,0.25] --convergence [500x250] --shrink-factors 2x1 --smoothing-sigmas 1x0vox --verbose

I added an initial transform and changed the shrink factors to something sensible.

The exit code returned from Python, decimal -1073741819, is an access violation (0xC0000005). This could have a variety of causes.

Does it work with the addition of -r [reference_image.nii.gz,moving_image.nii.gz,1]

@gkroesc
Copy link
Author

gkroesc commented Apr 8, 2025

@gdevenyi Sorry I should have been more clear, the output I posted is with the verbose argument added.

@cookpa Thanks for the suggestion, but unfortunately all the addition of -r [reference_image.nii.gz,moving_image.nii.gz,1] does is remove the bottom three lines of the output from the original post. (now all it says is

All_Command_lines_OK
Using single precision for computations.

I figured out it is definitely something to do with the workstation because I got the same exact code to work on a different computer. Thank you all for the suggestions.

@cookpa
Copy link
Member

cookpa commented Apr 8, 2025

Good to know, thanks. Was the other machine running the same OS?

Some users have needed to install libraries for Windows (#1786)

https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170#visual-studio-2015-2017-2019-and-2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants