CAT12 import anatomoy error

Hi All,

I am receiving an error after the segmentation has been completed when the the anatomy is being imported. Error in tess_addsphere.m Line 83 Matrix dimensions must agree. Happy to give clarification if this is unclear.

Screenshot%20from%202019-10-16%2014-20-34

Hello,

Could you please send me the output of CAT12 for this subject, so I can reproduce this error on my end?
Zip the entire CAT12 output folder, upload it somewhere and post the download link here.

Have you tried running the segmentation directly from Brainstorm?
(the error message here shows that you are importing a CAT12 output folder directly)

Thanks
Francois

Hi!

Here is the a link with the zip file of my attempt with the sample introduction anatomy:

Yes I originally ran into an error when just running the cat12 segmentation because I think it automatically tries to import the anatomy. When I do that I receive this error.

"
BST> Saving protocol "syncing"...
Error using ./
Matrix dimensions must agree.

Error in tess_addsphere (line 83)
SphereVertices = SphereMat.Vertices ./ sMri.Voxsize;

Error in import_anatomy_cat (line 313)
[TessMat, err] = tess_addsphere(BstTessLhFile,
TessLsphFile, 'GII-CAT');

Error in process_segment_cat12>Compute (line 237)
errorMsg = import_anatomy_cat(iSubject, catDir, nVertices,
isInteractive, [], isExtraMaps, isKeepMri);

Error in process_segment_cat12>ComputeInteractive (line 265)
[isOk, errMsg] = Compute(iSubject, iAnatomy, nVertices, 1);

Error in process_segment_cat12 (line 27)
eval(macro_method);

Error in
tree_callbacks>@(h,ev)process_segment_cat12('ComputeInteractive',iSubject,iAnatomy)
(line 1015)
gui_component('MenuItem', jPopup, [], 'CAT12
MRI segmentation',
IconLoader.ICON_SURFACE_CORTEX, [],
@(h,ev)process_segment_cat12('ComputeInteractive',
iSubject, iAnatomy));
"

Thank you for your help!

I downloaded your folder, created a new subject, right-clicked > Import anatomy folder, then clicked on "Compute MNI transformation" when the MRI viewer shows up.
The rest of the import works correctly, I could not reproduce your bug.
(the computation of the high-resolution interpolations is extremely slow, hopefully we'll work on optimizing this some day, but it works)

Make sure you use the latest versions of SPM12 (type "spm_update") and CAT12 (download it from the website).
Also, make sure you don't have other toolbox in your Matlab path, which could shadow some of the Brainstorm or SPM functions.

Which version of Matlab are you using? On which operating system?
(you can copy-paste what you get when type "ver" in the Matlab command window)

Here is the output of the ver command:
MATLAB Version: 8.5.0.197613 (R2015a)
MATLAB License Number: 841059
Operating System: Linux 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64
Java Version: Java 1.7.0_60-b19 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode

MATLAB Version 8.5 (R2015a)
Simulink Version 8.5 (R2015a)
Bioinformatics Toolbox Version 4.5.1 (R2015a)
Communications System Toolbox Version 6.0 (R2015a)
Computer Vision System Toolbox Version 6.2 (R2015a)
Control System Toolbox Version 9.9 (R2015a)
Curve Fitting Toolbox Version 3.5.1 (R2015a)
DSP System Toolbox Version 9.0 (R2015a)
Embedded Coder Version 6.8 (R2015a)
Global Optimization Toolbox Version 3.3.1 (R2015a)
Image Acquisition Toolbox Version 4.9 (R2015a)
Image Processing Toolbox Version 9.2 (R2015a)
Instrument Control Toolbox Version 3.7 (R2015a)
MATLAB Coder Version 2.8 (R2015a)
MATLAB Compiler Version 6.0 (R2015a)
Mapping Toolbox Version 4.1 (R2015a)
Neural Network Toolbox Version 8.3 (R2015a)
Optimization Toolbox Version 7.2 (R2015a)
Parallel Computing Toolbox Version 6.6 (R2015a)
Partial Differential Equation Toolbox Version 2.0 (R2015a)
Phased Array System Toolbox Version 3.0 (R2015a)
RICOH MEG Reader toolbox for MATLAB Version 1.0.3
Signal Processing Toolbox Version 7.0 (R2015a)
SimMechanics Version 4.6 (R2015a)
Simscape Version 3.13 (R2015a)
Simulink Control Design Version 4.2 (R2015a)
Statistics and Machine Learning Toolbox Version 10.0 (R2015a)
Symbolic Math Toolbox Version 6.2 (R2015a)
Wavelet Toolbox Version 4.14.1 (R2015a)
Yokogawa MEG Reader toolbox for MATLAB Version 1.5.2

Indeed, I tested with older versions of Matlab and there was some syntax that was not supported in the tess_addsphere function. If fixed it in this commit, please update Brainstorm and try again.