I just figured out what was wrong: Instead of using the path to matrix
file, I had to first load the matrix into a variable (using load
function) and then use the variable in the function. As I said, it was
a basic thing, but not a straightforward one for someone who is used
to script in bash :-)
Cheers
Pavel
On 2 February 2016 at 18:18, Pavel Hok <[log in to unmask]> wrote:
> Dear SPM experts,
>
> after normalising single subject data to MNI space using DARTEL I
> would like to transform also the DARTEL template to the MNI space. In
> this forum, I found that I should use the function spm_get_space, but
> when I try to run it I get following error (I truncated the full path
> after pasting the code):
>
>>> spm_get_space .../dartel/Template_6.nii .../dartel/Template_6_2mni.mat
> Error using -
> Matrix dimensions must agree.
>
> Error in spm_get_space (line 24)
> if size(N.dat,4)>1 && sum(sum((N.mat-M).^2))>1e-8
>
> I guess this would be something really basic as I am really not
> familiar with MATLAB.
>
> I guess after running the command sucessfully, I could use
> Coregistration - Reslice to get the Template image in the same voxel
> dimensions as the normalised single subject data, am I right?
>
> Thanks in advance!
>
> Pavel
--
-------------------------------------------------------------------------------
-- MUDr. Pavel Hok
-------------------------------------------------------------------------------
-- Laboratoř funkční magnetické rezonance
-- Neurologická klinika
-- Lékařská fakulta
-- Univerzita Palackého v Olomouci
-- Fakultní nemocnice Olomouc
-------------------------------------------------------------------------------
-- Laboratory of functional magnetic resonance imaging
-- Department of Neurology
-- Faculty of Medicine and Dentistry
-- Palacky University Olomouc
-- University Hospital Olomouc
-- Czech Republic
-------------------------------------------------------------------------------
-- I.P. Pavlova 6, 775 20 Olomouc
-- web: fmri.upol.cz
-- tel.: +420 588 443 418
-- e-mail: [log in to unmask]
-------------------------------------------------------------------------------
|