Hi Marko,
you can modify your image headers to include your affine starting
estimates without resampling voxel data:
% filename is a string variable containing the image file name
% Maff is a 4x4 transformation matrix containing a mapping from image mm
% space into reference mm space
% get original orientation
Morig = spm_get_space(filename);
% apply Maff, save orientation
spm_get_space(filename, Maff*Morig);
This will update your image header - if you want to keep the original
info, you will need to copy the image before transformation.
Volkmar
On Thu, 5 Jul 2007, Marko Wilke wrote:
> Dear All,
>
> I have two short questions regarding the affine transformation:
>
>
> 1. is there a way to pass an affine matrix (as stored in the sn.mat-file) as
> a starting estimate to the segmentation routine in spm5?
>
>
> 2. how can I derive the overall scaling as occurring during the affine
> transform from the affine matrix ?
>
>
> Background is, I know there is a way to disable affine registration for
> segmentation in spm5 but that requires the images to be written out for this
> step, introducing interpolation. If one could pass an an already determined
> affine matrix to the algorithm, this would bypass this step. Naturally, in
> order to then do modulation by hand one would also need the overall affine
> scaling.
>
> Thanks in advance,
> best,
> Marko
>
--
Volkmar Glauche
-
Department of Neurology [log in to unmask]
Universitaetsklinikum Freiburg Phone 49(0)761-270-5331
Breisacher Str. 64 Fax 49(0)761-270-5416
79106 Freiburg http://fbi.uniklinik-freiburg.de/
|