Skip to content

Commit

Permalink
goto fn: Added option 'all' to search through all scansets
Browse files Browse the repository at this point in the history
  • Loading branch information
aditiiyer committed May 10, 2017
1 parent edf0228 commit c4f50e7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
15 changes: 11 additions & 4 deletions CERR_core/CommandLine/runCERRCommand.m
Expand Up @@ -578,19 +578,26 @@
% Pass variable to "goto" command
goto('max')

elseif numWords == 4

elseif numWords > 3
if numWords==4
w4 = word(in_str,4);
w4 = str2num(w4); % only numeric data type supported
goto(w3,w4)

else

elseif strcmpi(word(in_str,5),'all')
w4 = word(in_str,4);
w4 = str2num(w4); % only numeric data type supported
w5 = word(in_str,5);
goto(w3,w4,w5)

else
% Get the slice number passed
num = str2num(word(in_str,3));

% Pass variable to "goto" command
goto('slice',num);
end

end

case 'mask' %show a spy mask of values included in an ROI
Expand Down
8 changes: 8 additions & 0 deletions CERR_core/Utilities/goto.m
Expand Up @@ -129,11 +129,19 @@ function goto(command,varargin)

val = varargin{1};
hAxis = gca;
if nargin==2
% Find the scan displayed on the current axis
scanSet = getAxisInfo(hAxis,'scanSets');
scanTypesC = {planC{indexS.scan}(:).scanType};
scanType = planC{indexS.scan}(scanSet).scanType;
scanNumsV = find(strcmpi(scanType,scanTypesC));
else
if ~strcmp (varargin{2},'all')
return
else
scanNumsV = 1:length(planC{indexS.scan});
end
end
% Loop through scans and slices to find the matching tag
%numScans = length(planC{indexS.scan});
for scanNum = scanNumsV
Expand Down

0 comments on commit c4f50e7

Please sign in to comment.