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