Dear Luca,
To change the voxel-to-world mapping of an image, have a look at the
spm_get_space function.
The 'reset orientation" option is indeed not available any more from the
SPM12 interface but you can still call it manually with:
>> spm_image('resetorient');
Best regards,
Guillaume.
On 21/06/16 10:45, PRESOTTO LUCA wrote:
> Dear SPMers,
>
> I was looking into reorienting some images in some scripts I'm writing. However, I can't find a way anywhere to just modifiy the header of the image. The only workaround I can find is to do:
>
> V = spm_vol (filename);
> imVol = spm_read_vols(v);
>
> % compute modifications to V.mat
>
> spm_write_vols(V,imVol);
>
> I'm pretty sure that there must be a way to do this without reading the whole volume and then rewriting it identically. I think that this was the original reason that analyze was implemented this way. However, I can't find how.
>
> Am I missing some routines somewhere?
>
> thank you,
>
> Luca
>
> (BTW, is it me or in spm12 it's impossible to "reset" the orientation of an image????)
>
>
> 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]
>
--
Guillaume Flandin, PhD
Wellcome Trust Centre for Neuroimaging
University College London
12 Queen Square
London WC1N 3BG
|