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.

fmaxpix
function fmaxpix
%Version 4/3/09 Displays the window that gets called with max pixel intensity.

global fontpics h_getlimitfig toobright lightgreen
global darkgreen slider1  start1  string1c sliderw valuew labelw
slidercol = [.8 .8 .9];
x = .35; y = .5; w = .3; h = .3; 
sliderw = w/2;
valuew  = w/10;
labelw  = 4*w/10;
smin= 0.5; smax=1.0; start1=toobright;
string1c = sprintf( 'Range is [ %5.2f,%5.2f ]', smin, smax);
h_getlimitfig = figure('Color', darkgreen,  'Color', darkgreen,'units','normalized','name','Upper Intensity Limit','ToolBar','none','NumberTitle','off','menubar','none','position',[ x y w h ]);
uicontrol( 'units', 'normalized', 'style', 'text', 'position', [ .05 .8 .9 .15], 'background','black','fore','white','fontsize', fontpics ); 
uicontrol( 'units', 'normalized', 'style', 'text', 'string', 'Maximum pixel intensity evaluated in tiff, computed as a fraction of the image max', 'position', [ .1 .8 .8 .15], 'background','black','fore','white','fontsize', fontpics ); 
  i = 1;
  txt1    = uicontrol(h_getlimitfig, 'style','text','string',sprintf('%4.2f',start1 ), ...
              'background','white','units','normalized', 'position', [.4 .3 .2 .1], 'background','black','fore','white','fontsize', fontpics ); 
  name1   = uicontrol(h_getlimitfig, 'style','text','string',string1c, 'HorizontalAlignment', 'center', ...
              'background','white','units','normalized', 'position', [ .15 .65  .7 .1 ],'background','black','fore','white', 'fontsize', fontpics ); 
  slider1 = uicontrol(h_getlimitfig, 'style','slider','units','normalized','background',slidercol, ...
            'position', [.1 .45 .8 .1], 'min',smin,'max',smax,'value',start1, ...
   'sliderstep',[ .02, .1],'userdata',txt1, 'callback',{@getlimits_callback, slider1, i }, 'fontsize', fontpics );
uicontrol( 'style','pushbutton', 'units', 'normalized',  'string','Done',...
            'position',[.4 .05 .2 .1 ], 'callback','close(gcf);fupdate','fontsize', fontpics);


function getlimits_callback( gcf, eventdata, handles, index )
global initialdone culldone inspectdone finaldone h_getlimitfig
global fontpics toobright slider1  start1  txt1 progbarcol

  start1 = get(slider1,'value');
 toobright =  (round(100*start1))/100;
  switch index
    case 1
      txt1  = uicontrol(h_getlimitfig, 'style','text','string',sprintf('%4.2f',start1 ), ...
              'background','black','fore','white','units','normalized', 'position',[.43 .3 .14 .1], 'fontsize', fontpics ); 
 end;
progbarcol = 'red'; 
  initialdone = 0;               % don't restore what you've just changed
  culldone    = 0;
  inspectdone = 0;
  finaldone   = 0;

Contact us