nipreps / nibabies

fMRIPrep-Infants - A robust, transparent workflow tailored for neonate and infant MRI
https://nibabies.readthedocs.io/en/latest
Apache License 2.0
23 stars 10 forks source link

Change default output space to `MNI152NLin2009cAsym` #153

Open mgxd opened 3 years ago

mgxd commented 3 years ago

A short summary of what you would like to see in NiBabies.

To convene with fMRIPrep's outputs

Do you have any interest in helping implement the feature?

Yes!

Add any additional information or context about the request here.

No response

mgxd commented 2 years ago

From MNIInfant docs:

NOTE that these templates are smaller then standard MNI-152 template, so if you use them to perform registration in stereotaxic space it will be different coordinate system. It is possible to transform results to MNI-152 space by applying following scaling: 1.21988 in x direction, 1.23510 in y direction and 1.28654 in z direction. Also, you can apply transformation defined in nihpd_asym_44–60_tal.xfm file.

audreymhoughton commented 2 years ago

Is there an ETA for this enhancement?

This is needed for compatibility with XCP, and therefore, CABINET (HBCD MRI processing).

Thanks!

effigies commented 2 years ago

IIRC I think the plan is to use space-MNI152 in the output filenames (checking in with Ted and Azeez), and the conversion should just be:

def scale_to_MNI152(img):
    affine = np.diag((1.21988, 1.23510, 1.28654, 1)) @ img.affine
    return img.__class__(img.dataobj, affine, img.header)