Hi Suraj, FLIRT calculates linear transformations (global translations, rotations, and scalings), which are stored in plain-text .mat files. FNIRT calculates non-linear transformations, which potentially contain a different amount of displacement at each voxel. So FNIRT transfornations are stored as image files, and there is no way to convert them to a .mat file. But you can combine linear and non-linear transformations with the convertwarp command - use the --premat and --postmat options to pass the .mat files. Cheers, Paul On 08/01/2019, Suraj Thyagaraj <[log in to unmask]> wrote: > Hi everyone, > > I have certain ROIs that are in the MNI_1mm space that I would like to bring > to the subject specific DWI space to perform tractography. Using FNIRT I > have registered the MNI space (A) with the subject structural space (B) as > follows: > > fnirt --ref=$SUBJECT_DIR/T1.nii.gz --in=$MNI_DIR/MNI152_T1_1mm.nii.gz > --aff=$SUBJECT_DIR/affine.mat --cout=$SUBJECT_DIR/MNI152_FNIRTed.nii.gz > > In addition I have done linear registration between the subject structural > space (B) and the subject DWI space (C) as follows: > > {FSLDIR}/fsl/bin/flirt -in $SUBJECT_DIR/T1.nii.gz -ref > $SUBJECT_DIR/DWI_b0.nii.gz -out $SUBJECT_DIR/T1_in_DWI.nii.gz -omat > $SUBJECT_DIR/T1_in_DWI.mat' -bins 256 -cost corratio -searchrx -90 90 > -searchry -90 90 -searchrz -90 90 -dof 12 -interp trilinear > > I would like to combine these two transformations to create a transformation > between the MNI space (A) and the subject DWI space (C). > > I saw that both convert_xfm and convertwarp can be used to combine > transformation but I'm faced with these issues: > > i) convert_xfm requires two .mat files like so: convert_xfm -omat > <outmat_AtoC> -concat <mat_BtoC> <mat_AtoB> , but for the FNIRT operation, I > only get an output .nii.gz file. Is there a way to get the transformation > file as a .mat file from FNIRT? How can I use convert_xfm given my previous > steps? > > ii) convertwarp uses two warp.nii.gz file but the transformation file from > FLIRT is a .mat file. How can I use convertwarp given my previous steps? > > Thanks for any help! > > ######################################################################## > > To unsubscribe from the FSL list, click the following link: > https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=FSL&A=1 > ######################################################################## To unsubscribe from the FSL list, click the following link: https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=FSL&A=1