Print

Print


Dear Radu

 

 

You could try the Volumes toolbox: http://sourceforge.net/projects/spmtools

 

 

Alternatively, the following code should do the trick, once you converted your data into nifti-files (first open these using spm_display and identify the slices which are of interest to you).

 

Vi = spm_vol(spm_select(inf,'image','Select volumes'));

for i=1:numel(Vi);

cut = spm_input('Specify lowest/highest slice','!+1','e',[1 Vi(i).dim(3)],2);

dat = spm_read_vols(Vi(i));

dat = dat(:,:,cut(1):cut(2));

Vo = Vi(i);

Vo. fname = [Vi(i).fname(1:end-4) '_' int2str(cut(1)) '-' int2str(cut(2)) '.nii'];

Vo.dim(3) = cut(2)-cut(1)+1;

Vo.mat(3,4) = -Vo.dim(3)/2;

Vo = rmfield(Vo,'pinfo');

Vo = spm_write_vol(Vo,dat);

end

 

 

Best

Simon

 

 


Von: SPM (Statistical Parametric Mapping) [[log in to unmask]]" im Auftrag von "Radu Ilinca [[log in to unmask]]
Gesendet: Samstag, 5. Mai 2012 09:25
An: [log in to unmask]
Betreff: [SPM] selecting a sub-volume

Dear SPM Experts,
 
I have a PET scan but it is wholebody (DICOM dataset). But I am interested only in the brain slices (a subvolume). How do I remove the non-brain slices from dataset ? If that is not available in SPM do you know any tool to do it ?
 
Thanks,
Radu.


------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------

Kennen Sie schon unseren neuen Film? http://www.fz-juelich.de/film
Kennen Sie schon unsere app? http://www.fz-juelich.de/app