ANTsX / ANTs

Advanced Normalization Tools (ANTs)
Apache License 2.0
1.2k stars 381 forks source link

ANTs registration output file #1580

Closed seokjin9804 closed 11 months ago

seokjin9804 commented 1 year ago

Describe the problem

I'm using windows and following below tutorials. https://dataportal.brainminds.jp/ants-tutorial. I successfully compiled and installed ANTs and finally could run "antsRegistrationSyNQuick.sh -d 3 -f test_brain1.nii.gz -m test_brain2.nii.gz -o brain1_to_brain2_". However I could not find any output files in the directory. Below is the printed out result. Thanks. Registration finished. The antsRegistration call was: -------------------------------------------------------------------------------------- /opt/ANTs/bin//antsRegistration --verbose 1 --dimensionality 3 --float 0 --collapse-output-transforms 1 --output [ output,outputWarped.nii.gz,outputInverseWarped.nii.gz ] --interpolation Linear --use-histogram-matching 0 --winsorize-image-intensities [ 0.005,0.995 ] --initial-moving-transform [ test_brain1.nii.gz,test_brain2.nii.gz,1 ] --transform Rigid[ 0.1 ] --metric MI[ test_brain1.nii.gz,test_brain2.nii.gz,1,32,Regular,0.25 ] --convergence [ 1000x500x250x0,1e-6,10 ] --shrink-factors 12x8x4x2 --smoothing-sigmas 4x3x2x1vox --transform Affine[ 0.1 ] --metric MI[ test_brain1.nii.gz,test_brain2.nii.gz,1,32,Regular,0.25 ] --convergence [ 1000x500x250x0,1e-6,10 ] --shrink-factors 12x8x4x2 --smoothing-sigmas 4x3x2x1vox --transform SyN[ 0.1,3,0 ] --metric MI[ test_brain1.nii.gz,test_brain2.nii.gz,1,32] --convergence [ 100x100x70x50x0,1e-6,10 ] --shrink-factors 10x6x4x2x1 --smoothing-sigmas 5x3x2x1x0vox -------------------------------------------------------------------------------------- Moving image resampled into fixed space: outputWarped.nii.gz Fixed image resampled into moving space: outputInverseWarped.nii.gz -------------------------------------------------------------------------------------- ![image](https://github.com/ANTsX/ANTs/assets/140678281/0576b641-6893-4021-91bb-b4e0aa26a4f8) **To Reproduce**

System information (please complete the following information)

Additional information

cookpa commented 1 year ago

It looks like your args weren't parsed correctly because the command includes

--output [ output,outputWarped.nii.gz,outputInverseWarped.nii.gz ]

It did not get your option "-o brain1_tobrain2" for some reason. To debug further, please include all output. Run

antsRegistrationSyNQuick.sh -d 3 -f test_brain1.nii.gz -m test_brain2.nii.gz -o brain1_to_brain2_ 2>&1 | tee quick.txt

You can drag and drop the file quick.txt into the comment box

seokjin9804 commented 1 year ago

Thank you so much for replying. Today, I tried rigid and affine registration, and actually they generated output files. However when I tried deformable registration they killed the run like below image. image

Here is the quick.txt


quick.txt

cookpa commented 1 year ago

OK, it looks like you fixed the output naming. But the antsRegistration process is being killed by the system. It could be a memory or CPU time limitation on your system.

If you can share data I will run the same command on my machine just to verify it's not the data itself.

MichelMartins05 commented 1 year ago

Was this issue solved? I'm facing a similar problem...

cookpa commented 1 year ago

Was this issue solved? I'm facing a similar problem...

I'm not sure what the issue was. You're welcome to open a new issue, please fill out the template and include all terminal output from the commands you ran.

If you can make a runnable example (using your data or any public data) I will run it