I'm currently using the following code to generate a volume header per
time series so that my spm_save command works.
function [header] = gen_vol_info(dims, time_slices, file_name)
unmasked_size = dims(1)*dims(2)*dims(3);
for index=1:time_slices
header(index).dt = [spm_type('float64') spm_platform('bigend')];
header(index).dim = dims;
header(index).mat = zeros(4,4);
header(index).mat(4,4)=1;
header(index).n=[index 1]; %guarantees that the indexing is
correct but (i think...)
header(index).descrip = 'Generated by MVPA write_to analyze script';
header(index).fname = file_name;
header(index).pinfo = [1; 0; (unmasked_size*(index-1))];
end
end
Are the reasonable defaults to be passing to the spm_save function? If
not have I missed some nuances in the overall information stored in the
spm headers? note: i currently have no nifti support so i have not
implemented the .private field or the nifti structure information for
that field.
|