Undefined function or variable 'spm_normalise'.

111 views
Skip to first unread message

Sebastian Miguel Toescu

unread,
Jun 18, 2020, 11:05:03 AM6/18/20
to Automated Fiber Quantification (AFQ)
Hello AFQ experts,

I am trying to run the AFQ pipeline on an iMac (Mojave 10.14.6) in Matlab R2017b, SPM12_v6906. When I try to run 'AFQ_example.m', I get the following error (attached screenshot, text copied below):

Undefined function or variable 'spm_normalise'.

Error in mrAnatComputeSpmSpatialNorm (line 83)
sn = spm_normalise(Vtemplate, Vin, '', '', Vsw, params);

Error in AFQ_SegmentFiberGroups (line 176)
[sn, Vtemplate, invDef] = mrAnatComputeSpmSpatialNorm(alignIm, dt.xformToAcpc,
template, params);

Error in AFQ_example (line 41)
fg_classified = AFQ_SegmentFiberGroups(dt, wholebrainFG);
 

I have just recompiled SPM and added the latest updates (v7771) per their instructions here (https://www.fil.ion.ucl.ac.uk/spm/software/spm12/).

I am able to run AFQ satisfactorily on a Macbook Pro (Mojave 10.14.6, Matlab R2017b, SPM12_v7487).

Could it be that AFQ only currently works with SPM12_v7487? Or is there any other workaround to get it functioning on my iMac with SPM12_v7771.

Cheers
S
Screenshot 2020-06-18 at 15.59.18.png

Sebastian Miguel Toescu

unread,
Jun 18, 2020, 11:37:34 AM6/18/20
to automated-fiber-q...@googlegroups.com
Should have said - the error persists on the iMac after recompilation of SPM with update v7771.
Hope you can help!
Cheers
S

--
You received this message because you are subscribed to a topic in the Google Groups "Automated Fiber Quantification (AFQ)" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/automated-fiber-quantification-afq/1mm0WspYDhE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to automated-fiber-quantif...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/automated-fiber-quantification-afq/88c0ace5-15c6-45ca-b055-6304e581ec71o%40googlegroups.com.


--
Sebastian M Toescu
Visiting Scholar, Stanford University / Lucille Packard Children's Hospital
GOSH Charity / RCS Surgeon Scientist PhD Fellow, UCL Institute of Child Health
Neurosurgery Registrar, Great Ormond Street Hospital
Treasurer, British Neurosurgical Trainees Association

Sebastian Miguel Toescu

unread,
Jun 19, 2020, 4:25:06 AM6/19/20
to Automated Fiber Quantification (AFQ)
I emailed the SPM developers who replied: "this is due to spm_normalise being an old function that has now been moved into a toolbox. This can be fixed by adding the relevant path manually:
addpath(fullfile(spm('dir'),'toolbox','OldNorm')), or calling spm_jobman initcfg before using AFQ."

Both of these worked, although the addpath command is preferable as it only needs to be run once to save the path for future AFQ use.
Thought I'd post the solution in case any one else needs it at some point.

S

On Thursday, June 18, 2020 at 4:37:34 PM UTC+1, Sebastian Miguel Toescu wrote:
Should have said - the error persists on the iMac after recompilation of SPM with update v7771.
Hope you can help!
Cheers
S

On Thu, 18 Jun 2020 at 16:05, Sebastian Miguel Toescu <s.m.t...@gmail.com> wrote:
Hello AFQ experts,

I am trying to run the AFQ pipeline on an iMac (Mojave 10.14.6) in Matlab R2017b, SPM12_v6906. When I try to run 'AFQ_example.m', I get the following error (attached screenshot, text copied below):

Undefined function or variable 'spm_normalise'.

Error in mrAnatComputeSpmSpatialNorm (line 83)
sn = spm_normalise(Vtemplate, Vin, '', '', Vsw, params);

Error in AFQ_SegmentFiberGroups (line 176)
[sn, Vtemplate, invDef] = mrAnatComputeSpmSpatialNorm(alignIm, dt.xformToAcpc,
template, params);

Error in AFQ_example (line 41)
fg_classified = AFQ_SegmentFiberGroups(dt, wholebrainFG);
 

I have just recompiled SPM and added the latest updates (v7771) per their instructions here (https://www.fil.ion.ucl.ac.uk/spm/software/spm12/).

I am able to run AFQ satisfactorily on a Macbook Pro (Mojave 10.14.6, Matlab R2017b, SPM12_v7487).

Could it be that AFQ only currently works with SPM12_v7487? Or is there any other workaround to get it functioning on my iMac with SPM12_v7771.

Cheers
S

--
You received this message because you are subscribed to a topic in the Google Groups "Automated Fiber Quantification (AFQ)" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/automated-fiber-quantification-afq/1mm0WspYDhE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to automated-fiber-quantification-afq+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages