Am Dienstag, 24. August 2010, 18:55:02 schrieb Pen-Yuan Hsing:
% mosaic_GUI
% GUI created by VLF to implement Hanu's photo-mosaic software....
clear all;close all;
% Position the GUI in the middle of the screen
screenUnits=get(0,'Units');
set(0,'Units','pixels');
screenSize=get(0,'ScreenSize');
set(0,'Units',screenUnits);
mgui.figWidth=0.2*screenSize(3);
mgui.figHeight=0.4.*screenSize(4);
mgui.figPos=[0.01.*screenSize(3) 0.05.*screenSize(4) ...
mgui.figWidth mgui.figHeight];
figH_struct.hFig=figure('IntegerHandle','off','MenuBar','none',...
'NumberTitle','off','Units','pixels','Position',mgui.figPos,'Name','Mosaic
Controls');
num_buttons=3;
callback_str = sprintf('main');
make_push_command('SELECT& MATCH FEATURES', 1, num_buttons,callback_str );
%figures to close: figH_struct.imFig figH_struct.figdeet
callback_str = sprintf('render_mosaic');
make_push_command('MAKE MOSAIC', 2, num_buttons,callback_str );
callback_str = sprintf('close all;clear all');
make_push_command('CLOSE', 3, num_buttons,callback_str );
What I can quickly tell but there are possibly more things like that is that
some properties do not exist which are used in that script.
So systematically:
'units' is not implemeted in jhandles so you cannot use it (in your case this
is no problem, since you use anyway picxels as units).
So remove or comment the lines
screenUnits=get(0,'Units');
set(0,'Units','pixels');
The line
screenSize=get(0,'ScreenSize');
needs to be replaced by
screenSize=get(0,'MonitorPositions');
you can check which properties are avilable in this case by simply typing
get(0) and look what it outputs.
In
figH_struct.hFig=figure('IntegerHandle','off','MenuBar','none',...
'NumberTitle','off','Units','pixels','Position',mgui.figPos,'Name','Mosaic
Controls');
you need to remove again the 'units', 'pixels' and the 'MenuBar', 'none' (this
simply do not exist in octave now, probably in future versions).
Resulting in
figH_struct.hFig=figure('IntegerHandle','off', ...
'NumberTitle','off', 'Position',mgui.figPos,'Name','Mosaic Controls');
You proceed step by step this way trying to eliminate one incompatibility
after the other (there is of course still no guarantee that all this works at
the end as you want it or works at all).
Your original code may then look similar to this
% mosaic_GUI
% GUI created by VLF to implement Hanu's photo-mosaic software....
clear all;close all;
% Position the GUI in the middle of the screen
%screenUnits=get(0,'Units');
%set(0,'Units','pixels');
screenSize=get(0,'MonitorPositions');
%set(0,'Units',screenUnits);
mgui.figWidth=0.2*screenSize(3);
mgui.figHeight=0.4.*screenSize(4);
mgui.figPos=[0.01.*screenSize(3) 0.05.*screenSize(4) ...
mgui.figWidth mgui.figHeight];
figH_struct.hFig=figure('IntegerHandle','off', ...
'NumberTitle','off', 'Position',mgui.figPos,'Name','Mosaic Controls');
num_buttons=3;
callback_str = sprintf('main');
make_push_command('SELECT& MATCH FEATURES', 1, num_buttons,callback_str
);
%figures to close: figH_struct.imFig figH_struct.figdeet
callback_str = sprintf('render_mosaic');
make_push_command('MAKE MOSAIC', 2, num_buttons,callback_str );
callback_str = sprintf('close all;clear all');
make_push_command('CLOSE', 3, num_buttons,callback_str );
Be warned this is untested.
Hope that helps.
- mh