Back to the main page.

Bug 1926 - test_ft_prepare_singleshell fails

Status CLOSED FIXED
Reported 2013-01-15 14:29:00 +0100
Modified 2013-06-06 15:10:52 +0200
Product: FieldTrip
Component: forward
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P3 normal
Assigned to: Johanna
URL:
Tags:
Depends on:
Blocks:
See also:

Johanna - 2013-01-15 14:29:11 +0100

I have just updated this test function with comments describing one of the problems. There is a difference in result of vol output from the old and new way (vol2 and vol2b in the code), both in fields (.tri exist or not) and in values of .pnt (not just due to units or numerical accuracy, but actual differences). This problem was there before, but I re-discovered it during my changes to ft_prepare_headmodel.


Johanna - 2013-01-16 17:05:06 +0100

Just spoke with JM. He said that .tri should indeed be in the output of ft_prepare_headmodel with cfg.method=singleshell. Currently it is not (neither before or after my changes yesterday), but was output with the old way of ft_prepare_singleshell, because ft_prepare_mesh was called within ft_prepare_singleshell if .tri did not exist. However, now ft_headmodel_singleshell is not doing much, and it's in the trunk/forward directory, thus (I believe) is not allowed to call a higher function in trunk/. Thus, ft_prepare_mesh should be called within ft_prepare_headmodel just prior to calling ft_headmodel_singleshell. The question then is what should be the default cfg.numvertices as input to ft_prepare_mesh? ft_prepare_headmodel sets 3000 as the default value, which is fine for creating a mesh based on segmented volume, but perhaps if mesh is being created from .pnt, then the number of .pnt should be default (and would be consistent with old code)? However, I note that JM votes for using the default 3000.


Johanna - 2013-01-23 14:24:57 +0100

svn commit 7384 to call ft_prepare_mesh within ft_prepare_headmodel with cfg.method=singleshell, with no numvertices given thus mesh created uses number of .pnt given as input. svn commit 7385 to ft_prepare_mesh so that output has .unit field test_ft_prepare_singleshell now runs without error.