Dear Neurostars community,
I am trying to transform a binary ROI mask in MNI space to native space using the fmriprep outputs.
I recently followed this post:
I am using spyder 5.1.5 with Python 3.8 and this is the code:
#%% Import modules
import nipype
from nipype.interfaces.ants import ApplyTransforms
at = ApplyTransforms()
at.inputs.input_image = “E:/ERDeg/BIDS/loris_berlin_project/ROIs/occ_cortex.nii”
at.inputs.reference_image = “E:/ERDeg/BIDS/loris_berlin_project/derivatives/fmriprep/sub-
3000/anat/sub-3000_desc-preproc_T1w.nii”
at.inputs.output_image = “E:/ERDeg/BIDS/loris_berlin_project/ROIs/tempFILEINNATIVE.nii”
at.inputs.transforms = “E:/ERDeg/BIDS/loris_berlin_project/derivatives/fmriprep/sub-3000/anat/sub-3000_from-MNI152NLin2009cAsym_to-T1w_mode-image_xfm.h5”
at.inputs.default_value = 0
at.inputs.dimension = 3
at.inputs.float = False
at.inputs.interpolation = ‘Linear’
at.cmdline
at.run()
Here, input_image is the mask in MNI space (“occ_cortex.nii”), reference_image is the “desc-preproc_T1W” of the subject, output_image is the name of the new ROI, and I guess that input_transforms are the coordinate to transform from MNI to native space, a file which is found in the “anat” folder.
However, I get this error: OSError: No command “antsApplyTransforms” found on host DESKTOP-0KTFB22. Please check that the corresponding package is installed.
Can anyone kindly suggest me what I do wrong here please?
Many thanks
Lollo