Back to the main page.

Bug 3107 - ft_volumerealign problem with scalp.pos / scalp.pnt

Status CLOSED FIXED
Reported 2016-04-18 17:59:00 +0200
Modified 2019-08-10 12:33:19 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Mac OS
Importance: P5 normal
Assigned to:
URL:
Tags:
Depends on:
Blocks:
See also:

Gaetan - 2016-04-18 17:59:50 +0200

Hi all, there is still some issue (producing error) with the .pos field in this function: ft_volumerealign.m When the "headshape" switch case, starting at line 726: fiedltrip expects a field scalp.pos but the output of ft_transform_geometry (line 699) only provide a field scalp.pnt. Maybe a "quick and dirty" fix would be to add one line just before line 726: scalp.pos = scalp.pnt I'm looking forward your advice! Best, Gaetan


Gaetan - 2016-04-19 14:57:50 +0200

Created attachment 789 headshape to reproduce the error


Gaetan - 2016-04-19 14:58:23 +0200

Created attachment 790 snippet of code to reproduce the error


Gaetan - 2016-04-19 15:01:17 +0200

Hi fieldtrip's expert, following my previous bug report, please find some attachments to produce the error: Reference to non-existent field 'pos'. Error in ft_volumerealign (line 726) nrm = normals(scalp.pos, scalp.tri, 'vertex'); I'm looking forward your advice! Thanks in advance. Best, Gaƫtan


Thomas Hartmann - 2016-04-19 15:35:48 +0200

hi, problem is in prepare_mesh_segmentation. see this pull request for the fix: https://github.com/fieldtrip/fieldtrip/pull/135 cheers, thomas


Gaetan - 2016-04-19 15:49:26 +0200

Hi, thanks Thomas. I have found another bug related to ft_volume-realign. Do you think this pull request will get rid of this other error? When I run manual coregistration: load('headshape_coreg.mat'); load mni_mri cfg = []; cfg.method = 'headshape'; cfg.coordsys = 'neuromag'; cfg.headshape.headshape = shape; cfg.headshape.interactive = 'yes'; cfg.headshape.icp = 'no'; mri_out = ft_volumerealign(cfg,mni_mri); You get this: Error using cell/ismember (line 34) Input A of class cell and input B of class cell must be cell arrays of strings, unless one is a string. Error in ft_senstype (line 303) if (mean(ismember(ft_senslabel('ant128'), sens.label)) > 0.8) Error in ft_datatype_sens (line 138) ismeg = ft_senstype(sens, 'meg'); Error in ft_checkconfig (line 250) cfg.elec = ft_datatype_sens(cfg.elec); Error in ft_interactiverealign (line 71) cfg.template = ft_checkconfig(cfg.template, 'renamed', {'vol', 'headmodel'}); Error in ft_volumerealign (line 691) tmpcfg = ft_interactiverealign(tmpcfg); I don't understand this one... Is it related to pnt/pos? Cheers, Gaetan


Thomas Hartmann - 2016-04-19 15:59:10 +0200

(In reply to Gaetan from comment #5) checking now. but it seems to be unrelated


Thomas Hartmann - 2016-04-19 16:47:38 +0200

(In reply to Thomas Hartmann from comment #6) ok, the error was unrelated. i created a separate push request.


Robert Oostenveld - 2016-04-19 17:38:06 +0200

(In reply to Thomas Hartmann from comment #7) https://github.com/fieldtrip/fieldtrip/pull/135 wrote there are still some .pnt fields left in prepare_mesh_segmentation. thus pull request fixes this You can view, comment on, or merge this pull request online at: https://github.com/fieldtrip/fieldtrip/pull/135 Commit Summary FIX - renamed pnt to pos in prepare_mesh_segmentation File Changes M private/prepare_mesh_segmentation.m (16) Patch Links: https://github.com/fieldtrip/fieldtrip/pull/135.patch https://github.com/fieldtrip/fieldtrip/pull/135.diff --- I merged it.


Jan-Mathijs Schoffelen - 2016-04-20 09:46:06 +0200

change status. OK?


Thomas Hartmann - 2016-04-20 09:55:19 +0200

(In reply to Jan-Mathijs Schoffelen from comment #9) yepp, thanks!


Robert Oostenveld - 2019-08-10 12:33:19 +0200

This closes a whole series of bugs that have been resolved (either FIXED/WONTFIX/INVALID) for quite some time. If you disagree, please file a new issue on https://github.com/fieldtrip/fieldtrip/issues.