A previously posted script (cg_t2x.m) converts the t-stat (spmT_...) image to a p-value
image this way:
spm_imcalc_ui(t_file,p_file,['1-spm_Tcdf(i1,' num2str(df) ')'],{0 0 4 1});
I changed the 4 to 16 to save as 32-bit float. Then I wanted to switch interpolation off, as I
believe this particular image conversion does not need to involve resampling. Upon reading
the help pages for the 'interpolation hold' option (incl. the central 'help spm_slice_volume'),
seems unclear how to switch interpolation off. Especially if you're familiar cg_t2x.m, could
you help clarify command usage for spm_imcalc_ui for the t-to-p image conversion? Not
being the author of the above code line, I obviously don't/can't know why the 'interpolation
hold' has been changed above to 1 (trilinear) from its default value 0 (nearest neighbor).
Lastly, on a related note, I invoke
spm_contrasts(SPM);
to create the spmT_... image, so, if possible to tell spm_contrasts (by setting a flag inside
the 'SPM' object) to additionally create the p-value image then please let me know as I'd
prefer that approach to the spm_imcalc_ui approach above.
Thank you.
|