help > t_map error
Showing 1-3 of 3 posts
Display:
Results per page:
Jun 3, 2016  07:06 AM | max keuken
t_map error
Hey Guys,
I'm working my way through the tutorial using my own data and basically everything seems oke upto the point that I want to do the statistical analysis. 
The input that I'm using is data that was processed in the following way:
1) in-house topology fix -> 2) Surface meshes using CALD -> 3) SPHARM-mat expansion using LSF -> 4) FOE and then SHREC alignment to the template
The template that I'm using is created by creating an average object, using standard settings. 

I get an error when I want to do a simple t-map and it seems that the matrices dimensions of my input and template don't seem to match?
The exact error that I get is:

t_map
Error using ./
Matrix dimensions must agree.

Error in get_vertexnormals (line 37)
vnorm = vnorm./vnlen(:,[1 1 1]);
Error in performTstat (line 81)
vtnorm = get_vertexnormals(atlas_vertices,faces);
Error in SpharmMatStatAnalysis (line 41)
performTstat(confs, objs1, objs2, cpath);
Error in SPHARM_MAT>RunTag_Callback (line 633)
SpharmMatStatAnalysis(handles.userdata.t_map, handles.userdata.inObjs,
handles.userdata.inObjs2, 't_map', handles.userdata.cpath);
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in SPHARM_MAT (line 70)
gui_mainfcn(gui_State, varargin{:});
Error while evaluating UIControl Callback

Any thoughts on what I could check / change?
thanks!
Max
Jan 23, 2017  09:01 AM | Paolo Bosco
RE: t_map error
Hi all,

I'm encountering the very same problem trying to run t_map method on the tutorial data.
If I look into the get_vertexnormals function, everything seems ok until the command vnorm = - get(p,'vertexnormals'); is given.
Here an empty array is generated, that produces the reported error (that happens 2 lines after)
Maybe some properties have changed in the default definition of patch objects, thus the call to get vertexnormals fails.
Any suggestion for a workaround?
Max, did you manage to solve it?
thanks!
Paolo
Jan 24, 2017  01:01 AM | Paolo Bosco
RE: t_map error
Dear all,

I managed to find a workaround that works with MatlabR2016B, maybe it can help someone with the same issue.
The most recent versions generate the vertexnormals attribute when a lighting is associated to the patch.
Without the lighting, the attribute is an empty array that produces the error reported by Max.

In my case by editing get_vertexnormals function as follows

%vnorm = - get(p,'vertexnormals');
%%%%added
light
lighting gouraud
pause(2);
vnorm=-p.VertexNormals;
%%%%%

I managed to get the t-map on the tutorial data.

Paolo