Hello,
This is how I did it and it worked ok for me ..
I would also like to know if someone more experienced than me sees a
problem in the code below
%%%%%%%%%%%%%%%%%%%%%%%%
VERY IMPORTANT
copy your images to another place because SPM will modify the headers
from the original ones
DON'T WORK WITH ORIGINALS - WORK ON COPIES !!!
%%%%%%%%%%%%%%%%%%%%%%%%
% insert here code to copy your files
matlabbatch{1}.spm.spatial.coreg.estwrite.other = {''};
matlabbatch{1}.spm.spatial.coreg.estwrite.eoptions.cost_fun = 'nmi';
matlabbatch{1}.spm.spatial.coreg.estwrite.eoptions.sep = [4 2];
matlabbatch{1}.spm.spatial.coreg.estwrite.eoptions.tol = [0.02 0.02 0.02
0.001 0.001 0.001 0.01 0.01 0.01 0.001 0.001 0.001];
matlabbatch{1}.spm.spatial.coreg.estwrite.eoptions.fwhm = [7 7];
matlabbatch{1}.spm.spatial.coreg.estwrite.roptions.interp = 1;
matlabbatch{1}.spm.spatial.coreg.estwrite.roptions.wrap = [0 0 0];
matlabbatch{1}.spm.spatial.coreg.estwrite.roptions.mask = 0;
matlabbatch{1}.spm.spatial.coreg.estwrite.roptions.prefix =
'registered';
matlabbatch{1}.spm.spatial.coreg.estwrite.ref={'yourReferenceFile.nii,1'};
% in your case, your COPY OF THE diffusion map
matlabbatch{1}.spm.spatial.coreg.estwrite.source={'yourFileToRegister.img,1']};
% in your case, the COPY OF THE T1
inputs = cell(0, 1);
current_dir=pwd;
cd('path to your copied files') %
spm('defaults', 'FMRI');
out=spm_jobman('serial', matlabbatch, '', inputs{:});
cd(current_dir)
I hope this helps.. Good luck !
If you find an easier or more detailed one, please share :)
On 2015.04.07 11:24, C. Roman wrote:
> Hello SPM Experts,
>
> I am currently trying to create ROIs for tractography analyses. To do
> so, however, it looks like I will most likely need to register my T1
> MPRAGE to my diffusion images (e.g., FA map). Is there any way to do
> this in SPM? Any detailed suggestions would be greatly appreciated.
>
> Thank you in advance for your time and help!
> C. Roman
|