Back to the main page.

Bug 2322 - the icp function is not compatible with its use in ft_volumerealign

Status CLOSED FIXED
Reported 2013-10-14 23:58:00 +0200
Modified 2014-01-15 14:46:58 +0100
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Mac OS
Importance: P3 normal
Assigned to: Jan-Mathijs Schoffelen
URL:
Tags:
Depends on:
Blocks:
See also:

Robert Oostenveld - 2013-10-14 23:58:43 +0200

>> cfg cfg = method: 'headshape' headshape: [1x1 struct] >> seg = ft_volumerealign(cfg, seg) the input is segmented volume data with dimensions [256 256 256] using the segmentation approach triangulating the outer boundary of compartment 1 (scalp) with the isosurface method the call to "ft_prepare_mesh" took 5 seconds and required the additional allocation of an estimated 2 MB the call to "ft_interactiverealign" took 4 seconds and required the additional allocation of an estimated 0 MB ??? Error using ==> icp Too many output arguments. Error in ==> ft_volumerealign at 639 [R, t, err, ~, info] = icp(scalp.pnt', shape.pnt', 50, 'Minimize', 'plane', 'Normals', nrm', 'Weight', weights, 'Extrapolation', true, 'WorstRejection', 0.05); >> which icp /home/robert/matlab/fieldtrip/external/fileexchange/icp.m


Robert Oostenveld - 2013-10-14 23:59:43 +0200

Created attachment 530 input arguments for ft_volumerealing


Robert Oostenveld - 2013-10-15 00:02:55 +0200

note that 1) the use of ~ as output argument is not in line with http://fieldtrip.fcdonders.nl/development/guidelines/code#ensure_that_it_runs_on_older_matlab_versions 2) the ft_volumerealign function has an internal subfunction that goes under the name icp2, but it does not seem to be used. Perhaps it can be removed. 3) the local beer in Stockholm is quite nice 4) I don't understand why this works for the hcp. But that might be due to the beer.


Jan-Mathijs Schoffelen - 2013-10-21 16:14:29 +0200

(In reply to comment #2) @1: You're right. I changed the number of outputs to icp, to get some additional diagnostic information from this function easily available. I guess I forgot to commit this change to the repository. Will do this. @2: Yes, I'll remove it. @3: The wodka in St.Petersburg was nice too. @4): Neither do I, but it could be due to the fact that I copied a locally compiled version of the executable to chpc...


Jan-Mathijs Schoffelen - 2013-10-21 16:41:29 +0200

I updated fieldtrip/external/fileexchange/icp.m and removed the subfunctions from ft_volumerealign. Should work now. Could you give it a try?