Home > SuperSegger > viz > showSegDataPhase.m

showSegDataPhase

PURPOSE ^

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

SYNOPSIS ^

function showSegDataPhase( data, viewport )

DESCRIPTION ^

 showSegDataPhase : draws the outlines for the regions in the data file.
 Displays in red the fixed segments, in orange the good/true segments
 and in blue the bad/false segments.

 INPUT :
   data : data (seg.mat) file with permanent, good and bad segments
   viewport : used for viewing in the gui

 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 showSegDataPhase( data, viewport )
0002 % showSegDataPhase : draws the outlines for the regions in the data file.
0003 % Displays in red the fixed segments, in orange the good/true segments
0004 % and in blue the bad/false segments.
0005 %
0006 % INPUT :
0007 %   data : data (seg.mat) file with permanent, good and bad segments
0008 %   viewport : used for viewing in the gui
0009 %
0010 % Copyright (C) 2016 Wiggins Lab
0011 % Unviersity of Washington, 2016
0012 % This file is part of SuperSeggerOpti.
0013 
0014 if isempty(data)
0015     return;
0016 end
0017 
0018 if exist('viewport','var') && ~isempty(viewport)
0019     axes(viewport);
0020 end
0021 
0022     back = double(ag( data.phase ));
0023     segs_good = data.segs.segs_good;
0024     segs_bad  = data.segs.segs_bad;
0025     mask_bg   = data.mask_bg;
0026     segs_3n   = data.segs.segs_3n;
0027     cell_mask = (mask_bg .* ~segs_good .* ~segs_3n);
0028     outline = imdilate( cell_mask, strel( 'square',3) );
0029     outline = ag(outline-cell_mask);
0030     image(uint8(cat(3,back + 1.00*double(outline),...
0031     back + 0.4*double(ag(segs_good)) + 0.3*double(ag(segs_bad)),...
0032     back + 0.7*double(ag(segs_bad)) + 0.2*double(ag(~cell_mask)-outline) )));
0033     drawnow; 
0034 
0035 end

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