Hello,
> I manipulate MRI real data and I have a set of slices. I don't have
> volumes for each patient.
In that case, perhaps this snippet helps:
% ================================================================
slices = spm_select([Inf],'image','Get slices',[],pwd,'.*');
nslice = size(slices,1);
V = spm_vol(deblank(slices(1,:)));
[p nm e v] = spm_fileparts(V.fname);
V.fname = [p filesep nm '_all_slices' e];
V.dim = [V.dim(1) V.dim(2) nslice];
vol = zeros(V.dim);
for i = 1:nslice
vol(:,:,i) = spm_read_vols(spm_vol(deblank(slices(i,:))));
end;
spm_write_vol(V,vol);
% ================================================================
With a little luck, this should put all your (axial) slices of one
subject together in one volume. If this makes sense or not, I cannot
say, but it may give you a clue on where to start.
Hope this helps,
Marko
--
=====================================================================
Marko Wilke (Dr.med./M.D.)
[log in to unmask]
Universitäts-Kinderklinik University Children's Hospital
Abt. III (Neuropädiatrie) Dept. III (Pediatric neurology)
Hoppe-Seyler-Str. 1, D - 72076 Tübingen
Tel.: (+49) 07071 29-83416 Fax: (+49) 07071 29-5473
=====================================================================
|