Dear all,
my question is similar to Fmriprep on multi-echo data: Exporting individual echos in MNI space, but the answer (“You can use antsApplyTransforms to transform the echos to MNI.”) was not detailed enough for me.
I would like to analyze single echo and combined-echo data from fmripreped multi-echo data. Since fmriprep writes the single echo data in native space and the combined data in a standard space I plan to transform the single-echo data, but I am not sure I) which transformation files to use, and II) about antsApplyTransformation’s syntax for two intended transformations: a) transform 3D single-echo time course data, b) transform a 3D-statistical map derived from that single-echo time course data from native to MNI space. At this point I’d like to follow up option a) because of specifics of my planned analysis.
I understand that in my scenario I need to apply the scanner-to-T1w and the T1w-to-standard transforms to the single-echo data.
DETAILED INFO:
I used fmriprep-24.0.0 to process 5 sessions (1 anatomical, 10 functional runs) of multi-echo data (4 echos) using the –me-output-echos option. My task is called “odl”.
For the sake of brevity, I’ll only talk about sub-02, ses-0, run-01, echo-1 (and the combined echo)
<>/derivatives/sub-02/ses-0/func:
Contains preprocessed single echo files in native space:
sub-02_ses-0_task-odl_run-01_echo-1_desc-preproc_bold.nii.gz
and combined-echos files in MNI space:
sub-02_ses-0_task-odl_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz
and a bunch of transformation files:
sub-02_ses-0_task-odl_run-01_from-boldref_to-auto00006_mode-image_xfm.txt
sub-02_ses-0_task-odl_run-01_from-boldref_to-T1w_mode-image_desc-coreg_xfm.txt
sub-02_ses-0_task-odl_run-01_from-orig_to-boldref_mode-image_desc-hmc_xfm.txt
<>/derivatives/sub-02/ses-0/anat:
sub-02_ses-0_from-orig_to-T1w_mode-image_xfm.txt
CONCRETE QUESTIONS:
How can I transform a) the time course file for the first echo (sub-02_ses-0_task-odl_run-01_echo-1_desc-preproc_bold.nii.gz) into the same space as the combined echo (sub-02_ses-0_task-odl_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz)?
To my knowledge transforming a volume-timecourse (4D), the syntax is
data_in=sub-02_ses-0_task-odl_run-01_echo-1_desc-preproc_bold.nii.gz
data_out=sub-02_ses-0_task-odl_run-01_echo-1_space-MNI152NLin6Asym_desc-preproc_bold.nii.gz
name_ref=???1 (do I need to extract <first_volume_of_combined_echo_BOLD>?)
scanner_to_T1w_transformation=???2
T1w_to_standard_transforms=???3
antsApplyTransforms –d 3 -e 3\
–input-image-type 3 \
–input $data_in \
–default-value 0 \
–float 1 \
–interpolation LanczosWindowedSinc \
–output $data_out \
–reference-image $name_ref \
–transform $scanner_to_T1w_transformation \
–transform $T1w_to_standard_transforms
Is this syntax correct, and which respective files are ???1, ???2, and ???3
in the list below?
.
├── anat
│ ├── sub-02_desc-brain_mask.json
│ ├── sub-02_desc-brain_mask.nii.gz
│ ├── sub-02_desc-preproc_T1w.json
│ ├── sub-02_desc-preproc_T1w.nii.gz
│ ├── sub-02_from-MNI152NLin2009cAsym_to-T1w_mode-image_xfm.h5
│ ├── sub-02_from-MNI152NLin6Asym_to-T1w_mode-image_xfm.h5
│ ├── sub-02_from-T1w_to-MNI152NLin2009cAsym_mode-image_xfm.h5
│ ├── sub-02_from-T1w_to-MNI152NLin6Asym_mode-image_xfm.h5
│ ├── sub-02_from-T1w_to-fsnative_mode-image_xfm.txt
│ ├── sub-02_from-fsnative_to-T1w_mode-image_xfm.txt
│ …
├── ses-0
│ ├── anat
│ │ └── sub-02_ses-0_from-orig_to-T1w_mode-image_xfm.txt
│ ├── fmap
│ │ ├── sub-02_ses-0_run-01_fmapid-auto00006_desc-coeff0_fieldmap.nii.gz
│ │ ├── sub-02_ses-0_run-01_fmapid-auto00006_desc-coeff1_fieldmap.nii.gz
│ │ ├── sub-02_ses-0_run-01_fmapid-auto00006_desc-magnitude_fieldmap.nii.gz
│ │ ├── sub-02_ses-0_run-01_fmapid-auto00006_desc-preproc_fieldmap.json
│ │ ├── sub-02_ses-0_run-01_fmapid-auto00006_desc-preproc_fieldmap.nii.gz
│ │ ├── …
│ └── func
│ ├── sub-02_ses-0_task-odl_run-01_desc-brain_mask.json
│ ├── sub-02_ses-0_task-odl_run-01_desc-brain_mask.nii.gz
│ ├── sub-02_ses-0_task-odl_run-01_desc-confounds_timeseries.json
│ ├── sub-02_ses-0_task-odl_run-01_desc-confounds_timeseries.tsv
│ ├── sub-02_ses-0_task-odl_run-01_desc-coreg_boldref.json
│ ├── sub-02_ses-0_task-odl_run-01_desc-coreg_boldref.nii.gz
│ ├── sub-02_ses-0_task-odl_run-01_desc-hmc_boldref.json
│ ├── sub-02_ses-0_task-odl_run-01_desc-hmc_boldref.nii.gz
│ ├── sub-02_ses-0_task-odl_run-01_echo-1_desc-preproc_bold.json
│ ├── sub-02_ses-0_task-odl_run-01_echo-1_desc-preproc_bold.nii.gz
│ ├── …
│ ├── sub-02_ses-0_task-odl_run-01_from-boldref_to-T1w_mode-image_desc-coreg_xfm.json
│ ├── sub-02_ses-0_task-odl_run-01_from-boldref_to-T1w_mode-image_desc-coreg_xfm.txt
│ ├── sub-02_ses-0_task-odl_run-01_from-boldref_to-auto00006_mode-image_xfm.json
│ ├── sub-02_ses-0_task-odl_run-01_from-boldref_to-auto00006_mode-image_xfm.txt
│ ├── sub-02_ses-0_task-odl_run-01_from-orig_to-boldref_mode-image_desc-hmc_xfm.json
│ ├── sub-02_ses-0_task-odl_run-01_from-orig_to-boldref_mode-image_desc-hmc_xfm.txt
│ ├──…
│ ├── sub-02_ses-0_task-odl_run-01_space-MNI152NLin2009cAsym_boldref.json
│ ├── sub-02_ses-0_task-odl_run-01_space-MNI152NLin2009cAsym_boldref.nii.gz
│ ├── sub-02_ses-0_task-odl_run-01_space-MNI152NLin2009cAsym_desc-brain_mask.json
│ ├── sub-02_ses-0_task-odl_run-01_space-MNI152NLin2009cAsym_desc-brain_mask.nii.gz
│ ├── sub-02_ses-0_task-odl_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ ├── sub-02_ses-0_task-odl_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz
│ ├── …
├── ses-1
│ ├── …
28 directories, 3001 files
Thanks a lot,
Jens