Hi Lotte,
spm_file_merge is the code which is run through the Batch GUI "3D to 4D File Conversion". It should write the created 4D image dataset to disk and return a SPM volume struct describing it. When you call spm_file_merge directly the output file will be either the file you specified as an argument, or a file called "4D.nii" in the folder where your first input image is located.
spm_file_merge does not return a 4D data matrix of pixel values. If you need that instead of writing a 4D Nifti to disk, you should check out spm_read_vols.
Hope this helps,
Volkmar
|