Basically you want to do this:
M = spm_get_space(another-image-to-be-moved);
spm_get_space(deblank(another-image-to-be-moved), M*MM);
which may be easier done by...
P=spm_select(Inf,'image','Select other images'); % Select the images
for i=1:size(P,1), % Loop over selected images
Pi = deblank(P(i,:)); % Pick out current image
M = spm_get_space(Pi); % Read its voxel-to-world info
spm_get_space(Pi, M*MM); % Premultiply that with the estimated
rotation matrix
end
Best regards,
-John
On 20 September 2011 16:46, Federico Nemmi <[log in to unmask]> wrote:
> Sorry for bumping up again such an old issue, but i m really interested in this method.
>
> Here the topic is "apply a transformation matrx obtained by a coregistration to other images".
>
> The last mail said
>>If you want to coregister an image to another, you can do something like
>>
> > x = spm_coreg(target,image-to-be-moved);
> >M = inv(spm_matrix(x));
> >M = spm_get_space(image-to-be-moved);
> > spm_get_space(deblank(image-to-be-moved), M*MM);
>
> So, this is the way to obtain the matrix to apply to the other images i want to tranform using the parameters; ok. But how to apply this matrix to the images i want to transform?
> Any help will be really appreciated
> F
>
|