%--------------------------------------------------------------------%
% Alison Chaiken, sole author and maintainer %
% ------------------------------------------------------ %
% GUI-based Matlab and FEMLAB data analysis, instrument %
% control, statistical analysis, finite-element modelling, %
% image acquisition and analysis %
% ------------------------------------------------------- %
% alchaiken@gmail.com %
% http://www.exerciseforthereader.org/ %
% (001)650-279-5600 %
%--------------------------------------------------------------------%
% Rather than 'Figure N', display useful information in the title of a
% graphic produced by Image Section Generator
set(gcf,'NumberTitle','off')
% reread handles in case current copy isn't fresh
%handles=guidata(hObject);
if (gcf == handles.Image)
set(gcf,'Name',get(handles.ImageFileName,'string'))
imagedepth = log2(handles.ScaleMax);
paramstring=sprintf('%d-bit %s image of size %dx%d.',imagedepth,handles.ImageType,handles.ImageHeight,handles.ImageWidth);
texth = text(0,-15,paramstring);
set(texth,'fontsize',18,'color','yellow')
elseif (gcf == handles.SectionPlot)
if (get(handles.RowColumnChoiceButton,'value'))
if (get(handles.HorizontalButton,'value'))
rcstring = 'row';
else rcstring = 'column';
end
coordstring = sprintf('Section across %s at %s %.0f',get(handles.ImageFileName,'string'), ...
rcstring,get(handles.NumericSectionLocation,'value'));
else
coords = get(handles.Image,'UserData');
coordstring = sprintf('Section across %s at (%.0f,%.0f) to (%.0f,%.0f)',get(handles.ImageFileName,'string'), ...
coords(1,1),coords(1,2),coords(2,1),coords(2,2));
end
set(gcf,'Name',coordstring)
end
guidata(hObject,handles)