Back to the main page.

Bug 2756 - ft_volumerealign crash when plotting (looks for fields not present in mri)

Status CLOSED FIXED
Reported 2014-11-06 10:21:00 +0100
Modified 2019-08-10 12:29:42 +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:

Philipp Ruhnau - 2014-11-06 10:21:10 +0100

Dear fieldtrip-developers, I have been silent for a while, I hope that counts for something :) Anyway, with the most recent version ft_volumerealign doesn't work for us anymore (thanks to Carol Sanchez for finding this). What happens is that when reading an mri (tested different types) which results in something like: mri = anatomy: [256x256x256 double] dim: [256 256 256] transform: [4x4 double] unit: 'mm' cfg: [1x1 struct] (here resliced with ft_volumereslice, but that doesn't matter for the error) cfg=[]; cfg.method = 'interactive'; cfg.coordsys = 'neuromag'; mri_aligned = ft_volumerealign(cfg,mri); crashes with the error: Reference to non-existent field 'scalp'. Error in ft_volumerealign>cb_redraw_surface (line 927) ft_plot_mesh(opt.scalp, 'edgecolor', 'none', 'facecolor', 'skin') Error in ft_volumerealign (line 417) cb_redraw_surface(h); the problem is, as indicated, in the redraw_surface part wait, I just figured it out: the problem is, that in line 417 it shouldn't be cb_redraw_surface but cb_redraw cause obviously i want to align a non-segmented mri to fiducials or whatever. then it works. cheers p


Jim Herring - 2014-11-07 14:44:39 +0100

This is related to a recent addition allowing for clicking on surface plots for marking fiducials (r9928, see bug2707). The problem being that both in case cfg.viewmode = ortho & surface, cb_redraw_surface(h); is called, which in turn calls plot_mesh with opt.scalp as input. The latter only being available if there is surface data. As Philipp indeed suggested, it seems that the line should have been cb_redraw in case of ortho viewmode. I'll make the change.


Jim Herring - 2014-11-07 14:48:26 +0100

Comitted revision 9939


Robert Oostenveld - 2019-08-10 12:29:42 +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 describing the issue on https://github.com/fieldtrip/fieldtrip/issues.