Dear SPM users,
We are trying to dig into some of the SPM pairwise longitudinal spatial normalization pipeline and have the following question.
"spm12b/toolbox/Longitudinal/spm_pairwise.m"
In time point 1 folder we get y_*.nii, avg_*.nii, jd_*.nii files per subject and in time point 2 folder we get y_*.nii per subject.
We would like to compute jd_*.nii explicitly from precomputed y_*.nii and tried the following code in matlab but the jdExplicit and jdInternal values below do not match.
Q1. Could you let us know what might we be doing wrong?
y1=nifti('y_1.nii');
y2=nifti('y_2.nii');
Y1=single(squeeze(double(y1.dat)));
Y2=single(squeeze(double(y2.dat)));
det1=spm_diffeo('def2det',Y1);
det2=spm_diffeo('def2det',Y2);
jdExplicit=(det1-det2)/tdif;
jdInternal=nifti('jd_1_2.nii');
jdInternal=single(double(jdInternal.dat));
Q2. We already calculated " [y3,J3] = spm_diffeo('comp', y1, y2, J1, J2)"
But we saved only y3.
Is there any equation to get J3 directly from y3?
Thanks and Best Wishes,
Joseph.
|