Format NlmParamRadiusGui.m

This commit is contained in:
2024-07-25 15:03:45 -04:00
parent d1b7c87d0b
commit a3fa3f510e

View File

@@ -1,5 +1,5 @@
%% CALLED BY par4Gbl_Main8c.m %%
function NImParamRadiusGui(expDir) %, numOfPrtTimes) 122111replace removed
function NImParamRadiusGui(expDir)
global SWsingleSc
global SWgrowthArea
%global selScan
@@ -17,6 +17,7 @@ global numRows;
global numCols;
global scanSize
global scanMax
defImParMat=[1, 1, 15, 34, 24, 1,0,0,1,14,1,18]; %Ncode ImRobot adaptation
if ImParMat(3)==0 || ImParMat(4)==0 ||ImParMat(5)==0 || ImParMat(10)==0 ||ImParMat(11)==0
ImParMat=defImParMat;
@@ -30,29 +31,24 @@ MPnum=1;
destPerMP=1;
selScan=1;
SWgrowthArea=1;
if exist(fullfile(resDir,'PTmats','NImParameters.mat'))
load(fullfile(resDir,'PTmats','NImParameters'));
else
load NImParameters
end
ImParMat;
%end
%if ~exist('CSearchRange','var') || isempty(CSearchRange)
if ~isequal(exist(fullfile(resDir,'Fotos','CSearchRange.mat')),0)
load(fullfile(resDir,'Fotos','CSearchRange'))
CSearchRange;
end
% yInitPos=0.30;
xPos=0.05;
btnWid=0.10;
btnHt=0.05;
spacing=0.02;% Spacing between the button and the next command's label
%====================================
% The ADD Groups button
btnNumber=1;
yPos=0.85-(btnNumber-1)*(btnHt+spacing);
@@ -66,8 +62,6 @@ else
set(fhImParm,'Name','EASYconsole -Exp. Analysis NOT selected.')
end
btnNumber=5;
yPos=0.85-(btnNumber-1)*(btnHt+spacing);
btnPos=[xPos yPos-spacing btnWid btnHt];
@@ -90,7 +84,6 @@ user_entry = str2double(get(source,'string'));
Radius;
end
btnNumber=6;
yPos=0.85-(btnNumber-1)*(btnHt+spacing);
btnPos=[xPos yPos-spacing btnWid btnHt];
@@ -112,7 +105,7 @@ user_entry = str2double(get(source,'string'));
ImParMat(6)=Dither;
Dither;
end
%-------------------77777----------- Added July 7,2015 to allow Search Range constraint
btnNumber=7;
yPos=0.85-(btnNumber-1)*(btnHt+spacing);
btnPos=[xPos yPos-spacing btnWid btnHt];
@@ -139,7 +132,6 @@ hSearchRange = uicontrol(...
return
end
CSrchRng=user_entry;
end
% Ncode 12_0120 for reading in numeric folder names
@@ -186,19 +178,13 @@ user_entry=userStr(userIndx);
% set(hSearchRange,'string',num2str(ImParMat(12)))
end
end
%ImParMat(7)=MPnum
end
scLst;
%*****************************************************************
%-------------------10 10 10 10-----------
scLst;
btnNumber=10;
yPos=0.85-(btnNumber-1)*(btnHt+spacing);
btnPos=[xPos yPos-spacing btnWid btnHt];
hedit8=uicontrol(...
'Style', 'pushbutton',...
'String',{'Continue'},...
@@ -206,50 +192,38 @@ hedit8 = uicontrol(...
'Position', btnPos,...
'callback','uiresume(gcbf)');
%------------------------------
%***************************************************************
%********LABELS******************************
% The Labels
% Labels
xLPos=0.175;
yPos=0;
btnWid=0.20;
%-------------------55555-----------
lblNumber=5;
yPos=0.85-(lblNumber-1)*(btnHt+spacing);
btnPos=[xLPos yPos-spacing btnWid btnHt];
htxt=uicontrol(...
'Style', 'text',...
'String','Radius',... %'String','Width',...
'Units','normalized',...
'Position', btnPos);
%-------------------66666-----------
lblNumber=6;
yPos=0.85-(lblNumber-1)*(btnHt+spacing);
btnPos=[xLPos yPos-spacing btnWid btnHt];
htxt=uicontrol(...
'Style', 'text',...
'String','Dither',...
'Units','normalized',...
'Position', btnPos);
%-------------------77777-----------
lblNumber=7;
yPos=0.85-(lblNumber-1)*(btnHt+spacing);
btnPos=[xLPos yPos-spacing btnWid btnHt];
htxt=uicontrol(...
'Style', 'text',...
'String','SearchRange',...
'Units','normalized',...
'Position', btnPos);
uiwait(gcf);
for i=1:length(scLst)
CSearchRange(str2double(scLst(i)))=CSrchRng;
@@ -269,13 +243,5 @@ save((fullfile(resDir,'PTmats','NImParameters')), 'ImParMat');
save((fullfile(resDir,'Fotos','CSearchRange')),'CSearchRange');
close
return
end