diff --git a/arrShow.m b/arrShow.m index 4816eb6..8b10177 100644 --- a/arrShow.m +++ b/arrShow.m @@ -166,7 +166,7 @@ MARKER_COL_REAL= 'yellow'; % default marker color for real valued images end - properties (Access = private); + properties (Access = private) updFigCount = 0; % counter for updateFig calls for % debugging and speed improvements @@ -260,8 +260,8 @@ otherwise error('arrShow:varargin','unknown option [%s]!\n',option); - end; - end; + end + end clear('option','option_value'); clear('varargin'); % If we don't explicitly delete it here, @@ -619,7 +619,7 @@ function refreshRelativesList(obj) end if obj.roiExists() - if obj.roi.getSendPositionToggle(); + if obj.roi.getSendPositionToggle() obj.roi.callSendPositionCallback; end end @@ -787,7 +787,7 @@ function batchExportDimension(obj, dim, filename, createMovie, framerate,... % loop through all frames in the export dimension obj.selection.setCurrentVcValue(1); - for i = 1 : dims(dim); + for i = 1 : dims(dim) if createMovie obj.exportCurrentImage(vwObj,... screenshot, includePanels, includeCursor, scrshotPauseTime); @@ -917,7 +917,7 @@ function exportCurrentImage(obj, filenameOrVideoWriterObj, screenshot, includePa return; end - if exist(filenameOrVideoWriterObj,'file'); + if exist(filenameOrVideoWriterObj,'file') fprintf('Fig. %d: overwriting existing file: %s\n',obj.getFigureNumber, filenameOrVideoWriterObj); end end @@ -1085,7 +1085,7 @@ function exportImageInfos(obj, filename, appendToFile) % windowing cmap = obj.getColormap; - if isnumeric(cmap); + if isnumeric(cmap) cmap = 'custom'; end @@ -1129,7 +1129,7 @@ function exportImageInfos(obj, filename, appendToFile) % write everything to the text file - for i = 1 : size(text,1); + for i = 1 : size(text,1) fprintf(fid,'%s\n',text{i}); end @@ -1173,7 +1173,7 @@ function exportColorbar(obj, filename) end % check if file already exists - if exist(filename,'file'); + if exist(filename,'file') fprintf('Fig. %d: overwriting existing file: %s\n',obj.getFigureNumber(), filename); end @@ -1764,7 +1764,7 @@ function storeColormap(obj, file) file = [fpath, fname]; end if ~isempty(file) && ~isa(file,'double') - cm = colormap(obj.fh); %#ok the value is used in the save command + cm = colormap(obj.fh); % the value is used in the save command save(file,'cm'); end end @@ -1780,7 +1780,7 @@ function loadColormap(obj, file) end if ~isempty(file) cm = load(file,'cm'); - if isfield(cm,'cm'); + if isfield(cm,'cm') obj.setColormap(cm.cm); end end @@ -2566,10 +2566,10 @@ function playButtonCb() % check, if the image is selected (these lines were sufficient % in matlab versions prior 2014b) - if strcmp(get(selectedUiObj,'Type'), 'image'); + if strcmp(get(selectedUiObj,'Type'), 'image') bool = true; imageHandle = selectedUiObj; - elseif(strcmp(get(selectedUiObj,'Type'), 'rectangle')); + elseif(strcmp(get(selectedUiObj,'Type'), 'rectangle')) % ...and here comes the ugly part: % try to get the selected image from the childs of the % parent of the rectangle... @@ -2773,7 +2773,7 @@ function createSurfacePlot() fprintf('Surface plot currently works on single images.\n'); return end - if isa(imgs,'single'); + if isa(imgs,'single') imgs = double(imgs); fprintf('Surface plot don''t work with single precision images. Converting to double...\n'); %...this holds true at least for matlab R2013a @@ -3405,7 +3405,7 @@ function updFig(obj) % get the toggle state of 'keep aspect ratio' context menu % entry - switch get(obj.mbh.aspectRatio,'Checked'); + switch get(obj.mbh.aspectRatio,'Checked') case 'on' aspectRatio = true; case 'off' @@ -3619,7 +3619,7 @@ function updFig(obj) end function errorHandlerInvalidData(obj, ME) - if any(strfind(ME.identifier,'ExpectedFinite')) || ~obj.processingError; + if any(strfind(ME.identifier,'ExpectedFinite')) || ~obj.processingError % apparently there are invalid values in the data fprintf('DATA CONTAINS INFINITE VALUES.\nFORCING FULL DATA INSPECTION...'); @@ -3939,7 +3939,7 @@ function buttonDownCb(obj,src,~) % check if the current axes has changed currAxes = get(imageHandle,'Parent'); lastAxes = obj.window.getAxesHandle(); - if currAxes ~= lastAxes; + if currAxes ~= lastAxes % if so: % delete cursor rectangle from last Axes ud = get(lastAxes,'UserData'); @@ -3970,7 +3970,7 @@ function buttonDownCb(obj,src,~) % check if we did a middle-button click on the image [bool, imageHandle] = obj.isImageSelected(); - if bool && obj.window.getIsEnabled(); + if bool && obj.window.getIsEnabled() % assure that the windowClass is linked to the % clicked image @@ -4001,7 +4001,7 @@ function buttonDownCb(obj,src,~) end case 'open' %double click - if obj.window.getIsEnabled(); + if obj.window.getIsEnabled() obj.window.resetWindowing(); obj.mouseMovementMode = 0; obj.equalizeWindowing(); @@ -4023,7 +4023,7 @@ function buttonUpCb(obj,src) if strcmp(get(src,'SelectionType'), 'extend') % ...and for multiframe views: % update the windowing of all frames - if obj.window.getIsEnabled(); + if obj.window.getIsEnabled() obj.equalizeWindowing(); end end @@ -4066,7 +4066,7 @@ function mouseMovementCb(obj) currAxes = get(obj.ih(i),'Parent'); position = get(currAxes,'CurrentPoint'); - if arrShow.mouseInsideAxes(position, currAxes); + if arrShow.mouseInsideAxes(position, currAxes) x = round(position(1,1)); y = round(position(1,2)); @@ -4203,7 +4203,7 @@ function exportAllGlobalArrayImages() global asObjs; - if isa(arr,'arrShow'); + if isa(arr,'arrShow') newObj = arr.rebuildObject(varargin{:}); else if isa(arr,'arrShow2') || isa(arr,'arrShow3') diff --git a/asCursorPosClass.m b/asCursorPosClass.m index 5e66cd7..b6d781b 100644 --- a/asCursorPosClass.m +++ b/asCursorPosClass.m @@ -62,7 +62,7 @@ asObj = []; end - methods (Access = public); + methods (Access = public) function obj = asCursorPosClass(... parentFigureHandle,... parentPanelHandle,... @@ -118,7 +118,7 @@ function changePrecisionDlg(obj) try num2str(2.3,newPrec); catch me - if strcmp(me.identifier, 'MATLAB:num2str:fmtInvalid'); + if strcmp(me.identifier, 'MATLAB:num2str:fmtInvalid') fprintf('Invalid precision string format\n'); newPrec = []; % promt for reenter @@ -485,7 +485,7 @@ function updateLayout(obj) else if pw > 6 % reduced mode (3 panels) - if obj.complexMode; + if obj.complexMode createPanel = [1, 0, 0, 1, 1]; % [P, R, I, A, P] else @@ -495,7 +495,7 @@ function updateLayout(obj) else if pw > 4 % reduced mode (2 panels) - if obj.complexMode; + if obj.complexMode createPanel = [1, 0, 0, 1, 0]; % [P, R, I, A, P] else @@ -504,7 +504,7 @@ function updateLayout(obj) end else % single mode (only 1 panel) - if obj.complexMode; + if obj.complexMode createPanel = [0, 0, 0, 1, 0]; % [P, R, I, A, P] else diff --git a/asDataClass.m b/asDataClass.m index c73d716..c3ba0a7 100644 --- a/asDataClass.m +++ b/asDataClass.m @@ -187,9 +187,9 @@ function rot90(obj, k) obj.dat = permute(obj.dat,newOrder); if k == 1 - obj.dat = flipdim(obj.dat,colDims(1)); + obj.dat = flip(obj.dat,colDims(1)); else - obj.dat = flipdim(obj.dat,colDims(2)); + obj.dat = flip(obj.dat,colDims(2)); end @@ -203,7 +203,7 @@ function rot90(obj, k) function flipDim(obj,dim) if obj.enableDestrFun - obj.dat = flipdim(obj.dat,dim); + obj.dat = flip(obj.dat,dim); obj.updFig(); end end @@ -328,7 +328,7 @@ function setDestructiveSelectionString(obj, str) end % make sure that there is a semicolon at the end of the string - if ~any(strfind(str,';')); + if ~any(strfind(str,';')) str = [str,';']; end @@ -691,7 +691,7 @@ function overwriteImageArray(obj, arr) error('asDataClass:validateImageArray','input dataArrayay has to be at least 2 dimensional'); end - if issparse(dataArray); + if issparse(dataArray) dataArray = full(dataArray); end diff --git a/asSelectionClass.m b/asSelectionClass.m index e88c554..28f83d2 100644 --- a/asSelectionClass.m +++ b/asSelectionClass.m @@ -75,8 +75,8 @@ otherwise warning('asSelectionClass:unknownOption',... 'unknown option [%s]!\n',option); - end; - end; + end + end end @@ -213,7 +213,7 @@ function selectVco(obj,selVcoNr) if retNumAsStr addr{i} = str; else - [num,sflag] = str2num(str); %#ok str is not necessarily a scalar + [num,sflag] = str2num(str); % str is not necessarily a scalar if sflag == 0 addr{i} = str; else diff --git a/asValueChangerClass.m b/asValueChangerClass.m index 2ea1cfa..e106d18 100644 --- a/asValueChangerClass.m +++ b/asValueChangerClass.m @@ -525,7 +525,7 @@ function setOffset(obj, offs, runUserCb) % add the offset to the value in the string (to keep the % actually selected frame constant) origSel = str2double(origSelStr); - if isnan(origSel); + if isnan(origSel) % if the current selection cannot be transformed into a % double, just address the first frame by default newSel = 1 - offs; @@ -788,7 +788,7 @@ function runUserCb(obj) if nr > obj.max nr = obj.max; else - if nr < obj.min; + if nr < obj.min nr = obj.min; end end