nipreps / fmriprep

fMRIPrep is a robust and easy-to-use pipeline for preprocessing of diverse fMRI data. The transparent workflow dispenses of manual intervention, thereby ensuring the reproducibility of the results.
https://fmriprep.org
Apache License 2.0
631 stars 293 forks source link

Multi-stage restrict deformation issue #1733

Closed VVanreusel closed 5 years ago

VVanreusel commented 5 years ago

Dear All,

We want do perform a coregistration where we want to restrict the deformation along the z-direction. We try the following code:

antsRegistration --dimensionality 3 --float 0 \
--interpolation Linear \
--winsorize-image-intensities [0.005,0.995] \
--use-histogram-matching 1 \
--transform Rigid[0.1] \
--metric MI[$imgs,1,32,Regular,0.25] \
--convergence [1000x500x250x100,1e-6,10] \
--shrink-factors 8x4x2x1 \
--smoothing-sigmas 3x2x1x0vox \
--restrict-deformation 0x0x1x1x1x0 \
--transform Affine[0.1] \
--metric MI[$imgs,1,32,Regular,0.25] \
--convergence [1000x500x250x100,1e-6,10] \
--shrink-factors 8x4x2x1 \
--smoothing-sigmas 3x2x1x0vox \
--restrict-deformation 1x1x1x1x1x1x0x0x0x1x1x0 \
-v \
--output [${nm},${nm}_EPI2T2Warped.nii.gz,${nm}_invEPI2T2Warped.nii.gz]

As I read somewhere that one should add the restrict-deformation command to each stage. If we run the code like this, no deformations are done in the z-direction, but the size of the brain is a lot larger than the one of the T2 we are coregistering it to:

image

When we do only the rigid or only the affine (with restrict deformation) however, the deformation is also restricted in the z-direction as we want and the size of the deformed brain is similar as the T2 that we are warping it to.

image

Does anyone of you have an idea how to solve this? Thank you in advance

VVanreusel commented 5 years ago

Masking did the trick.

oesteban commented 5 years ago

For questions regarding ANTS, I'd recommend posting to ANTsX/ANTs