> However, the result of SPM is a .hdr and a .img file. I would like to have a nifti file as output from the SPM analysis, preferably a mask with the voxels that are activated (under certain FDR constraints) white, and the rest black (or the other way around). I tried to read the resulting .hdr file into MRIcro and then save it as a Nifti, but the disadvantage is that you have to threshold the file yourself in MRIcro and I don't know the conversion between the FDR=0.05 threshold in SPM and the thresholds used in MRIcro. So it would be much easier if I can get this .nii file immediately out of SPM...
First, to save any threshold image (e.g., one that is thresholded at
FDR<.05), simply click the "save" button once you've gotten your
results. This allows you to specify any filename, and will only
provide values for the voxels showing on your glass brain.
If you would like to transform this into a binary image, you can do so
using ImCalcójust select this thresholded image, and specify a formula
of "i1>0", and you should get what you need. Incidentally, in ImCalc,
if you specify a ".nii" extension to the output image, you will get a
single-file Nifti image, so then you'd be done.
If you ever want to convert img/hdr Nifti files that SPM produces to
single-image Nifti files, you can do this easily using the FSL utility
Hope this helps!
Dr. Jonathan Peelle
Department of Neurology
University of Pennsylvania
3 West Gates
3400 Spruce Street
Philadelphia, PA 19104