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.

fgetcontext
function fgetcontext
%Version 4/3/09
%Displays the dialog box for entering the context for the output images.
global byedit fontpics h_getcontextfig context darkgreen

x = .3; y = .4; w = .4; h = .2;
h_getcontextfig = figure('Color', darkgreen, 'units','normalized','ToolBar','none','name','Context','NumberTitle','off','menubar','none','position',[ x y w h ] );
uicontrol( 'units', 'normalized', 'style', 'text', 'string', 'Enter the surrounding context, in pixels, for output files', 'position', [ .05 9/12 .9 .15],'background','black','fore','white', 'fontsize', fontpics );
byedit   = uicontrol( h_getcontextfig, 'units', 'normalized','background','white', ...
    'style', 'edit', 'string', num2str( context ), 'position', [ .45 5/12 .1 .15 ], 'value', fontpics, 'fontsize', fontpics );
uicontrol( 'style','pushbutton', 'units', 'normalized',  'string','Done',...
    'position',[ 1/3 1/12 1/3 1/6 ], 'callback',@fgetcontext2_callback, 'fontsize', fontpics);

function fgetcontext2_callback( gcf, eventdata, handles )
%Version = 9/26/07
%Gets the font size from the text box.
global context byedit h_getcontextfig
limitstring = get( byedit, 'string' );
context = str2double( limitstring );
context = round(context);
if (isempty(limitstring == 1))
    context = 0;
elseif context < 0
    context = 0;
end   
close(h_getcontextfig);
fupdate;


Contact us