Enhanced Contrast by dividing T1w/T2w

Hello! I am looking for already existing tool that can divide T1w/T2w. Are there any suggestions. Primarily, I use SPM12, but any other opportunities are also welcomed. Thank you in advanced. If there is nothing, maybe there are some suggestion how to do it correctly. Thank you for help)

Hi @ChrisTall,

You could use something like fslmaths.

Assuming your T1 and T2 are already registered to each other:

fslmaths T1.nii.gz -div T2.nii.gz T1_T2_ratio.nii.gz

Best,
Steven

Hi @ChrisTall ,

With spm you could use the “ImCalc” batch to produce a script like this:

matlabbatch{1}.spm.util.imcalc.input = {
                                        'PATH_TO_YOUR_ANAT_DIR/T1w.nii,1'
                                        'PATH_TO_YOUR_ANAT_DIR/T2w.nii,1'
                                        };
matlabbatch{1}.spm.util.imcalc.output = 'T1_T2_ratio';
matlabbatch{1}.spm.util.imcalc.outdir = {'PATH_TO_YOUR_ANAT_DIR'};
matlabbatch{1}.spm.util.imcalc.expression = 'i1./i2';
matlabbatch{1}.spm.util.imcalc.var = struct('name', {}, 'value', {});
matlabbatch{1}.spm.util.imcalc.options.dmtx = 0;
matlabbatch{1}.spm.util.imcalc.options.mask = 0;
matlabbatch{1}.spm.util.imcalc.options.interp = 1;
matlabbatch{1}.spm.util.imcalc.options.dtype = 4;

Thank you both. Both methods works fine.