Hi Suzanne,
if you don't need to merge, don't ;) Instead, call
V4 = spm_read_vols(spm_vol('V4D.nii'));
that should do it. If you do that on all your separate runs (with different variable names), you can then concatenate the respective arrays in memory in the 4th dimension.
Cheers
Marko
--
____________________________________________________
Prof. Dr. med. Marko Wilke
Facharzt für Kinder- und Jugendmedizin
Leiter, Experimentelle Pädiatrische Neurobildgebung
Oberarzt der Abteilung Neuropädiatrie
Universitäts-Kinderklinik
Marko Wilke, MD, PhD
Pediatrician
Head, Experimental Pediatric Neuroimaging
Consultant in Pediatric Neurology
University Children's Hospital
Hoppe-Seyler-Str. 1
D - 72076 Tübingen, Germany
Tel. +49 7071 29-83416
Fax +49 7071 29-5473
[log in to unmask]
http://www.medizin.uni-tuebingen.de/kinder/epn/
____________________________________________________
>>> Suzanne <[log in to unmask]> 24.09.18 19.11 Uhr >>>
Hi,
I am wanting to run spm_file_merge to concatenate a session's worth of 3D EPI images before feeding the output into a matlab script for further analyses. I do not need the initial 4D file saved out, just the matlab variable. Using a basic example, I just need V4 for the remainder of my script; I don't really want 'V4D.nii' saved out.
V4 = spm_file_merge(V, 'V4D.nii', 0);
Is there a way to run spm_file_merge without it saving out the 4D file?
Thanks in advance,
suzanne
|