Back to the main page.

Bug 1075 - ft_prepare_singleshell doesn't work

Status CLOSED FIXED
Reported 2011-10-26 11:18:00 +0200
Modified 2011-11-11 11:20:01 +0100
Product: FieldTrip
Component: forward
Version: unspecified
Hardware: PC
Operating System: Linux
Importance: P1 normal
Assigned to: Cristiano Micheli
URL:
Tags:
Depends on:
Blocks:
See also:

Lilla Magyari - 2011-10-26 11:18:06 +0200

Created attachment 178 segmented mri hey, I've got an error message when I did this: load seg01; >> cfg = []; vol = ft_prepare_singleshell(cfg,seg); save vol01 vol; not downsampling anatomy not downsampling brain the call to "ft_volumedownsample" took 0 seconds and an estimated 0 MB using the segmentation approach using the segmented MRI triangulating the boundary of compartment 1 ??? Attempted to access cfg.numvertices(1); index out of bounds because numel(cfg.numvertices)=0. Error in ==> prepare_mesh_segmentation at 75 [pnt, tri] = triangulate_seg(seg, cfg.numvertices(i), ori); Error in ==> ft_prepare_mesh at 124 bnd = prepare_mesh_segmentation(cfg, mri); Error in ==> ft_prepare_singleshell at 89 vol.bnd = ft_prepare_mesh(cfg, mri); You can find seg attached. Lilla


Jan-Mathijs Schoffelen - 2011-10-26 11:48:45 +0200

Hi Cristiano, Could you have a look at this? On the other hand, at some point we need to change the documentation to ft_prepare_headmodel, and use ft_prepare_singleshell as a wrapper around this function (put in compat) Let's discuss at FT-meeting


Jan-Mathijs Schoffelen - 2011-10-31 11:15:39 +0100

prepare_mesh_segmentation still crashes on line 75 when ft_prepare_singleshell is called as: ft_prepare_singleshell([],seg). The cause I think is that the cfg.numvertices will be initialized to [], but that the subsref function for the config-object apparently does not properly deal with this, hence a low-level crash. What was the consideration to make cfg.numvertices by default empty?


Cristiano Micheli - 2011-10-31 20:03:45 +0100

(In reply to comment #2) > prepare_mesh_segmentation still crashes on line 75 when ft_prepare_singleshell > is called as: > ft_prepare_singleshell([],seg). > > The cause I think is that the cfg.numvertices will be initialized to [], but > that the subsref function for the config-object apparently does not properly > deal with this, hence a low-level crash. > > What was the consideration to make cfg.numvertices by default empty? Dear Jan-Matjis i regret i cant replicate the error. If i run your line of code with Lilla's segmentation everything runs slick. The need of an empty numvertices option - if hasdata = false - is commanded by the fact that the inputted surfaces should not be down-upsampled, unless explicitly set by the user. If hasdata is not empty the case is handled in the code (line 94). Let me know if this is the case with you as well otherwise we ll have to look into it more thoroughly. Best Cristiano


Robert Oostenveld - 2011-11-11 11:20:01 +0100

I closed all bugs that were recently resolved.