Back to the main page.
Bug 2431 - mpi_customized_acticap64 layout can be improved
Status | CLOSED FIXED |
Reported | 2014-01-08 15:44:00 +0100 |
Modified | 2019-08-10 12:29:40 +0200 |
Product: | FieldTrip |
Component: | core |
Version: | unspecified |
Hardware: | PC |
Operating System: | Windows |
Importance: | P5 enhancement |
Assigned to: | Arjen Stolk |
URL: | |
Tags: | |
Depends on: | |
Blocks: | |
See also: |
Jörn M. Horschig - 2014-01-08 15:44:11 +0100
cfg = []; cfg.layout = 'mpi_customized_acticap64'; cfg.feedback = 'yes'; lay = ft_prepare_layout(cfg); disp(lay) lay = pos: [66x2 double] label: {66x1 cell} width: [66x1 double] height: [66x1 double] mask: {[72x2 double]} outline: {[123x2 double]} there is a mask-field and an outline-field. The mask-field is plotted beneath the outline (no clue why) by ft_plot_lay. In any case, in the ideal world the outline and the mask should perfectly overlap. I would propose to stick to the 'standard' way of separating the outline once into the circle and then add three other outlines for the ears and the nose, so that we got something like: outline: {[101x2 double] [3x2 double] [10x2 double] [10x2 double]} mask: {[101x2 double]} with outline{1} == mask{1} [above example is taken from the easycap layouts]
Robert Oostenveld - 2014-01-08 17:22:27 +0100
ft_plot_lay is meant to plot both the outline and the mask, as they are very different for ECoG data (where the outline is the sulcal pattern). But the "circle part" of the outline should indeed be the same as the mask.
Jörn M. Horschig - 2014-01-09 09:43:06 +0100
okay, but should there then be an option for ft_plot_lay to disable plotting the mask? g. ft_multiplotER uses ft_plot_lay and then also plots the mask as a dotted line, which I would consider to be not desired when plotting data
Arjen Stolk - 2014-01-29 17:14:14 +0100
Still not perfect, but still a big improvement, is by inserting coordinates in the mask field, from the outline field, that are closest to that mask field. This allows realigning the two, without having the ugly mismatches, i.e.: lay2=lay; for c = 1:72 G = repmat(lay.mask{1}(c,:),123,1); G2 = lay.outline{1}; D = sqrt(sum( (G - G2).^ 2 ,2)); [Dval,idx] = min(D); lay2.mask{1}(c,:) = lay.outline{1}(idx,:); end The new lay (here called lay2) has a mask that is below the outline (but with some negligible mismatches). I have updated the lay, closing the bug.