Code covered by the BSD License  

Highlights from
FRETSCAL

image thumbnail

FRETSCAL

by

 

For the FRET analysis of images of yeast cells labeled with YFP and CFP.

getboundary
function getboundary
%Version 4/3/09 Presents the splash screen where one enters the inner and
%outer boundaries of the ring used for background.
global   byedit1 byedit2 m5f m5b fontpics bringincr bringthick h_getringsfig darkgreen

x = .3; y = .4; w = .4; h = .3;
h_getringsfig = figure('Color', darkgreen, 'units','normalized','name','Background Parameters','ToolBar','none','NumberTitle','off','menubar','none','position',[ x y w h ], 'name', 'Boundary limits for background' );
uicontrol( 'units', 'normalized', 'style', 'text', 'string', 'The ring for determining background begins this number of pixels from the outer edge of the AOI', 'position', [ .1 .8 .8 .15 ], 'background','black','fore','white','fontsize', fontpics );
byedit1 = uicontrol( h_getringsfig,'units','normalized',...
    'style', 'edit', 'string', num2str( bringincr ),'fore', m5f, 'back', m5b, 'position', [ .45 .65 .1 .1 ], 'value', bringincr, 'fontsize', fontpics );
uicontrol( 'units', 'normalized', 'style', 'text', 'string', 'Thickness of background ring, in pixels', 'position', [ .2 5/12 .6 .15],'background','black','fore','white', 'fontsize', fontpics );
byedit2   = uicontrol( h_getringsfig,'units','normalized',...
    'style', 'edit', 'string', num2str( bringthick ), 'fore', m5f, 'back', m5b,'position', [ .45 3/12 .1 .1 ], 'value', bringthick, 'fontsize', fontpics );
uicontrol( 'style','pushbutton', 'units', 'normalized',  'string','Done',...
    'position',[ .4 .05 .2 .1 ], 'callback',@fgetbring_callback, 'fontsize', fontpics);


function fgetbring_callback( gcf, eventdata, handles )
global   byedit1 byedit2 bringincr bringthick h_getringsfig progbarcol

limitstring = get( byedit1, 'string' );
input = str2double( limitstring );
bringincr = round(input);
if bringincr < 1
    bringincr = 1;
elseif (isempty(limitstring == 1))
    bringincr = 1;
end
limitstring = get( byedit2, 'string' );
input = str2double( limitstring );
bringthick = round(input);
if bringthick < 1
    bringthick =1;
elseif (isempty(limitstring == 1))
    bringthick =1;
end
close(h_getringsfig);
progbarcol = 'red';
fupdate

Contact us