Hi!
You can just use spm_write_vol. You just need a for loop over the number of frames you have and use the V.n field.
Suppose you have 10 frames and V is the header that you'll normally use for a 3D image. Then you'll do something like this:
for i = 1:10
V.n = [1 i]
spm_write_vol(V,imm(:,:,:,i));
end
Cheers,
Luca
________________________________________
Da: SPM (Statistical Parametric Mapping) <[log in to unmask]> per conto di Elena Bassanelli <[log in to unmask]>
Inviato: martedì 26 luglio 2016 17.11.35
A: [log in to unmask]
Oggetto: [SPM] 4D volume
Hi everyone!
can anyone tell me if is there a function like spm_write_vol to use with 4D volumes?
thanks!
Elena
Rispetta l’ambiente: non stampare questa mail se non è necessario.
Respect the environment: if it's not necessary, don't print this mail.
IL TUO 5XMILLE AL SAN RAFFAELE DI MILANO
Devolvi il tuo 5 per mille all’Ospedale San Raffaele: perché al centro della Ricerca ci sei TU. CODICE FISCALE: 07636600962, nel riquadro RICERCA SANITARIA. Non c’è cura, senza ricerca. Non c’è ricerca, senza il tuo 5xmille. Scopri come su http://www.5xmille.org
[http://www.5xmille.org/img/731x129.jpg]
|