Code covered by the BSD License  

Highlights from
FRETSCAL

image thumbnail

FRETSCAL

by

Eric Muller

 

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

fgetCFPspill
function fgetCFPspill 
%Version 4/3/09
%Displays the dialog box for entering the CFP spillover factor.
%Updates the CFP spillover variable, CFPspill.
global CFPspill byedit frettype fontpics h_getCFPspillfig darkgreen

if( frettype == 1 )
  x = .37; y = .5; w = .26; h = .15; 
  h_getCFPspillfig = figure('Color', darkgreen, 'units','normalized','name','CFP Spillover Factor','ToolBar','none','NumberTitle','off','menubar','none','position',[ x y w h ] );
  uicontrol( 'units', 'normalized', 'style', 'text', 'string', 'Enter the CFP Spillover Factor', 'position', [ 1/8 9/12 6/8 1/6 ],'background','black','fore','white', 'fontsize', fontpics ); 
  byedit   = uicontrol( h_getCFPspillfig, 'units', 'normalized','background','white', ...
          'style', 'edit', 'string', num2str( CFPspill ), 'position', [ .4 5/12 .2 1/6 ], 'value', CFPspill, 'fontsize', fontpics ); 
  uicontrol( 'style','pushbutton', 'units', 'normalized',  'string','Done',...
            'position',[ 1/3 1/12 1/3 1/6 ], 'callback',@fgetCFPspill2_callback, 'fontsize', fontpics);
else
  stringerr = sprintf( 'Only FRET experiments allow changing CFP spillover factor' );
  uiwait( msgbox( stringerr, 'CFP spillover factor error', 'modal' ) );
end;

function fgetCFPspill2_callback( gcf, eventdata, handles )
%Version = 9/26/07
%Gets the CFP spillover variable from the text box.
global CFPspill byedit h_getCFPspillfig progbarcol
  limitstring = get( byedit, 'string' );
  CFPspill = str2double( limitstring );
  close(h_getCFPspillfig);
  progbarcol = 'red';
  fupdate;


Contact us