Back to the main page.

Bug 1736 - implement a function in fieldtrip/private as replacement for imfill holes

Status ASSIGNED
Reported 2012-09-24 11:52:00 +0200
Modified 2012-09-24 17:50:58 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Mac OS
Importance: P3 normal
Assigned to: Robert Oostenveld
URL:
Tags:
Depends on:
Blocks:
See also:

Robert Oostenveld - 2012-09-24 11:52:30 +0200

this can replace the image processing toolbox version and should be based on the spm version of bwlabeln. It is currently used here manzana> grep imfill.*holes *.m ft_prepare_headmodel.m: im = imfill(slice,8,'holes'); ft_prepare_headmodel.m:seg = imfill((mri.seg==1), 'holes'); ft_volumesegment.m: im = imfill(slice,8,'holes'); manzana> grep imfill.*holes */*.m private/prepare_mesh_segmentation.m: mri.seg = mri.seg + imfill(mri.(cfg.tissue{i}), 'holes'); private/prepare_mesh_segmentation.m: seg = imfill((mri.seg==cfg.tissue(i)), 'holes'); private/prepare_mesh_segmentation_new.m: im = imfill(slice,8,'holes'); private/prepare_mesh_segmentation_new.m:% cmprtmnt = imfill(cmprtmnt,'holes'); private/validate_seg.m:tissue1 = imfill(tissue1,'holes'); private/validate_seg.m: air = ~imfill(tissue1|tissue2|tissue3, 'holes'); private/validate_seg.m:holes = imfill(tissue1, 'holes') & ~tissue1; private/validate_seg.m: holes = imfill(tissue2, 'holes') & ~tissue2; private/validate_seg.m: holes = imfill(tissue3, 'holes') & ~tissue3;


Robert Oostenveld - 2012-09-24 17:50:23 +0200

I have implemented a private/volumefillholes.m function which is consistent with imfill holes. See SVN revision r6520 and rr6521. It should still be added to the other code and used where possible.