Home > SuperSegger > viz > showCellOutline.m

showCellOutline

PURPOSE ^

showCellOutline : draws the outlines for the regions in the data file.

SYNOPSIS ^

function im = showCellOutline( data )

DESCRIPTION ^

 showCellOutline : draws the outlines for the regions in the data file.

 INPUT :
   data : data (seg.mat) file with permanent, good and bad segments

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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function im = showCellOutline( data )
0002 % showCellOutline : draws the outlines for the regions in the data file.
0003 %
0004 % INPUT :
0005 %   data : data (seg.mat) file with permanent, good and bad segments
0006 %
0007 % Copyright (C) 2016 Wiggins Lab
0008 % Unviersity of Washington, 2016
0009 % This file is part of SuperSeggerOpti.
0010 
0011 if isempty(data)
0012     return;
0013 end
0014 
0015 back = double(ag( data.phase ));
0016 segs_good = data.segs.segs_good;
0017 mask_bg   = data.mask_bg;
0018 segs_3n   = data.segs.segs_3n;
0019 cell_mask = (mask_bg .* ~segs_good .* ~segs_3n);
0020 outline = imdilate( cell_mask, strel( 'square',3) );
0021 outline = ag(outline-cell_mask);
0022 im = uint8(cat(3,back + 1.00*double(outline),...
0023     back ,...
0024     back + 0.2*double(ag(~cell_mask)-outline) ));
0025 imshow(im);
0026 drawnow;
0027 
0028 end

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