Back to the main page.

Bug 757 - ft_volumesegment smoothes anatomy when creating a scalp mask

Status CLOSED FIXED
Reported 2011-06-13 10:27:00 +0200
Modified 2011-06-15 15:09:47 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Mac OS
Importance: P1 normal
Assigned to: Jan-Mathijs Schoffelen
URL:
Tags:
Depends on:
Blocks:
See also:

Jan-Mathijs Schoffelen - 2011-06-13 10:27:47 +0200

This is due to the fact that spm_smooth (which is used for the smoothing) overwrites the original memory. matlab needs to create a new variable before the smoothing operation (just duplicating the variable does not work).


Jan-Mathijs Schoffelen - 2011-06-13 10:29:58 +0200

fixed by duplicating the variable, and enforcing matlab to copy it by anatomy = mri.anatomy; % duplication anatomy(1) = anatomy(1)+1-1; % copy