Csource code and mex files
Are in
/usr/local/matlab/toolbox/mri/mrFlatMesh/Csource/
There are two mex files required for mrFlatMesh
mrManDist: (Everyone’s favourite manifold distance routine)
assignToNearest: Takes two sets of 3D coords and for each point in the first set, returns the index of the nearest point in the second set.
>> a=rand(10,3);
>> b=rand(5,3);
>> c=assignToNearest(a,b);
‘c’ is now a 5x1 vector containing and index into ‘a’ for each member of ‘b’