Home > SuperSegger > frameLink > deleteRegions.m

deleteRegions

PURPOSE ^

deleteRegions : deletes regions in list_c from mask in data.

SYNOPSIS ^

function [data] = deleteRegions( data, list_c )

DESCRIPTION ^

 deleteRegions : deletes regions in list_c from mask in data. 

 INPUT :
       data: region (cell) data structure (seg/err) file
       list:  regions labels to be deleted
 OUTPUT :
       data : updated region (cell) data structure

 Copyright (C) 2016 Wiggins Lab
 University of Washington, 2016
 This file is part of SuperSeggerOpti.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [data] = deleteRegions( data, list_c )
0002 % deleteRegions : deletes regions in list_c from mask in data.
0003 %
0004 % INPUT :
0005 %       data: region (cell) data structure (seg/err) file
0006 %       list:  regions labels to be deleted
0007 % OUTPUT :
0008 %       data : updated region (cell) data structure
0009 %
0010 % Copyright (C) 2016 Wiggins Lab
0011 % University of Washington, 2016
0012 % This file is part of SuperSeggerOpti.
0013 
0014 try
0015     for uu = 1:numel(list_c)   
0016         mm = list_c(uu);
0017         [xx,yy] = getBB( data.regs.props(mm).BoundingBox);
0018         tmp = (data.regs.regs_label(yy,xx) == mm);
0019         data.regs.regs_label(yy,xx) = data.regs.regs_label(yy,xx)-mm*tmp;
0020         data.mask_cell(yy,xx) = data.mask_cell(yy,xx) - tmp;
0021     end
0022 catch ME
0023    printError(ME);
0024 end
0025 
0026 
0027 end

Generated on Thu 19-Jan-2017 13:55:21 by m2html © 2005