From 875cc1bc33c8700dafa4c5483a058ac638caed5d Mon Sep 17 00:00:00 2001 From: ehennestad Date: Thu, 14 May 2026 11:52:51 +0200 Subject: [PATCH 01/14] Replace unused src/evt input with ~ Co-Authored-By: Claude Opus 4.7 --- .../+addons/@AddonManagerUI/AddonManagerUI.m | 2 +- .../DataLocationModelApp.m | 4 ++-- .../DataLocationModelUI.m | 2 +- .../FolderOrganizationUI.m | 18 ++++++++--------- .../@ModuleManagerUI/ModuleManagerUI.m | 2 +- .../+config/+varmodel/VariableModelApp.m | 2 +- .../+config/+varmodel/VariableModelUI.m | 20 +++++++++---------- .../+dataio/+session/FolderMatcherDialog.m | 4 ++-- .../@NansenUserSession/NansenUserSession.m | 4 ++-- code/+nansen/+notes/UiCreateNote.m | 6 +++--- .../PipelineAssignmentModelApp.m | 2 +- .../PipelineAssignmentModelUI.m | 8 ++++---- code/+nansen/+pipeline/PipelineBuilderUI.m | 14 ++++++------- code/+nansen/+pipeline/PipelineViewerApp.m | 8 ++++---- code/+nansen/+pipeline/TaskBatchViewer.m | 6 +++--- .../+extract/ImviewerPlugin.m | 2 +- .../+metatable/LegacyJavaMetaTableViewer.m | 20 +++++++++---------- code/+nansen/+ui/+widget/ButtonGroup.m | 2 +- code/+nansen/+ui/MetaTableColumnFilter.m | 2 +- code/apps/+fovmanager/+mapobject/Annotation.m | 2 +- code/apps/+fovmanager/@App/App.m | 12 +++++------ .../+plugin/@RoiManager/RoiManager.m | 10 +++++----- code/apps/+imviewer/@App/App.m | 4 ++-- code/apps/+mclassifier/manualClassifier.m | 8 ++++---- code/apps/+nansen/BatchProcessorUI.m | 6 +++--- code/apps/+nansen/TaskTable.m | 2 +- code/apps/+roiclassifier/@App/App.m | 6 +++--- code/apps/+roisignalviewer/@App/App.m | 8 ++++---- .../+pointerTool/eventAnnotator.m | 8 ++++---- code/apps/+signalviewer/@App/App.m | 10 +++++----- code/apps/+signalviewer/TimeAxis.m | 4 ++-- code/apps/+structeditor/App.m | 18 ++++++++--------- code/apps/roiSignalViewer.m | 8 ++++---- .../+roimanager/RoimanagerDashboard.m | 2 +- code/dashboards/MultiSessionFovSwitcher.m | 4 ++-- .../+nansen/+roisignals/RoiSignalArray.m | 2 +- .../+nansen/+stack/+metadata/StackMetadata.m | 2 +- .../+nansen/+stack/@ImageStack/ImageStack.m | 2 +- .../general/+utility/+data/CatalogViewerApp.m | 4 ++-- .../@uicontrolSchemer/uicontrolSchemer.m | 4 ++-- code/graphics/+applify/DashBoard.m | 2 +- code/graphics/+applify/ModularApp.m | 20 +++++++++---------- code/graphics/+applify/MultiPageApp.m | 2 +- code/graphics/+applify/UiControlTable.m | 2 +- code/graphics/+uics/multiSelectionDropDown.m | 6 +++--- code/graphics/+uics/rangeSelector.m | 8 ++++---- code/graphics/+uim/+abstract/Component.m | 4 ++-- code/graphics/+uim/+abstract/Control.m | 4 ++-- .../+uim/+abstract/virtualContainer.m | 4 ++-- code/graphics/+uim/+control/Button.m | 2 +- .../+uim/+dialog/createStringSelectorDialog.m | 2 +- code/graphics/+uim/+dialog/uiSearchSelect.m | 2 +- .../+uim/+interface/+pointerTool/axisZoom.m | 2 +- .../+uim/+interface/+pointerTool/crop.m | 10 +++++----- .../+uim/+interface/+pointerTool/dataCursor.m | 2 +- .../+uim/+interface/+pointerTool/pan.m | 2 +- .../+uim/+interface/+pointerTool/zoomIn.m | 2 +- .../+uim/+interface/+pointerTool/zoomOut.m | 2 +- .../+uim/+interface/abstractPointer.m | 4 ++-- .../graphics/+uim/+interface/pointerManager.m | 2 +- code/graphics/+uim/+widget/ChannelIndicator.m | 2 +- code/graphics/+uim/+widget/FrameMarker.m | 6 +++--- code/graphics/+uim/+widget/PageIndicator.m | 2 +- code/graphics/+uim/+widget/PlaneSwitcher.m | 2 +- code/graphics/+uim/+widget/PlaybackControl.m | 8 ++++---- code/graphics/+uim/+widget/StylableTable.m | 2 +- code/graphics/+uim/+widget/Waitbar.m | 2 +- code/graphics/+uim/+widget/rangeslider.m | 4 ++-- code/graphics/+uim/+widget/toolbar.m | 2 +- code/graphics/+uim/+widget/toolbar_.m | 2 +- code/graphics/+uim/+widget/wtoolbar.m | 2 +- code/graphics/+uim/AxesDialogBox.m | 2 +- code/graphics/+uim/UIComponentCanvas.m | 2 +- code/graphics/+uim/tabgroup.m | 4 ++-- code/graphics/+uim/wtabgroup.m | 4 ++-- .../+tablevariable/+session/DataLocation.m | 2 +- .../+pointerTool/RoiDisplayInputHandler.m | 2 +- .../+roimanager/+pointerTool/autoDetect.m | 8 ++++---- .../+roimanager/+pointerTool/circleSelect.m | 6 +++--- .../+roimanager/+pointerTool/freehandDraw.m | 6 +++--- .../tools/+roimanager/+pointerTool/polyDraw.m | 8 ++++---- code/tools/+roimanager/RoiTable.m | 10 +++++----- code/tools/+roimanager/RoiThumbnailDisplay.m | 6 +++--- code/tools/+roimanager/roiMap.m | 2 +- .../+nansen/+plugin/+imviewer/FluFinder.m | 2 +- 85 files changed, 218 insertions(+), 218 deletions(-) diff --git a/code/+nansen/+config/+addons/@AddonManagerUI/AddonManagerUI.m b/code/+nansen/+config/+addons/@AddonManagerUI/AddonManagerUI.m index 7f1b6bc8b..10f31c983 100644 --- a/code/+nansen/+config/+addons/@AddonManagerUI/AddonManagerUI.m +++ b/code/+nansen/+config/+addons/@AddonManagerUI/AddonManagerUI.m @@ -355,7 +355,7 @@ function onOpenWebsiteButtonPushed(obj, addonName, iRow) obj.openAddonWebsite(S) end - function onToolbarButtonPushed(obj, src, evt) + function onToolbarButtonPushed(obj, src, ~) switch src.Text diff --git a/code/+nansen/+config/+dloc/@DataLocationModelApp/DataLocationModelApp.m b/code/+nansen/+config/+dloc/@DataLocationModelApp/DataLocationModelApp.m index 1f1a95516..929253dd0 100644 --- a/code/+nansen/+config/+dloc/@DataLocationModelApp/DataLocationModelApp.m +++ b/code/+nansen/+config/+dloc/@DataLocationModelApp/DataLocationModelApp.m @@ -266,7 +266,7 @@ function createUIModules(obj, moduleNumber, varargin) methods (Access = protected) - function onFigureClosed(obj, src, evt) + function onFigureClosed(obj, ~, ~) %onFigureClosed Callback for when figure is closed. wasCanceled = promptSaveChanges(obj); @@ -398,7 +398,7 @@ function createMetadataInitializationUI(obj, varargin) methods (Access = private) % Callbacks - function onTabSelectionChanged(obj, src, evt) + function onTabSelectionChanged(obj, ~, evt) %onTabSelectionChanged Take care of tab change currentTitle = obj.TabGroup.SelectedTab.Title; diff --git a/code/+nansen/+config/+dloc/@DataLocationModelUI/DataLocationModelUI.m b/code/+nansen/+config/+dloc/@DataLocationModelUI/DataLocationModelUI.m index 60fa456d5..d32f19c13 100644 --- a/code/+nansen/+config/+dloc/@DataLocationModelUI/DataLocationModelUI.m +++ b/code/+nansen/+config/+dloc/@DataLocationModelUI/DataLocationModelUI.m @@ -895,7 +895,7 @@ function onDataLocationRemoved(obj, ~, evt) obj.updateDefaultDataLocationSelector() end - function onDataLocationModified(obj, src, evt, varargin) + function onDataLocationModified(obj, ~, evt, varargin) %onDataLocationModified Modify data location in UI % % This method is inherited from the HasDataLocationModel diff --git a/code/+nansen/+config/+dloc/@FolderOrganizationUI/FolderOrganizationUI.m b/code/+nansen/+config/+dloc/@FolderOrganizationUI/FolderOrganizationUI.m index e55cab3a2..781281e46 100644 --- a/code/+nansen/+config/+dloc/@FolderOrganizationUI/FolderOrganizationUI.m +++ b/code/+nansen/+config/+dloc/@FolderOrganizationUI/FolderOrganizationUI.m @@ -612,7 +612,7 @@ function subfolderChanged(obj, src, ~) end end - function subFolderTypeChanged(obj, src, evt) + function subFolderTypeChanged(obj, src, ~) iRow = obj.getComponentRowNumber(src); obj.Data(iRow).Type = src.Value; @@ -621,7 +621,7 @@ function subFolderTypeChanged(obj, src, evt) obj.markDirty() end - function ignoreListChanged(obj, src, evt) + function ignoreListChanged(obj, src, ~) iRow = obj.getComponentRowNumber(src); if isempty(src.Value) obj.Data(iRow).IgnoreList = {}; @@ -636,7 +636,7 @@ function ignoreListChanged(obj, src, evt) obj.updateSubfolderItems(iRow) end - function expressionChanged(obj, src, evt) + function expressionChanged(obj, src, ~) iRow = obj.getComponentRowNumber(src); obj.Data(iRow).Expression = src.Value; obj.markDirty() @@ -889,18 +889,18 @@ function onTemplateSelectionChanged(obj, src, event) end % Image clicked function: InfoIcon_2 - function onInfoButtonClicked(obj, event) + function onInfoButtonClicked(obj, ~) obj.FolderHierarchyExampleImage.Visible = 'on'; obj.CloseDialogButton.Visible = 'on'; end % Image clicked function: CloseDialogButton - function onCloseDialogButtonClicked(app, event) + function onCloseDialogButtonClicked(app, ~) app.FolderHierarchyExampleImage.Visible = 'off'; app.CloseDialogButton.Visible = 'off'; end - function onFolderPreviewButtonClicked(obj, src, evt) + function onFolderPreviewButtonClicked(obj, ~, ~) %onFolderPreviewButtonClicked Button callback % % This callback toggles visibility a figure that displays all the @@ -921,7 +921,7 @@ function onFolderPreviewButtonClicked(obj, src, evt) end % Value changed function: ShowFilterOptionsButton - function onShowFilterOptionsButtonPushed(obj, src, event) + function onShowFilterOptionsButtonPushed(obj, src, ~) switch src.Text case 'Show Filter Options...' @@ -1056,7 +1056,7 @@ function onDataLocationModelSet(obj) end end - function onDataLocationAdded(obj, ~, evt) + function onDataLocationAdded(obj, ~, ~) %onDataLocationAdded Callback for DataLocationModel event % % This method is inherited from the HasDataLocationModel @@ -1100,7 +1100,7 @@ function onDataLocationModified(obj, ~, evt) end end - function onDataLocationRemoved(obj, ~, evt) + function onDataLocationRemoved(obj, ~, ~) %onDataLocationRemoved Callback for DataLocationModel event % % This method is inherited from the HasDataLocationModel diff --git a/code/+nansen/+config/+module/@ModuleManagerUI/ModuleManagerUI.m b/code/+nansen/+config/+module/@ModuleManagerUI/ModuleManagerUI.m index 32910000a..570e1ae6c 100644 --- a/code/+nansen/+config/+module/@ModuleManagerUI/ModuleManagerUI.m +++ b/code/+nansen/+config/+module/@ModuleManagerUI/ModuleManagerUI.m @@ -286,7 +286,7 @@ function createTableContextMenu(obj) methods (Access = private) % Uicontrol callbacks - function onTableCellEdited(obj, src, evt) + function onTableCellEdited(obj, ~, evt) rowIdx = evt.Indices(1); colIdx = evt.Indices(2); diff --git a/code/+nansen/+config/+varmodel/VariableModelApp.m b/code/+nansen/+config/+varmodel/VariableModelApp.m index d5841a11d..2cc2a1eb8 100644 --- a/code/+nansen/+config/+varmodel/VariableModelApp.m +++ b/code/+nansen/+config/+varmodel/VariableModelApp.m @@ -99,7 +99,7 @@ function showPage(obj, pageName) methods (Access = protected) - function onFigureClosed(obj, src, evt) + function onFigureClosed(obj, ~, ~) if isempty(obj.UIModule) delete(obj.Figure); return diff --git a/code/+nansen/+config/+varmodel/VariableModelUI.m b/code/+nansen/+config/+varmodel/VariableModelUI.m index bce267666..2d426a7e5 100644 --- a/code/+nansen/+config/+varmodel/VariableModelUI.m +++ b/code/+nansen/+config/+varmodel/VariableModelUI.m @@ -366,7 +366,7 @@ function onDataLocationChanged(obj,src, ~) obj.IsDirty = true; end - function onDataLocationAdded(obj, ~, evt) + function onDataLocationAdded(obj, ~, ~) %onDataLocationAdded Callback for DataLocationModel event % % This method is inherited from the HasDataLocationModel @@ -376,7 +376,7 @@ function onDataLocationAdded(obj, ~, evt) obj.updateDataLocationDropdownItems() end - function onDataLocationRemoved(obj, ~, evt) + function onDataLocationRemoved(obj, ~, ~) %onDataLocationRemoved Callback for DataLocationModel event % % This method is inherited from the HasDataLocationModel @@ -386,7 +386,7 @@ function onDataLocationRemoved(obj, ~, evt) obj.updateDataLocationDropdownItems() end - function onDataLocationNameChanged(obj, src, evt) + function onDataLocationNameChanged(obj, ~, ~) %onDataLocationNameChanged Callback for VariableModel event % Todo: This should be on the model, not the UI Level @@ -397,13 +397,13 @@ function onDataLocationNameChanged(obj, src, evt) end end - function onVariableAdded(obj, src, evtData) + function onVariableAdded(obj, ~, evtData) % onVariableAdded - Callback for VariableAdded event on Model variableItem = evtData.VariableInfo; obj.addVariableToTable(variableItem) end - function onVariableRemoved(obj, src, evtData) + function onVariableRemoved(obj, ~, evtData) % onVariableRemoved - Callback for VariableRemoved event on Model variableName = evtData.VariableName; @@ -434,7 +434,7 @@ function onFileNameExpressionChanged(obj,src, ~) obj.IsDirty = true; end - function onFileTypeChanged(obj, src, evt) + function onFileTypeChanged(obj, src, ~) %onFileTypeChanged Callback for filetype selection changed % Get row number where filetype was changed @@ -506,7 +506,7 @@ function onFileAdapterChanged(obj, src, evt) end end - function onSubfolderChanged(obj, src, evt) + function onSubfolderChanged(obj, src, ~) rowNumber = obj.getComponentRowNumber(src); hRow = obj.RowControls(rowNumber); @@ -546,7 +546,7 @@ function onSubfolderChanged(obj, src, evt) end end - function openDataFolder(obj, src, evt) + function openDataFolder(obj, src, ~) rowNumber = obj.getComponentRowNumber(src); folderPath = obj.getSelectedDataLocationFolderPath(rowNumber); @@ -554,7 +554,7 @@ function openDataFolder(obj, src, evt) utility.system.openFolder(folderPath) end - function onAddNewVariableButtonPushed(obj, src, event) + function onAddNewVariableButtonPushed(obj, ~, ~) % onAddNewVariableButtonPushed - Callback for table button newVariableItem = obj.VariableModel.getDefaultItem(''); @@ -572,7 +572,7 @@ function onRemoveVariableButtonPushed(obj, src, ~) obj.removeRow(rowNumber) end - function onShowVariablesToggleButtonValueChanged(obj, src, event) + function onShowVariablesToggleButtonValueChanged(obj, ~, ~) % Only enable "Add Variable" button when showing custom variables obj.UIButton_AddVariable.Enable = obj.ToolbarButtons(2).Value; diff --git a/code/+nansen/+dataio/+session/FolderMatcherDialog.m b/code/+nansen/+dataio/+session/FolderMatcherDialog.m index 69e4006da..098d9ea0d 100644 --- a/code/+nansen/+dataio/+session/FolderMatcherDialog.m +++ b/code/+nansen/+dataio/+session/FolderMatcherDialog.m @@ -348,7 +348,7 @@ function onAddItemToSetMenuItemClicked(obj, colIdx) obj.updateListbox() end - function onUnmatchSessionMenuItemClicked(obj, src, evt) + function onUnmatchSessionMenuItemClicked(obj, ~, ~) % Get row number... rowIdx = obj.UITable.SelectedRows; @@ -371,7 +371,7 @@ function onUnmatchSessionMenuItemClicked(obj, src, evt) obj.updateListbox() end - function onTableMousePress(obj, src, evt) + function onTableMousePress(obj, ~, evt) if evt.Button == 3 || strcmp(evt.SelectionType, 'alt') diff --git a/code/+nansen/+internal/+user/@NansenUserSession/NansenUserSession.m b/code/+nansen/+internal/+user/@NansenUserSession/NansenUserSession.m index 101768cfd..bda459df8 100644 --- a/code/+nansen/+internal/+user/@NansenUserSession/NansenUserSession.m +++ b/code/+nansen/+internal/+user/@NansenUserSession/NansenUserSession.m @@ -219,7 +219,7 @@ function deactivatePreferenceListener(obj, preferenceName) methods (Access = private) % Callbacks - function onCurrentProjectChangedInPreferences(obj, src, evt) + function onCurrentProjectChangedInPreferences(obj, ~, ~) % Set new current project in project manager. if obj.isPreferenceListenerActive('CurrentProjectName') newProjectName = char(string(obj.Preferences.CurrentProjectName)); @@ -231,7 +231,7 @@ function onCurrentProjectChangedInPreferences(obj, src, evt) end end - function onCurrentProjectChangedInProjectManager(obj, src, evt) + function onCurrentProjectChangedInProjectManager(obj, ~, evt) % Update value for current project in preferences. Make sure that % this is not triggering an event, to avoid infinite update loop. obj.deactivatePreferenceListener('CurrentProjectName') diff --git a/code/+nansen/+notes/UiCreateNote.m b/code/+nansen/+notes/UiCreateNote.m index e2d453fab..3209766a4 100644 --- a/code/+nansen/+notes/UiCreateNote.m +++ b/code/+nansen/+notes/UiCreateNote.m @@ -55,7 +55,7 @@ function delete(app) methods (Access = private) % Callback function - function EnterTextTextAreaValueChanged(app, event) + function EnterTextTextAreaValueChanged(app, ~) value = app.EnterTextTextArea.Value; app.TitleEditField.Value = value{1}; end @@ -159,7 +159,7 @@ function storeComponentValues(app) end methods (Access = protected) - function onSaveButtonPushed(app, src, evt) + function onSaveButtonPushed(app, ~, ~) app.storeComponentValues() wasSuccess = app.verifyComponentValues(); @@ -168,7 +168,7 @@ function onSaveButtonPushed(app, src, evt) end end - function onCancelButtonPushed(app, src, evt) + function onCancelButtonPushed(app, ~, ~) app.delete() end end diff --git a/code/+nansen/+pipeline/@PipelineAssignmentModelApp/PipelineAssignmentModelApp.m b/code/+nansen/+pipeline/@PipelineAssignmentModelApp/PipelineAssignmentModelApp.m index aa033f36d..7195dff1f 100644 --- a/code/+nansen/+pipeline/@PipelineAssignmentModelApp/PipelineAssignmentModelApp.m +++ b/code/+nansen/+pipeline/@PipelineAssignmentModelApp/PipelineAssignmentModelApp.m @@ -41,7 +41,7 @@ methods (Access = protected) - function onFigureClosed(obj, src, evt) + function onFigureClosed(obj, src, ~) % Check if changes were made to the model. diff --git a/code/+nansen/+pipeline/@PipelineAssignmentModelUI/PipelineAssignmentModelUI.m b/code/+nansen/+pipeline/@PipelineAssignmentModelUI/PipelineAssignmentModelUI.m index 6c47684ad..1e42953ba 100644 --- a/code/+nansen/+pipeline/@PipelineAssignmentModelUI/PipelineAssignmentModelUI.m +++ b/code/+nansen/+pipeline/@PipelineAssignmentModelUI/PipelineAssignmentModelUI.m @@ -296,7 +296,7 @@ function getVariableValueExpression(obj, rowNum) methods (Access = private) %Callbacks for userinteraction with components - function onPipelineSelectionChanged(obj,src, evt) + function onPipelineSelectionChanged(obj,~, evt) % Update model data for current pipeline. pipelineName = evt.PreviousValue; @@ -313,7 +313,7 @@ function onPipelineSelectionChanged(obj,src, evt) obj.createTable() end - function onAddNewSessionVariableButtonPushed(obj, src, evt) + function onAddNewSessionVariableButtonPushed(obj, ~, ~) rowData = nansen.pipeline.PipelineCatalog.getSessionMetaVariables(); @@ -326,7 +326,7 @@ function onAddNewSessionVariableButtonPushed(obj, src, evt) % If end - function onRemoveSessionVariableButtonPushed(obj, src, evt) + function onRemoveSessionVariableButtonPushed(obj, src, ~) i = obj.getComponentRowNumber(src); obj.removeRow(i) @@ -350,7 +350,7 @@ function onVariableNameSelectionChanged(obj, src, ~) obj.updateVariableNameDropdownItems(1:obj.NumRows) end - function onSelectionModeButtonGroupValueChanged(obj, src, evt) + function onSelectionModeButtonGroupValueChanged(obj, src, ~) % Get row which user pushed button from rowNumber = obj.getComponentRowNumber(src); diff --git a/code/+nansen/+pipeline/PipelineBuilderUI.m b/code/+nansen/+pipeline/PipelineBuilderUI.m index 6b9b0ebf7..6fbc8d4d8 100644 --- a/code/+nansen/+pipeline/PipelineBuilderUI.m +++ b/code/+nansen/+pipeline/PipelineBuilderUI.m @@ -179,7 +179,7 @@ function onThemeChanged(obj) methods (Access = private) % Component and user invoked callbacks - function onKeyPressedInTable(obj, src, evt) + function onKeyPressedInTable(obj, ~, evt) switch evt.Key case {'backspace', '⌫'} @@ -228,7 +228,7 @@ function onTableCellClicked(obj, src, evt) end end - function onTableCellSelected(obj, src, evt) + function onTableCellSelected(obj, ~, evt) colNum = obj.UITable.JTable.getSelectedColumns() + 1; rowNum = evt.SelectedRows; @@ -248,7 +248,7 @@ function onTableCellSelected(obj, src, evt) %colNum = evt.Cell(2); end - function onMouseRightClickedInTable(obj, src, evt) + function onMouseRightClickedInTable(obj, ~, evt) % Get row where mouse press occurred. row = evt.Cell(1); @@ -273,7 +273,7 @@ function onMouseRightClickedInTable(obj, src, evt) end end - function onMouseMotionOnTable(obj, src, evt) + function onMouseMotionOnTable(obj, ~, evt) persistent previousRow if isempty(previousRow); previousRow = 0; end @@ -356,7 +356,7 @@ function updateTaskOrder(obj) obj.UITable.ColumnFormatData{1} = arrayfun(@(x) uint8(x), 1:numRows, 'uni',0); end - function onAddTaskButtonPushed(obj, src, evt) + function onAddTaskButtonPushed(obj, ~, ~) % Retrieve current task name from autocomplete field. @@ -368,7 +368,7 @@ function onAddTaskButtonPushed(obj, src, evt) obj.addTask() end - function onBrowseFunctionButtonPushed(obj, src, evt) + function onBrowseFunctionButtonPushed(obj, ~, ~) %onBrowseFunctionButtonPushed Callback for browse button % Open uigetfile in nansen (filter for .m files) @@ -400,7 +400,7 @@ function onBrowseFunctionButtonPushed(obj, src, evt) % Set as current string end - function onRemoveTaskMenuItemClicked(obj, src, evt) + function onRemoveTaskMenuItemClicked(obj, ~, ~) rowNumber = obj.UITable.SelectedRows; if ~isempty(rowNumber) diff --git a/code/+nansen/+pipeline/PipelineViewerApp.m b/code/+nansen/+pipeline/PipelineViewerApp.m index 1d8a2b1e0..8c1427ed9 100644 --- a/code/+nansen/+pipeline/PipelineViewerApp.m +++ b/code/+nansen/+pipeline/PipelineViewerApp.m @@ -138,7 +138,7 @@ function onTaskTableDataSet(app) %app.UITable.ColumnFormatData = colFormatData; end - function onTableCellEdited(app, src, evt) + function onTableCellEdited(app, ~, evt) %onTableCellEdited Callback for table cell edits.. rowNumber = evt.Indices(1); @@ -200,7 +200,7 @@ function setComponentLayout(app) methods (Access = protected) % Component and user invoked callbacks - function onKeyPressedInTable(app, src, evt) + function onKeyPressedInTable(app, ~, evt) switch evt.Key end @@ -216,11 +216,11 @@ function onPipelineSet(app) app.TaskTableData = T; end - function onFigureResized(app, src, evt) + function onFigureResized(app, ~, ~) app.setComponentLayout() end - function onTableCellClicked(app, src, evt) + function onTableCellClicked(app, ~, evt) if evt.Button == 1 && evt.NumClicks == 2 rowNum = evt.Cell(1); diff --git a/code/+nansen/+pipeline/TaskBatchViewer.m b/code/+nansen/+pipeline/TaskBatchViewer.m index 5ec8fee3a..1dc377b4a 100644 --- a/code/+nansen/+pipeline/TaskBatchViewer.m +++ b/code/+nansen/+pipeline/TaskBatchViewer.m @@ -55,7 +55,7 @@ function onTaskTableDataSet(app) end end - function onTableCellEdited(app, src, evt) + function onTableCellEdited(app, ~, evt) % Todo? rowNumber = evt.Indices(1); colNumber = evt.Indices(2); @@ -95,14 +95,14 @@ function createQueueButtons(app) app.h.RemoveFromListButton = hButton; end - function onRemoveFromListButtonPushed(app, src, evt) + function onRemoveFromListButtonPushed(app, ~, ~) selectedRowIdx = app.UITable.SelectedRows; app.PipelineStruct.TaskList(selectedRowIdx) = []; app.onPipelineSet() end - function onAddToBatchButtonPushed(app, src, evt) + function onAddToBatchButtonPushed(app, ~, ~) selectedRowIdx = app.UITable.SelectedRows; diff --git a/code/+nansen/+twophoton/+autosegmentation/+extract/ImviewerPlugin.m b/code/+nansen/+twophoton/+autosegmentation/+extract/ImviewerPlugin.m index 4e40aacfa..cf0390136 100644 --- a/code/+nansen/+twophoton/+autosegmentation/+extract/ImviewerPlugin.m +++ b/code/+nansen/+twophoton/+autosegmentation/+extract/ImviewerPlugin.m @@ -25,7 +25,7 @@ function delete(obj) end methods - function tf = onKeyPress(src, evt) % todo: rename to onKeyPressed + function tf = onKeyPress(~, ~) % todo: rename to onKeyPressed end %onMousePressed(src, evt) diff --git a/code/+nansen/+ui/+metatable/LegacyJavaMetaTableViewer.m b/code/+nansen/+ui/+metatable/LegacyJavaMetaTableViewer.m index 6156e1e85..17f15e088 100644 --- a/code/+nansen/+ui/+metatable/LegacyJavaMetaTableViewer.m +++ b/code/+nansen/+ui/+metatable/LegacyJavaMetaTableViewer.m @@ -1023,7 +1023,7 @@ function onColumnFilterSet(obj) 'FilterUpdated', @obj.onFilterUpdated); end - function onFilterUpdated(obj, src, evt) + function onFilterUpdated(obj, ~, ~) %onFilterUpdated Callback for table filter update events obj.updateTableView([], false) @@ -1112,7 +1112,7 @@ function updateMetaTableVariableAttributes(obj) methods (Access = private) % Mouse / user event callbacks - function onHeaderPressTimerRunOut(obj, src, evt) + function onHeaderPressTimerRunOut(obj, ~, evt) if isempty(obj.ColumnPressedTimer) return @@ -1127,7 +1127,7 @@ function onHeaderPressTimerRunOut(obj, src, evt) obj.openColumnFilter(clickPosX, clickPosY) end - function onMousePressedInHeader(obj, src, evt) + function onMousePressedInHeader(obj, ~, evt) %onMousePressedInHeader Handles mouse press in the table header. buttonNum = get(evt, 'Button'); @@ -1174,7 +1174,7 @@ function onMousePressedInHeader(obj, src, evt) end end - function onMouseDraggedInTableHeader(obj, src, evt) + function onMouseDraggedInTableHeader(obj, ~, evt) if ~isempty( obj.ColumnPressedTimer ) % Simulate mouse release to cancel the timer @@ -1191,7 +1191,7 @@ function onMouseDraggedInTableHeader(obj, src, evt) end end - function onMouseReleasedFromHeader(obj, src, evt) + function onMouseReleasedFromHeader(obj, ~, ~) if ~isempty(obj.ColumnPressedTimer) stop(obj.ColumnPressedTimer) @@ -1309,7 +1309,7 @@ function onMousePressedInTable(obj, src, evt) end end - function onMouseDoubleClickedInTable(obj, src, evt) + function onMouseDoubleClickedInTable(obj, ~, evt) % onMouseDoubleClickedInTable - Callback for double clicks % % Check if the currently selected column has an associated table @@ -1354,7 +1354,7 @@ function onMouseDoubleClickedInTable(obj, src, evt) end end - function onMouseMotionInTable(obj, src, evt) + function onMouseMotionInTable(obj, ~, ~) % This functionality is put in the nansen app for now. end @@ -1397,19 +1397,19 @@ function onCellValueEdited(obj, src, evtData) end end - function onCellSelectionChanged(obj, src, evt) + function onCellSelectionChanged(obj, ~, evt) %evtData = event.EventData; evtData = uiw.event.EventData('SelectedRows', evt.SelectedRows); obj.notify('SelectionChanged', evtData) end - function onColumnWidthChanged(obj, src, event) + function onColumnWidthChanged(obj, ~, ~) %onColumnWidthChanged Callback for events where column widths are %changed by resizing column widths in from gui. obj.ColumnModel.setColumnWidths(obj.HTable.ColumnWidth) end - function onColumnsRearranged(obj, src, evt) + function onColumnsRearranged(obj, ~, ~) %onColumnsRearranged Callback for event when columns are rearranged % % This event is triggered when user drags columns to rearrange diff --git a/code/+nansen/+ui/+widget/ButtonGroup.m b/code/+nansen/+ui/+widget/ButtonGroup.m index 52184be0b..f4efd0136 100644 --- a/code/+nansen/+ui/+widget/ButtonGroup.m +++ b/code/+nansen/+ui/+widget/ButtonGroup.m @@ -217,7 +217,7 @@ function onButtonPressed(obj, src, evt, pageNum) end end - function onParentSizeChanged(obj, src, evt) + function onParentSizeChanged(obj, ~, ~) obj.updateLineHeight() obj.updateLocation() end diff --git a/code/+nansen/+ui/MetaTableColumnFilter.m b/code/+nansen/+ui/MetaTableColumnFilter.m index d86a73f34..009c9cf71 100644 --- a/code/+nansen/+ui/MetaTableColumnFilter.m +++ b/code/+nansen/+ui/MetaTableColumnFilter.m @@ -248,7 +248,7 @@ function refreshFilterControls(obj, columnIdx) end end - function onColumnFilterValueChanged(obj, src, evt, columnIdx, skipNotify) + function onColumnFilterValueChanged(obj, ~, ~, columnIdx, skipNotify) %onColumnFilterValueChanged Update table data when column filter changes % Todo: make widgets specifications (which widget to use) part of diff --git a/code/apps/+fovmanager/+mapobject/Annotation.m b/code/apps/+fovmanager/+mapobject/Annotation.m index a96b4f1fe..0810737b6 100644 --- a/code/apps/+fovmanager/+mapobject/Annotation.m +++ b/code/apps/+fovmanager/+mapobject/Annotation.m @@ -137,7 +137,7 @@ function resize(obj, newPos) obj.radius = [nansen.util.range(xCoords)/2, nansen.util.range(yCoords)/2] * 1000; end - function togglePersistentState(obj, src, event) + function togglePersistentState(obj, src, ~) switch src.Text case 'Always Show' diff --git a/code/apps/+fovmanager/@App/App.m b/code/apps/+fovmanager/@App/App.m index 8b47b1b1e..0eb5acf47 100644 --- a/code/apps/+fovmanager/@App/App.m +++ b/code/apps/+fovmanager/@App/App.m @@ -1103,7 +1103,7 @@ function saveCurrentDisplay(obj) % % % % Mouse and keyboard callbacks - function onDataCursorToggled(obj, src, evtData) + function onDataCursorToggled(obj, ~, evtData) if evtData.Value obj.showGraphicalHandle(obj.hInfoBox) %obj.showGraphicalHandle(obj.hCurrentPoint) @@ -1115,7 +1115,7 @@ function onDataCursorToggled(obj, src, evtData) end end - function onMouseOver(obj, src, evt) + function onMouseOver(obj, ~, ~) % Todo: Debug, updating of textbox size might be a bit slow. @@ -1191,7 +1191,7 @@ function onMouseOver(obj, src, evt) end end - function mousePressAxes(obj, src, event) + function mousePressAxes(obj, ~, ~) if ~isempty(obj.pointerManager.currentPointerTool) return @@ -1205,7 +1205,7 @@ function mousePressAxes(obj, src, event) end end - function keyPress(obj, src, event) + function keyPress(obj, ~, event) wasCaptured = obj.pointerManager.onKeyPress([], event); @@ -1247,7 +1247,7 @@ function keyPress(obj, src, event) end end - function keyPressObject(obj, src, event) + function keyPressObject(obj, ~, event) wasCaptured = obj.pointerManager.onKeyPress([], event); @@ -2460,7 +2460,7 @@ function showMinorGrid(obj, src, ~) end end - function showInfoCursor(obj, src, ~) + function showInfoCursor(obj, ~, ~) if isempty(obj.hFigure.WindowButtonMotionFcn) obj.showGraphicalHandle(obj.hInfoBox) diff --git a/code/apps/+imviewer/+plugin/@RoiManager/RoiManager.m b/code/apps/+imviewer/+plugin/@RoiManager/RoiManager.m index 0def32881..88c146a1c 100755 --- a/code/apps/+imviewer/+plugin/@RoiManager/RoiManager.m +++ b/code/apps/+imviewer/+plugin/@RoiManager/RoiManager.m @@ -166,7 +166,7 @@ function delete(obj) methods (Access = {?applify.mixin.AppPlugin, ?applify.AppWithPlugin} ) % Callbacks - function wasCaptured = keyPressHandler(obj, src, event) + function wasCaptured = keyPressHandler(obj, ~, event) wasCaptured = true; %Guilty until proven innocent c-^_^-? switch event.Key @@ -852,7 +852,7 @@ function onSignalViewerDeleted(obj, mItem) end end - function onImageStackChanged(obj, src, evt) + function onImageStackChanged(obj, ~, evt) imageStack = evt.AffectedObject.ImageStack; @@ -888,7 +888,7 @@ function onImageStackChanged(obj, src, evt) obj.roiDisplay.resetStaticFovImage() end - function onImageDataChanged(obj, src, evt) + function onImageDataChanged(obj, ~, ~) imageStack = obj.ImviewerObj.ImageStack; imData = imageStack.Data.getStaticCache(); @@ -1071,7 +1071,7 @@ function onActiveChannelSet(obj) % % % % Imviewer callback methods - function onCurrentChannelChanged(obj, src, evt) + function onCurrentChannelChanged(obj, ~, ~) obj.updateActiveRoiGroup() if ~isempty(obj.roiSignalArray) @@ -1081,7 +1081,7 @@ function onCurrentChannelChanged(obj, src, evt) end end - function onCurrentPlaneChanged(obj, src, evt) + function onCurrentPlaneChanged(obj, ~, ~) obj.updateActiveRoiGroup() if ~isempty(obj.roiSignalArray) diff --git a/code/apps/+imviewer/@App/App.m b/code/apps/+imviewer/@App/App.m index ed43229b2..bc3335990 100755 --- a/code/apps/+imviewer/@App/App.m +++ b/code/apps/+imviewer/@App/App.m @@ -2786,7 +2786,7 @@ function changeColormap(obj, src, ~) end end - function changeChannelColor(obj, src, evtData) + function changeChannelColor(obj, ~, evtData) rgbColor = evtData.RgbColor; channelNumber = evtData.ChannelNumber; if ~strcmp(obj.ImageStack.ColorModel, 'Custom') @@ -3278,7 +3278,7 @@ function slideUiWidget(obj, action, uiwidgetName, dim, side) end end - function onAutoAdjustLimitsPressed(obj, src, ~, chNum) + function onAutoAdjustLimitsPressed(obj, ~, ~, chNum) [~, iA, ~] = intersect(obj.currentChannel, chNum, 'stable'); if isempty(iA); diff --git a/code/apps/+mclassifier/manualClassifier.m b/code/apps/+mclassifier/manualClassifier.m index 6d938ad0c..166c02732 100644 --- a/code/apps/+mclassifier/manualClassifier.m +++ b/code/apps/+mclassifier/manualClassifier.m @@ -498,7 +498,7 @@ function createScrollbar(obj) obj.hScrollbar.showTrack() end - function stopScrollbarMove(obj, src, deltaY) + function stopScrollbarMove(obj, ~, deltaY) %stopScrollbarMove Update the view when scroller stops moving obj.updateView(struct('deltaY', deltaY), [], 'scrollbar'); end @@ -653,7 +653,7 @@ function scrollHandler(obj, src, event) obj.updateView(src, event, 'scroll') end - function onMouseMotion(obj, src, event) + function onMouseMotion(obj, ~, ~) newMousePointAx = obj.hTiledImageAxes.Axes.CurrentPoint(1, 1:2); obj.cursorPosition = newMousePointAx; @@ -662,7 +662,7 @@ function onMouseMotion(obj, src, event) %obj.hScrollbar.hittest(hTmp) end - function mousePressed(obj, src, event, tileNum) + function mousePressed(obj, ~, ~, tileNum) % Assign nan to variable if it is not given in function call if nargin < 4; tileNum = nan; end @@ -1557,7 +1557,7 @@ function onFigureCloseRequest(obj) delete(obj) end - function onFigureSizeChanged(obj, src, evt) + function onFigureSizeChanged(obj, ~, ~) obj.updatePanelLayout() end end diff --git a/code/apps/+nansen/BatchProcessorUI.m b/code/apps/+nansen/BatchProcessorUI.m index 5ffcaf99d..cbb1a94f8 100644 --- a/code/apps/+nansen/BatchProcessorUI.m +++ b/code/apps/+nansen/BatchProcessorUI.m @@ -490,7 +490,7 @@ function onReassignToQueueMenuItemClicked(obj) end end - function onTableCellEdited(obj, src, evt) + function onTableCellEdited(obj, ~, evt) taskType = obj.TabGroup.SelectedTab.Title; taskIdx = evt.Indices(1); @@ -642,7 +642,7 @@ function onBatchProcessorSet(obj) @obj.onTableUpdated); end - function onMouseRightClickedInTable(obj, src, evt) + function onMouseRightClickedInTable(obj, ~, evt) %onMouseRightClickedInTable Method to run when right click happens in table tableType = obj.TabGroup.SelectedTab.Title; @@ -676,7 +676,7 @@ function onMouseRightClickedInTable(obj, src, evt) hTable.showContextMenu(evt) end - function onKeyPressedInTable(obj, src, evt) + function onKeyPressedInTable(obj, ~, evt) isControl = @(m) all(strcmp(m, 'command')) || all(strcmp(m, 'control')); diff --git a/code/apps/+nansen/TaskTable.m b/code/apps/+nansen/TaskTable.m index f2b8c6590..2f50dedfc 100644 --- a/code/apps/+nansen/TaskTable.m +++ b/code/apps/+nansen/TaskTable.m @@ -167,7 +167,7 @@ function tableMousePress(obj, ~, event) end % Cell selection callback: UITableSessionList - function onCellSelection(obj, src, event) + function onCellSelection(obj, ~, event) % Is all this necessary for getting row selection?? diff --git a/code/apps/+roiclassifier/@App/App.m b/code/apps/+roiclassifier/@App/App.m index 4e8797013..2e8c4307d 100644 --- a/code/apps/+roiclassifier/@App/App.m +++ b/code/apps/+roiclassifier/@App/App.m @@ -215,7 +215,7 @@ function modifyControls(obj) methods % Touch callback handling - function onKeyPressed(obj, src, event) + function onKeyPressed(obj, ~, event) wasCaptured = obj.pointerManager.onKeyPress([], event); @@ -240,7 +240,7 @@ function onKeyPressed(obj, src, event) end end - function mousePressed(obj, src, event, tileNum) + function mousePressed(obj, ~, ~, tileNum) end function mouseClickInTile(obj, src, event, tileNum) @@ -422,7 +422,7 @@ function removeRois(obj, roiInd) tf = ~isnan(tileNum); end - function roiInd = hittest(obj, src, event) + function roiInd = hittest(obj, ~, event) roiInd = []; diff --git a/code/apps/+roisignalviewer/@App/App.m b/code/apps/+roisignalviewer/@App/App.m index 378d8cfcf..815d999be 100644 --- a/code/apps/+roisignalviewer/@App/App.m +++ b/code/apps/+roisignalviewer/@App/App.m @@ -532,7 +532,7 @@ function onRoiClassificationChanged(obj, evtData) % pass end - function onRoiGroupChanged(obj, evt) + function onRoiGroupChanged(obj, ~) % pass end @@ -546,7 +546,7 @@ function onSignalToDisplaySet(obj) %updateSignalPlot(obj, obj.selectedRois, 'append'); end - function onRoiSignalsChanged(obj, src, evtData) + function onRoiSignalsChanged(obj, ~, evtData) if obj.HistoryOn && any( strcmp(evtData.action, {'reset', 'updated'}) ) obj.addLineToHistory(evtData.roiIndices) @@ -1048,7 +1048,7 @@ function showLegend(obj, ~, ~) %l2 = legend(obj.hlineTsArray, {obj.tsArray.Name}, 'AutoUpdate', 'off'); end - function onLegendItemPressed(obj, src, evt) + function onLegendItemPressed(obj, ~, evt) signalName = evt.Peer.DisplayName; obj.onSignalVisibilityChanged(signalName) @@ -1106,7 +1106,7 @@ function toggleDisplayMode(obj, src, mode) obj.updateSignalPlot(obj.DisplayedRoiIndices, 'replace'); end - function toggleSignalSelectionDropdown(obj, src, evt) + function toggleSignalSelectionDropdown(obj, src, ~) if src.Value diff --git a/code/apps/+signalviewer/+pointerTool/eventAnnotator.m b/code/apps/+signalviewer/+pointerTool/eventAnnotator.m index 3a5345ddf..fbc21648a 100644 --- a/code/apps/+signalviewer/+pointerTool/eventAnnotator.m +++ b/code/apps/+signalviewer/+pointerTool/eventAnnotator.m @@ -108,7 +108,7 @@ function startEdit(obj, eventVectorData) obj.isActive = true; end - function onRectanglePositionChanging(obj, src, evtData) + function onRectanglePositionChanging(obj, ~, evtData) obj.hRectangle.Position([2,4]) = [0,1]; end function set.EventVectorName(obj, newName) @@ -117,13 +117,13 @@ function onRectanglePositionChanging(obj, src, evtData) methods (Access = public) % Methods for mouse interactive callbacks - function onButtonDown(obj, src, event) + function onButtonDown(obj, ~, ~) end - function onButtonMotion(obj, src, event) + function onButtonMotion(obj, ~, ~) end - function onButtonUp(obj, src, event) + function onButtonUp(obj, ~, ~) end end diff --git a/code/apps/+signalviewer/@App/App.m b/code/apps/+signalviewer/@App/App.m index 753c2afdc..e88008bf8 100644 --- a/code/apps/+signalviewer/@App/App.m +++ b/code/apps/+signalviewer/@App/App.m @@ -983,7 +983,7 @@ function updateLineData(obj, timeseriesName, newYData, newXData) end end - function tf = onSignalsToShowChanged(obj, src, evt) + function tf = onSignalsToShowChanged(obj, src, ~) signalName = src.Label; @@ -1215,7 +1215,7 @@ function onSettingsChanged(obj, name, value) end end - function updateDownsampledData(obj, src, evt) + function updateDownsampledData(obj, ~, ~) % Todo: Update specific variables... newLim = obj.ax.XLim; @@ -1877,7 +1877,7 @@ function initializeSynchTimer(obj) start( obj.SynchTimer ) end - function checkFrameUpdate(obj, src, evt) + function checkFrameUpdate(obj, ~, ~) if ~isvalid(obj); return; end @@ -2135,7 +2135,7 @@ function onMousePressed(obj, src, event) end end - function onMouseMotion(obj, ~, event) + function onMouseMotion(obj, ~, ~) isOnAxis = obj.isPointOnAxis(); @@ -2168,7 +2168,7 @@ function onMouseMotion(obj, ~, event) end end - function onMouseReleased(obj, src, event) + function onMouseReleased(obj, ~, ~) obj.isMouseDown = false; obj.PreviousMouseClickPoint = []; end diff --git a/code/apps/+signalviewer/TimeAxis.m b/code/apps/+signalviewer/TimeAxis.m index eb19659c0..7ac777c8c 100644 --- a/code/apps/+signalviewer/TimeAxis.m +++ b/code/apps/+signalviewer/TimeAxis.m @@ -116,7 +116,7 @@ function createContextMenuItems(obj, hMenu) obj.ContextMenu.ShowSample = hMenuSubItem; end - function onMenuItemClicked(obj, src, evt) + function onMenuItemClicked(obj, src, ~) switch src.Text case 'Show Time' @@ -128,7 +128,7 @@ function onMenuItemClicked(obj, src, evt) obj.setTimeAxisVisibility(newValue) end - function onAxisLimitsChanged(obj, src, evt) + function onAxisLimitsChanged(obj, ~, ~) sampleLimits = obj.ReferenceAxes.XLim; timeLimits = obj.TimeVector(1) + (sampleLimits - 1) .* obj.TimeStep; obj.TimeAxisAxes.XLim = timeLimits; diff --git a/code/apps/+structeditor/App.m b/code/apps/+structeditor/App.m index 72f79b495..f91ec7c0d 100644 --- a/code/apps/+structeditor/App.m +++ b/code/apps/+structeditor/App.m @@ -506,7 +506,7 @@ function adjustFigureWidthToComponents(obj) drawnow end - function resizePanel(obj, src, evt) + function resizePanel(obj, ~, ~) %resizePanel Callback for resizing panels. % % Header/footer and sidebar panels should have fixed sizes in @@ -1262,7 +1262,7 @@ function parseStruct(obj, S) methods (Access = {?applify.ModularApp, ?applify.DashBoard} ) % Mouse/keyboard callbacks - function onKeyPressed(obj, src, event) + function onKeyPressed(obj, ~, event) currentObject = gco; @@ -1282,7 +1282,7 @@ function onKeyPressed(obj, src, event) end end - function onMouseMotion(obj, src, event) + function onMouseMotion(obj, ~, ~) % Need for buttons in header... Highlight button & show tooltip h = hittest(); @@ -1336,7 +1336,7 @@ function onMouseScrolled(obj, src, event) methods (Access = protected) - function onToggleSidePanelVisibilityButtonPressed(obj, src, evt) + function onToggleSidePanelVisibilityButtonPressed(obj, src, ~) if src.Value obj.uiPanel.Tab.Visible = 'on'; @@ -1858,7 +1858,7 @@ function addComponents(obj, panelNum) end end - function showFieldTooltip(obj, src, evt) + function showFieldTooltip(obj, src, ~) %disp(src.UserData) mh = msgbox(src.UserData, sprintf('Help for %s', src.Tag), "help"); @@ -2224,7 +2224,7 @@ function flipUpsideDown(obj, y, panelNum) end end - function editCallback_propertyValueChange(obj, src, evt, isInternal) + function editCallback_propertyValueChange(obj, src, ~, isInternal) % Callback for value change in inputfields. Update session property % % Updates the value of the property corresponding to inputfield. @@ -2538,7 +2538,7 @@ function buttonCallback_openBrowser(obj, src, ~) % % % % Methods for options sets (Todo: make into separate class) - function onOptionsSetChanged(obj, src, evt) + function onOptionsSetChanged(obj, src, ~) % Todo: Skip if current name is chosen... @@ -2837,11 +2837,11 @@ function replaceEditedStruct(obj, newOpts) % % % % User interaction callbacks - function onDropdownSelected(obj, src, evt) + function onDropdownSelected(obj, src, ~) obj.changeTab(src.Value) end - function onTabButtonPressed(obj, src, evt, pageNum) + function onTabButtonPressed(obj, src, ~, pageNum) % Make sure all other buttons than current is off for iBtn = 1:numel(obj.TabButtonGroup.Buttons) diff --git a/code/apps/roiSignalViewer.m b/code/apps/roiSignalViewer.m index 7ac632f4f..17410ee24 100644 --- a/code/apps/roiSignalViewer.m +++ b/code/apps/roiSignalViewer.m @@ -420,7 +420,7 @@ function onSignalToDisplaySet(obj) %updateSignalPlot(obj, obj.selectedRois, 'append'); end - function onRoiSelectionChanged(obj, src, evtData) + function onRoiSelectionChanged(obj, ~, evtData) switch evtData.eventType case 'unselect' @@ -437,7 +437,7 @@ function onRoiSelectionChanged(obj, src, evtData) end end - function onRoiSignalsChanged(obj, src, evtData) + function onRoiSignalsChanged(obj, ~, evtData) if obj.HistoryOn && any( strcmp(evtData.action, {'reset', 'updated'}) ) obj.addLineToHistory(evtData.roiIndices) @@ -920,7 +920,7 @@ function showLegend(obj, ~, ~) %l2 = legend(obj.hlineTsArray, {obj.tsArray.Name}, 'AutoUpdate', 'off'); end - function onLegendItemPressed(obj, src, evt) + function onLegendItemPressed(obj, ~, evt) signalName = evt.Peer.DisplayName; obj.onSignalVisibilityChanged(signalName) @@ -974,7 +974,7 @@ function toggleDisplayMode(obj, src, mode) obj.updateSignalPlot(obj.DisplayedRoiIndices, 'replace'); end - function toggleSignalSelectionDropdown(obj, src, evt) + function toggleSignalSelectionDropdown(obj, src, ~) if src.Value diff --git a/code/dashboards/+roimanager/RoimanagerDashboard.m b/code/dashboards/+roimanager/RoimanagerDashboard.m index 059a4f15d..157be5583 100644 --- a/code/dashboards/+roimanager/RoimanagerDashboard.m +++ b/code/dashboards/+roimanager/RoimanagerDashboard.m @@ -944,7 +944,7 @@ function openImageStack(obj) obj.settings.ExperimentInfo.SampleRate = imageStack.getSampleRate(); end - function onTabButtonPressed(obj, src, evt) + function onTabButtonPressed(obj, src, ~) if strcmp(src.Text, 'Roi Info') if src.Value diff --git a/code/dashboards/MultiSessionFovSwitcher.m b/code/dashboards/MultiSessionFovSwitcher.m index cde4d75d9..54ebe8eed 100644 --- a/code/dashboards/MultiSessionFovSwitcher.m +++ b/code/dashboards/MultiSessionFovSwitcher.m @@ -152,7 +152,7 @@ function onQuit(obj, src, ~) function onSettingsChanged(obj) end - function onSizeChanged(obj, src, evt) + function onSizeChanged(obj, ~, ~) %onSizeChanged Callback for size changed event on panel % Update cached pixel position value; onSizeChanged@applify.ModularApp(obj) @@ -352,7 +352,7 @@ function updateView(obj, src, event, mode) end end - function onSessionSelected(obj, src, evt, i) + function onSessionSelected(obj, ~, ~, i) oldSelectionIdx = obj.SelectedSession; newSelectionIdx = obj.CurrentTiles(i); diff --git a/code/datatypes/+nansen/+roisignals/RoiSignalArray.m b/code/datatypes/+nansen/+roisignals/RoiSignalArray.m index be4167dc1..2d9216cce 100644 --- a/code/datatypes/+nansen/+roisignals/RoiSignalArray.m +++ b/code/datatypes/+nansen/+roisignals/RoiSignalArray.m @@ -472,7 +472,7 @@ function onRoiGroupSet(obj) end end - function onRoisChanged(obj, src, evtData) + function onRoisChanged(obj, ~, evtData) %onRoisChanged Callback for changes on roi group % Todo: diff --git a/code/datatypes/+nansen/+stack/+metadata/StackMetadata.m b/code/datatypes/+nansen/+stack/+metadata/StackMetadata.m index 4a5e95f7f..92781b178 100644 --- a/code/datatypes/+nansen/+stack/+metadata/StackMetadata.m +++ b/code/datatypes/+nansen/+stack/+metadata/StackMetadata.m @@ -165,7 +165,7 @@ function updateFromSource(obj, S) obj.fromStruct(S, fieldNames) end - function uiset(obj, src, evt) + function uiset(obj, ~, ~) %uiset Callback for value changed from gui end end diff --git a/code/datatypes/+nansen/+stack/@ImageStack/ImageStack.m b/code/datatypes/+nansen/+stack/@ImageStack/ImageStack.m index 6716d456f..4a2754279 100644 --- a/code/datatypes/+nansen/+stack/@ImageStack/ImageStack.m +++ b/code/datatypes/+nansen/+stack/@ImageStack/ImageStack.m @@ -1553,7 +1553,7 @@ function autoAssignColorModel(obj) end end - function onCachedDataChanged(obj, src, evt) + function onCachedDataChanged(obj, ~, ~) %onCachedDataChanged Callback for cache changed event % This method is used for resetting the projection "cache", i.e the diff --git a/code/general/+utility/+data/CatalogViewerApp.m b/code/general/+utility/+data/CatalogViewerApp.m index 286b8534e..1060c4129 100644 --- a/code/general/+utility/+data/CatalogViewerApp.m +++ b/code/general/+utility/+data/CatalogViewerApp.m @@ -135,7 +135,7 @@ function onTableCellClicked(obj, src, evt) end end - function onMouseRightClickedInTable(obj, src, evt) + function onMouseRightClickedInTable(obj, ~, evt) % Get row where mouse press occurred. row = evt.Cell(1); @@ -154,7 +154,7 @@ function onMouseRightClickedInTable(obj, src, evt) end end - function onRemoveTaskMenuItemClicked(obj, src, evt) + function onRemoveTaskMenuItemClicked(obj, ~, ~) rowNumber = obj.UITable.SelectedRows; if ~isempty(rowNumber) item = obj.Catalog.getItem(rowNumber); diff --git a/code/graphics/+applify/@uicontrolSchemer/uicontrolSchemer.m b/code/graphics/+applify/@uicontrolSchemer/uicontrolSchemer.m index bc6593afc..5b6214fc2 100644 --- a/code/graphics/+applify/@uicontrolSchemer/uicontrolSchemer.m +++ b/code/graphics/+applify/@uicontrolSchemer/uicontrolSchemer.m @@ -196,7 +196,7 @@ function assignStyleProperties(obj) obj.highlightColor = cmap(randi([128,255], 1), :); end - function onPanelSizeChanged(obj, src, evt) + function onPanelSizeChanged(obj, ~, ~) numUIControls = numel( obj.hUicontrol ); @@ -243,7 +243,7 @@ function onPanelSizeChanged(obj, src, evt) drawnow end - function onButtonResized(obj, src, evt) + function onButtonResized(obj, src, ~) obj.removeJButtonStyle(src) end diff --git a/code/graphics/+applify/DashBoard.m b/code/graphics/+applify/DashBoard.m index c5a23f4b4..f067db25a 100644 --- a/code/graphics/+applify/DashBoard.m +++ b/code/graphics/+applify/DashBoard.m @@ -289,7 +289,7 @@ function onConstructed(obj) end end - function onAxesCreated(obj, src, evt) + function onAxesCreated(obj, src, ~) % TODO: Does this actually make a difference... persistent removeAxToolbar if isempty(removeAxToolbar) diff --git a/code/graphics/+applify/ModularApp.m b/code/graphics/+applify/ModularApp.m index e34ad71b1..2891ec19a 100644 --- a/code/graphics/+applify/ModularApp.m +++ b/code/graphics/+applify/ModularApp.m @@ -116,7 +116,7 @@ pos = [figureLocation, figureSize]; end - function resizePanel(app, src, evt) + function resizePanel(app, ~, ~) % Subclass may implement end end @@ -273,7 +273,7 @@ function createAppWindow(app) app.Figure.CloseRequestFcn = @(s, e) app.delete; end - function onAxesCreated(app, src, evt) + function onAxesCreated(app, src, ~) % TODO: Does this actually make a difference... persistent removeAxToolbar if isempty(removeAxToolbar) @@ -349,7 +349,7 @@ function toggleResize(app, src, ~) end end - function maximizeWindow(app, src, evt) + function maximizeWindow(app, ~, ~) MP = get(0, 'MonitorPosition'); xPos = app.hFigure.Position(1); @@ -474,7 +474,7 @@ function onConstructed(obj) obj.ApplicationState = "Running"; end - function onSizeChanged(app, src, evt) + function onSizeChanged(app, ~, ~) %onSizeChanged Callback for size changed event on panel % Update cached pixel position value; app.PixelPosition_ = getpixelposition(app.Panel, true); @@ -506,27 +506,27 @@ function onFigureBeingDestroyed(obj, ~, ~) methods (Access = {?applify.ModularApp, ?applify.DashBoard} ) % Event / interactive Callbacks - function onKeyPressed(obj, src, evt) + function onKeyPressed(obj, ~, ~) % Subclass can implement this end - function onKeyReleased(obj, src, evt) + function onKeyReleased(obj, ~, ~) % Subclass can implement this end - function onMousePressed(obj, src, evt) + function onMousePressed(obj, ~, ~) % Subclass can implement this end - function onMouseReleased(obj, src, evt) + function onMouseReleased(obj, ~, ~) % Subclass can implement this end - function onMouseMotion(obj, src, evt) + function onMouseMotion(obj, ~, ~) % Subclass can implement this end - function onMouseScrolled(obj, src, evt) + function onMouseScrolled(obj, ~, ~) % Subclass can implement this end end diff --git a/code/graphics/+applify/MultiPageApp.m b/code/graphics/+applify/MultiPageApp.m index da4ddd9b3..05e826038 100644 --- a/code/graphics/+applify/MultiPageApp.m +++ b/code/graphics/+applify/MultiPageApp.m @@ -88,7 +88,7 @@ function onFigureSizeChanged(app) drawnow end - function onTabChanged(app, src, evt) + function onTabChanged(app, ~, evt) pageTitle = evt.NewValue.Title; diff --git a/code/graphics/+applify/UiControlTable.m b/code/graphics/+applify/UiControlTable.m index c1e97dfbc..4a1cb21b5 100644 --- a/code/graphics/+applify/UiControlTable.m +++ b/code/graphics/+applify/UiControlTable.m @@ -715,7 +715,7 @@ function onHelpButtonClicked(obj, src, ~) uialert(hFigure, msg, title, 'Icon', 'info') end - function onParentResized(obj, src, evt) + function onParentResized(obj, ~, ~) % Todo: Recall how to do this with uifigures... obj.autoAssignPosition() obj.configureLayout() diff --git a/code/graphics/+uics/multiSelectionDropDown.m b/code/graphics/+uics/multiSelectionDropDown.m index 65d186d7f..e18702c98 100644 --- a/code/graphics/+uics/multiSelectionDropDown.m +++ b/code/graphics/+uics/multiSelectionDropDown.m @@ -262,7 +262,7 @@ function onStringUpdated(obj) % obj.hUiControl.Value = obj.Value; % end - function onKeypressed(obj, src, evt) + function onKeypressed(obj, ~, evt) switch evt.Key case {'return', 'escape'} @@ -272,7 +272,7 @@ function onKeypressed(obj, src, evt) % todo: Trigger value changed.... end - function onMouseClicked(obj, src, evt) + function onMouseClicked(obj, ~, ~) switch obj.hFigure.SelectionType case 'open' @@ -280,7 +280,7 @@ function onMouseClicked(obj, src, evt) end end - function onValueChanged(obj, src, evt) + function onValueChanged(obj, ~, ~) end function onCallbackChanged(obj) diff --git a/code/graphics/+uics/rangeSelector.m b/code/graphics/+uics/rangeSelector.m index 268a66696..89ca547df 100644 --- a/code/graphics/+uics/rangeSelector.m +++ b/code/graphics/+uics/rangeSelector.m @@ -205,7 +205,7 @@ function createWindowButtonListener(obj) methods (Access = private) % Internal component callbacks - function onMousePressedInFigure(obj, src, evt) + function onMousePressedInFigure(obj, src, ~) % The purpose of this callback is to hide the control if the % mouse is pressed outside of it. not perfect, since the @@ -233,7 +233,7 @@ function onPositionChanged(obj) end end - function onSliderValueChanging(obj, src, evt) + function onSliderValueChanging(obj, src, ~) obj.updateLowValueField(src.Low) obj.updateHighValueField(src.High) @@ -271,7 +271,7 @@ function onMinValuePropertySet(obj) end end - function onHighValueInputChanged(obj, src, evt) + function onHighValueInputChanged(obj, src, ~) val = str2double( src.String ); @@ -288,7 +288,7 @@ function onHighValueInputChanged(obj, src, evt) end end - function onLowValueInputChanged(obj, src, evt) + function onLowValueInputChanged(obj, src, ~) val = str2double( src.String ); diff --git a/code/graphics/+uim/+abstract/Component.m b/code/graphics/+uim/+abstract/Component.m index 6414555b4..e12ff0558 100644 --- a/code/graphics/+uim/+abstract/Component.m +++ b/code/graphics/+uim/+abstract/Component.m @@ -754,12 +754,12 @@ function onVisibleChanged(obj) methods (Access = private) % Callbacks for listeners on parent container - function onParentContainerSizeChanged(obj, src, evt) + function onParentContainerSizeChanged(obj, ~, ~) obj.updateSize() obj.updateLocation() end - function onParentContainerLocationChanged(obj, src, evt) + function onParentContainerLocationChanged(obj, ~, evt) shift = evt.NewLocation - evt.oldLocation; obj.Position_(1:2) = obj.Position_(1:2) + shift; end diff --git a/code/graphics/+uim/+abstract/Control.m b/code/graphics/+uim/+abstract/Control.m index c639d2a82..615f11114 100644 --- a/code/graphics/+uim/+abstract/Control.m +++ b/code/graphics/+uim/+abstract/Control.m @@ -153,7 +153,7 @@ function onMouseExited(obj, hSource, eventData) end end - function onMousePressed(obj, ~, event) + function onMousePressed(obj, ~, ~) %onButtonPressed Event handler for mouse press on button obj.IsMousePressed = true; @@ -167,7 +167,7 @@ function onMousePressed(obj, ~, event) obj.changeAppearance() end - function onMouseReleased(obj, src, event) + function onMouseReleased(obj, ~, ~) % Event handler for mouse release from button obj.IsMousePressed = false; diff --git a/code/graphics/+uim/+abstract/virtualContainer.m b/code/graphics/+uim/+abstract/virtualContainer.m index 994a9fdbe..605f8d092 100644 --- a/code/graphics/+uim/+abstract/virtualContainer.m +++ b/code/graphics/+uim/+abstract/virtualContainer.m @@ -538,7 +538,7 @@ function onLocationChanged(obj, oldPosition, newPosition) methods % Callbacks for listeners on parent container - function onParentContainerSizeChanged(obj, src, evt) + function onParentContainerSizeChanged(obj, ~, ~) persistent i if isempty(i); i = 0; end obj.updateSize() @@ -551,7 +551,7 @@ function onParentContainerSizeChanged(obj, src, evt) end end - function onParentContainerLocationChanged(obj, src, evt) + function onParentContainerLocationChanged(obj, ~, evt) shift = evt.NewLocation - evt.oldLocation; obj.Position_(1:2) = obj.Position_(1:2) + shift; end diff --git a/code/graphics/+uim/+control/Button.m b/code/graphics/+uim/+control/Button.m index 4ce30cca4..76add2b28 100644 --- a/code/graphics/+uim/+control/Button.m +++ b/code/graphics/+uim/+control/Button.m @@ -465,7 +465,7 @@ function onButtonPressed(obj, ~, event) end end - function onButtonReleased(obj, src, event) + function onButtonReleased(obj, ~, ~) % Event handler for mouse release from button obj.isButtonDown = false; diff --git a/code/graphics/+uim/+dialog/createStringSelectorDialog.m b/code/graphics/+uim/+dialog/createStringSelectorDialog.m index 52fe82a0d..afae3f2b4 100644 --- a/code/graphics/+uim/+dialog/createStringSelectorDialog.m +++ b/code/graphics/+uim/+dialog/createStringSelectorDialog.m @@ -116,7 +116,7 @@ end end -function closeStringSelectorDialog(src, event) +function closeStringSelectorDialog(src, ~) hFig = ancestor(src, 'figure'); diff --git a/code/graphics/+uim/+dialog/uiSearchSelect.m b/code/graphics/+uim/+dialog/uiSearchSelect.m index 27d09dc6c..2dd3636ef 100644 --- a/code/graphics/+uim/+dialog/uiSearchSelect.m +++ b/code/graphics/+uim/+dialog/uiSearchSelect.m @@ -68,7 +68,7 @@ function createComponents(obj) obj.OkButton.Callback = @obj.onOkButtonClicked; end - function onOkButtonClicked(obj, src, evt) + function onOkButtonClicked(obj, ~, ~) uiresume(obj.Figure) end end diff --git a/code/graphics/+uim/+interface/+pointerTool/axisZoom.m b/code/graphics/+uim/+interface/+pointerTool/axisZoom.m index f5c2ca5f9..06eeb09dc 100644 --- a/code/graphics/+uim/+interface/+pointerTool/axisZoom.m +++ b/code/graphics/+uim/+interface/+pointerTool/axisZoom.m @@ -90,7 +90,7 @@ function onButtonMotion(obj, ~, ~) end end - function onButtonUp(obj, src, evt) + function onButtonUp(obj, ~, ~) obj.isMouseDown = false; obj.PreviousMouseClickPoint = []; obj.isActive = false; diff --git a/code/graphics/+uim/+interface/+pointerTool/crop.m b/code/graphics/+uim/+interface/+pointerTool/crop.m index b14fe93b8..9c0c0beb1 100644 --- a/code/graphics/+uim/+interface/+pointerTool/crop.m +++ b/code/graphics/+uim/+interface/+pointerTool/crop.m @@ -83,12 +83,12 @@ function deactivate(obj) function setPointerSymbol(obj) end - function onButtonDown(obj, src, event) + function onButtonDown(obj, ~, ~) end - function onButtonMotion(obj, src, event) + function onButtonMotion(obj, ~, ~) % Update rectangle size text end - function onButtonUp(obj, src, event) + function onButtonUp(obj, ~, ~) end end @@ -197,7 +197,7 @@ function updateLimits(obj, rcc) obj.currentYLim = [rcc(2), rcc(2) + rcc(4) - 1]; end - function onRectangleSizeChanged(obj, src, evt) + function onRectangleSizeChanged(obj, ~, evt) if isempty(obj.hRectangleSizeText) obj.hRectangleSizeText = text(obj.hAxes); @@ -213,7 +213,7 @@ function onRectangleSizeChanged(obj, src, evt) obj.hRectangleSizeText.String = sprintf('(%d x %d)', size(1), size(2)); end - function resetCrop(obj, src, evt) + function resetCrop(obj, ~, ~) rcc = zeros(1,4); rcc(1:2) = 1; diff --git a/code/graphics/+uim/+interface/+pointerTool/dataCursor.m b/code/graphics/+uim/+interface/+pointerTool/dataCursor.m index 75fc902cb..9abb11b4a 100644 --- a/code/graphics/+uim/+interface/+pointerTool/dataCursor.m +++ b/code/graphics/+uim/+interface/+pointerTool/dataCursor.m @@ -74,7 +74,7 @@ function onButtonMotion(obj, src, evt) end end - function onButtonUp(obj, src, evt) + function onButtonUp(obj, ~, ~) obj.isButtonDown = false; end diff --git a/code/graphics/+uim/+interface/+pointerTool/pan.m b/code/graphics/+uim/+interface/+pointerTool/pan.m index 13b41ffaf..e39f66399 100644 --- a/code/graphics/+uim/+interface/+pointerTool/pan.m +++ b/code/graphics/+uim/+interface/+pointerTool/pan.m @@ -65,7 +65,7 @@ function onButtonMotion(obj, ~, ~) end end - function onButtonUp(obj, src, evt) + function onButtonUp(obj, ~, ~) obj.isButtonDown = false; obj.isActive = false; end diff --git a/code/graphics/+uim/+interface/+pointerTool/zoomIn.m b/code/graphics/+uim/+interface/+pointerTool/zoomIn.m index 0e8e1270d..755814657 100644 --- a/code/graphics/+uim/+interface/+pointerTool/zoomIn.m +++ b/code/graphics/+uim/+interface/+pointerTool/zoomIn.m @@ -57,7 +57,7 @@ function onButtonMotion(obj, ~, ~) end end - function onButtonUp(obj, src, evt) + function onButtonUp(obj, ~, ~) if ~obj.isButtonDown; return; end % MouseDown happened before tool was activated obj.isButtonDown = false; diff --git a/code/graphics/+uim/+interface/+pointerTool/zoomOut.m b/code/graphics/+uim/+interface/+pointerTool/zoomOut.m index 9f599ea7a..8d267a4d8 100644 --- a/code/graphics/+uim/+interface/+pointerTool/zoomOut.m +++ b/code/graphics/+uim/+interface/+pointerTool/zoomOut.m @@ -24,7 +24,7 @@ function setPointerSymbol(obj) setptr(obj.hFigure, 'glassminus'); end - function onButtonDown(obj, src, event) + function onButtonDown(obj, ~, event) if event.Button==3; return; end diff --git a/code/graphics/+uim/+interface/abstractPointer.m b/code/graphics/+uim/+interface/abstractPointer.m index e5d5c97e5..350ac0c0e 100644 --- a/code/graphics/+uim/+interface/abstractPointer.m +++ b/code/graphics/+uim/+interface/abstractPointer.m @@ -46,11 +46,11 @@ methods % Public methods - function wasCaptured = onKeyPress(obj, src, event) + function wasCaptured = onKeyPress(obj, ~, ~) wasCaptured = false; end - function wasCaptured = onKeyRelease(obj, src, event) + function wasCaptured = onKeyRelease(obj, ~, ~) wasCaptured = false; end diff --git a/code/graphics/+uim/+interface/pointerManager.m b/code/graphics/+uim/+interface/pointerManager.m index 63edc7ff2..df58e31bf 100644 --- a/code/graphics/+uim/+interface/pointerManager.m +++ b/code/graphics/+uim/+interface/pointerManager.m @@ -404,7 +404,7 @@ function resetMouseDownPointerTool(obj) obj.MouseDownPointerTool = []; end - function mouseMotionDummyCallback(obj, src, evt) + function mouseMotionDummyCallback(obj, ~, ~) % Assign this if the WindowButtonMotionFcn of a figure is empty % The figure's CurrentPoint property is only updated if a diff --git a/code/graphics/+uim/+widget/ChannelIndicator.m b/code/graphics/+uim/+widget/ChannelIndicator.m index d3f9a0634..81d49938f 100644 --- a/code/graphics/+uim/+widget/ChannelIndicator.m +++ b/code/graphics/+uim/+widget/ChannelIndicator.m @@ -156,7 +156,7 @@ function postSetChannelColors(obj, oldColors) end methods - function changeChannelColor(obj, src, evt) + function changeChannelColor(obj, src, ~) chNum = obj.LastChannelPressed; colorEnum = enumeration('nansen.enum.FluorescenceSpectrumColors'); diff --git a/code/graphics/+uim/+widget/FrameMarker.m b/code/graphics/+uim/+widget/FrameMarker.m index d61dc4c07..0a7d2081c 100644 --- a/code/graphics/+uim/+widget/FrameMarker.m +++ b/code/graphics/+uim/+widget/FrameMarker.m @@ -166,7 +166,7 @@ function onMouseExitSlider(obj, h, varargin) % % % Callbacks for the scroller knob - function knobPressed(obj, src, event) + function knobPressed(obj, ~, ~) el = listener(obj.ParentFigure, 'WindowMouseMotion', @obj.knobMoving); obj.WindowMouseMotionListener = el; @@ -177,7 +177,7 @@ function knobPressed(obj, src, event) obj.IsButtonDown = true; end - function knobMoving(obj, src, event) + function knobMoving(obj, ~, ~) if obj.IsButtonDown % Just in case??? mousePoint = obj.Axes.CurrentPoint(1); @@ -203,7 +203,7 @@ function knobMoving(obj, src, event) end end - function knobReleased(obj, src, event) + function knobReleased(obj, ~, ~) obj.IsButtonDown = false; diff --git a/code/graphics/+uim/+widget/PageIndicator.m b/code/graphics/+uim/+widget/PageIndicator.m index 933dbd5f8..366bf77e3 100644 --- a/code/graphics/+uim/+widget/PageIndicator.m +++ b/code/graphics/+uim/+widget/PageIndicator.m @@ -367,7 +367,7 @@ function onMouseExited(obj, hFig, h) end end - function onPageButtonPressed(obj, src, evt) + function onPageButtonPressed(obj, src, ~) oldPageNumber = obj.CurrentPage; newPageNumber = find( ismember(obj.hPageButtons, src) ); diff --git a/code/graphics/+uim/+widget/PlaneSwitcher.m b/code/graphics/+uim/+widget/PlaneSwitcher.m index 2bce1a395..f9ebd1368 100644 --- a/code/graphics/+uim/+widget/PlaneSwitcher.m +++ b/code/graphics/+uim/+widget/PlaneSwitcher.m @@ -180,7 +180,7 @@ function drawPlaneSwitcherSlidebar(obj) methods (Access = private) % User interaction callbacks - function onPlaneSliderValueChanged(obj, src, evt) + function onPlaneSliderValueChanged(obj, src, ~) newPlaneIdx = src.Value; obj.Callback(newPlaneIdx) diff --git a/code/graphics/+uim/+widget/PlaybackControl.m b/code/graphics/+uim/+widget/PlaybackControl.m index f4dc3eac1..1c20d2432 100644 --- a/code/graphics/+uim/+widget/PlaybackControl.m +++ b/code/graphics/+uim/+widget/PlaybackControl.m @@ -657,7 +657,7 @@ function drawRangeButtons(obj) % % % Callbacks for playback buttons - function onPlaybackButtonPressed(obj, src, event) + function onPlaybackButtonPressed(obj, src, ~) if ~strcmp(src.Tag, 'Scrollbar') src.FaceColor = 'w'; @@ -788,7 +788,7 @@ function onMouseExitedRangeButton(obj, h, varargin) % % % Callbacks for the scroller knob - function knobPressed(obj, src, event) + function knobPressed(obj, ~, ~) el = listener(obj.ParentApp.Figure, 'WindowMouseMotion', @obj.knobMoving); obj.WindowMouseMotionListener = el; @@ -799,7 +799,7 @@ function knobPressed(obj, src, event) obj.knobDown = true; end - function knobMoving(obj, src, event) + function knobMoving(obj, ~, ~) if obj.knobDown % Just in case??? mousePoint = obj.SliderAxes.CurrentPoint(1); @@ -817,7 +817,7 @@ function knobMoving(obj, src, event) end end - function knobReleased(obj, src, event) + function knobReleased(obj, ~, ~) obj.knobDown = false; diff --git a/code/graphics/+uim/+widget/StylableTable.m b/code/graphics/+uim/+widget/StylableTable.m index c971b3dbc..0e075e628 100644 --- a/code/graphics/+uim/+widget/StylableTable.m +++ b/code/graphics/+uim/+widget/StylableTable.m @@ -455,7 +455,7 @@ function updateColumnHeaderWidth(obj) jHeader.setPreferredSize(headerSize) end - function onMouseDraggedInHeader(obj, src, evt) + function onMouseDraggedInHeader(obj, ~, evt) %onMouseDraggedInHeader Used to test if column widths are changed persistent allowInterrupt diff --git a/code/graphics/+uim/+widget/Waitbar.m b/code/graphics/+uim/+widget/Waitbar.m index 118ff7ab5..f81ddd29e 100644 --- a/code/graphics/+uim/+widget/Waitbar.m +++ b/code/graphics/+uim/+widget/Waitbar.m @@ -150,7 +150,7 @@ function onVisibleChanged(obj) obj.hBarCompleted.Visible = obj.Visible; end - function onParentSizeChanged(obj, src, evt) + function onParentSizeChanged(obj, ~, ~) obj.drawWaitbar() end diff --git a/code/graphics/+uim/+widget/rangeslider.m b/code/graphics/+uim/+widget/rangeslider.m index 1eaa57021..366e35667 100644 --- a/code/graphics/+uim/+widget/rangeslider.m +++ b/code/graphics/+uim/+widget/rangeslider.m @@ -472,7 +472,7 @@ function onSliderMoved(obj, src, ~) end end - function onSliderKnobReleased(obj, src, event) + function onSliderKnobReleased(obj, src, ~) obj.IsKnobPressed = false; @@ -557,7 +557,7 @@ function onValueChanging(obj, newValue, whichValue) end end - function onValueChanged(obj, src, event) + function onValueChanged(obj, ~, ~) persistent ticAtLastUpdate if isempty(ticAtLastUpdate); ticAtLastUpdate = tic; end diff --git a/code/graphics/+uim/+widget/toolbar.m b/code/graphics/+uim/+widget/toolbar.m index a6cb3b8c7..2ad33f96f 100644 --- a/code/graphics/+uim/+widget/toolbar.m +++ b/code/graphics/+uim/+widget/toolbar.m @@ -164,7 +164,7 @@ function relocate(obj, shift) obj.shiftChildren(shift) end - function onButtonSizeChanged(obj, src, evt) + function onButtonSizeChanged(obj, src, ~) isButton = ismember(obj.hButtons, src); obj.AllButtonPosition(isButton, :) = src.Position; diff --git a/code/graphics/+uim/+widget/toolbar_.m b/code/graphics/+uim/+widget/toolbar_.m index f51ecdb4f..7a28eae19 100644 --- a/code/graphics/+uim/+widget/toolbar_.m +++ b/code/graphics/+uim/+widget/toolbar_.m @@ -179,7 +179,7 @@ function relocate(obj, shift) obj.shiftChildren(shift) end - function onButtonSizeChanged(obj, src, evt) + function onButtonSizeChanged(obj, src, ~) %onButtonSizeChanged Update buttonsize and reposition all other buttons isButton = ismember(obj.hButtons, src); diff --git a/code/graphics/+uim/+widget/wtoolbar.m b/code/graphics/+uim/+widget/wtoolbar.m index df35338e2..067780e02 100644 --- a/code/graphics/+uim/+widget/wtoolbar.m +++ b/code/graphics/+uim/+widget/wtoolbar.m @@ -155,7 +155,7 @@ function relocate(obj, shift) obj.shiftChildren(shift) end - function onButtonSizeChanged(obj, src, evt) + function onButtonSizeChanged(obj, src, ~) isButton = ismember(obj.hButtons, src); obj.AllButtonPosition(isButton, :) = src.Position; diff --git a/code/graphics/+uim/AxesDialogBox.m b/code/graphics/+uim/AxesDialogBox.m index c03ca3af1..426c94f14 100644 --- a/code/graphics/+uim/AxesDialogBox.m +++ b/code/graphics/+uim/AxesDialogBox.m @@ -37,7 +37,7 @@ function clearMessage(obj) methods (Access = private) - function onReferenceAxesSizeChanged(obj, src, evt) + function onReferenceAxesSizeChanged(obj, ~, ~) pos = obj.ReferenceAxes.Position; obj.MessageBox.centerInWindow(pos) diff --git a/code/graphics/+uim/UIComponentCanvas.m b/code/graphics/+uim/UIComponentCanvas.m index ee5129a30..f1f960116 100644 --- a/code/graphics/+uim/UIComponentCanvas.m +++ b/code/graphics/+uim/UIComponentCanvas.m @@ -260,7 +260,7 @@ function onSizeChanged(obj, ~, evt) obj.notify('SizeChanged', evt) end - function onLocationChanged(obj, ~, evt) + function onLocationChanged(obj, ~, ~) obj.PreviousPixelPosition = obj.PixelPosition; obj.PixelPosition = uim.utility.getContentPixelPosition(obj.Parent); diff --git a/code/graphics/+uim/tabgroup.m b/code/graphics/+uim/tabgroup.m index f6f976e39..8503cec40 100644 --- a/code/graphics/+uim/tabgroup.m +++ b/code/graphics/+uim/tabgroup.m @@ -166,7 +166,7 @@ function updateTabTitle(obj, hTab) end % Tab selected - function onTabSelected(obj, src, evt) + function onTabSelected(obj, ~, ~) end end @@ -204,7 +204,7 @@ function changeTab(obj, panelNum) end end - function onTabButtonPressed(obj, src, evt) + function onTabButtonPressed(obj, src, ~) %onTabButtonPressed Callback handler for when a button is pressed % Determine which tab is selected diff --git a/code/graphics/+uim/wtabgroup.m b/code/graphics/+uim/wtabgroup.m index 1933f2816..28108fde9 100644 --- a/code/graphics/+uim/wtabgroup.m +++ b/code/graphics/+uim/wtabgroup.m @@ -170,7 +170,7 @@ function updateTabTitle(obj, hTab) end % Tab selected - function onTabSelected(obj, src, evt) + function onTabSelected(obj, ~, ~) end end @@ -208,7 +208,7 @@ function changeTab(obj, panelNum) end end - function onTabButtonPressed(obj, src, evt) + function onTabButtonPressed(obj, src, ~) %onTabButtonPressed Callback handler for when a button is pressed % Determine which tab is selected diff --git a/code/modules/+nansen/+module/+general/+core/+tablevariable/+session/DataLocation.m b/code/modules/+nansen/+module/+general/+core/+tablevariable/+session/DataLocation.m index 7675683f1..605007cf3 100644 --- a/code/modules/+nansen/+module/+general/+core/+tablevariable/+session/DataLocation.m +++ b/code/modules/+nansen/+module/+general/+core/+tablevariable/+session/DataLocation.m @@ -323,7 +323,7 @@ function onCellDoubleClick2(obj, metaObj) end methods (Access = ?structeditor.App) - function onDataLocationChanged(obj, src, evt) + function onDataLocationChanged(obj, ~, evt) switch evt.Name case 'Subfolder' diff --git a/code/tools/+roimanager/+pointerTool/RoiDisplayInputHandler.m b/code/tools/+roimanager/+pointerTool/RoiDisplayInputHandler.m index d95a6b0fb..b4aa8644f 100644 --- a/code/tools/+roimanager/+pointerTool/RoiDisplayInputHandler.m +++ b/code/tools/+roimanager/+pointerTool/RoiDisplayInputHandler.m @@ -18,7 +18,7 @@ methods - function wasCaptured = roiKeypressHandler(obj, src, event) + function wasCaptured = roiKeypressHandler(obj, ~, event) wasCaptured = false; diff --git a/code/tools/+roimanager/+pointerTool/autoDetect.m b/code/tools/+roimanager/+pointerTool/autoDetect.m index 83039daeb..fd2469bf0 100644 --- a/code/tools/+roimanager/+pointerTool/autoDetect.m +++ b/code/tools/+roimanager/+pointerTool/autoDetect.m @@ -144,7 +144,7 @@ function onButtonDown(obj, src, evt) end end - function onButtonMotion(obj, src, evt) + function onButtonMotion(obj, ~, ~) if ~obj.isPointerInsideAxes; return; end if ~obj.isActive; return; end @@ -162,11 +162,11 @@ function onButtonMotion(obj, src, evt) obj.plotCrosshair(tmpCoords(1:2)) end - function onButtonUp(obj, src, event) + function onButtonUp(obj, ~, ~) %obj.isActive = false; end - function onMouseScroll(obj, src, event) + function onMouseScroll(obj, ~, event) if obj.mode == 4 && obj.isAltDown && obj.isControlDown n = event.VerticalScrollCount; obj.changeExtendedCircleRadius(n*0.1) @@ -261,7 +261,7 @@ function onMouseScroll(obj, src, event) end end - function wasCaptured = onKeyRelease(obj, src, event) + function wasCaptured = onKeyRelease(obj, ~, event) wasCaptured = true; switch event.Key case {'alt', '⌥'} diff --git a/code/tools/+roimanager/+pointerTool/circleSelect.m b/code/tools/+roimanager/+pointerTool/circleSelect.m index bc5f429e5..63848b03c 100644 --- a/code/tools/+roimanager/+pointerTool/circleSelect.m +++ b/code/tools/+roimanager/+pointerTool/circleSelect.m @@ -37,7 +37,7 @@ function setPointerSymbol(obj) obj.hFigure.Pointer = 'crosshair'; end - function onButtonDown(obj, src, evt) + function onButtonDown(obj, ~, ~) if strcmp(obj.hFigure.SelectionType, 'alt') return @@ -53,7 +53,7 @@ function onButtonDown(obj, src, evt) obj.RoiDisplay.createCircularRoi(x, y, r); end - function onButtonMotion(obj, src, evt) + function onButtonMotion(obj, ~, ~) persistent prevValue if isempty(prevValue); prevValue = 0; end @@ -75,7 +75,7 @@ function onButtonMotion(obj, src, evt) obj.plotCircleTool(tmpCoords); end - function onButtonUp(obj, src, event) + function onButtonUp(obj, ~, ~) obj.isActive = false; end diff --git a/code/tools/+roimanager/+pointerTool/freehandDraw.m b/code/tools/+roimanager/+pointerTool/freehandDraw.m index c953d9240..7262aeefc 100644 --- a/code/tools/+roimanager/+pointerTool/freehandDraw.m +++ b/code/tools/+roimanager/+pointerTool/freehandDraw.m @@ -41,7 +41,7 @@ function setPointerSymbol(obj) set(obj.hFigure, 'Pointer', 'custom', 'PointerShapeCData', pdata, 'PointerShapeHotSpot', [8,8]) end - function wasCaptured = onKeyPress(obj, src, event) + function wasCaptured = onKeyPress(obj, ~, event) wasCaptured = true; switch event.Key @@ -52,7 +52,7 @@ function setPointerSymbol(obj) end end - function onButtonDown(obj, src, event) + function onButtonDown(obj, ~, ~) %onButtonDown Callback for handling button down events in a roiMap. obj.isButtonDown = true; @@ -67,7 +67,7 @@ function onButtonMotion(obj, ~, ~) end end - function onButtonUp(obj, src, evt) + function onButtonUp(obj, ~, ~) obj.isButtonDown = false; obj.drawLine('pause') diff --git a/code/tools/+roimanager/+pointerTool/polyDraw.m b/code/tools/+roimanager/+pointerTool/polyDraw.m index af9ddd305..a4cc59841 100644 --- a/code/tools/+roimanager/+pointerTool/polyDraw.m +++ b/code/tools/+roimanager/+pointerTool/polyDraw.m @@ -37,7 +37,7 @@ function setPointerSymbol(obj) obj.hFigure.Pointer = 'crosshair'; end - function onButtonDown(obj, src, evt) + function onButtonDown(obj, ~, ~) obj.isActive = true; @@ -52,7 +52,7 @@ function onButtonDown(obj, src, evt) end end - function onButtonMotion(obj, src, evt) + function onButtonMotion(obj, ~, ~) if obj.isActive; return; end @@ -66,11 +66,11 @@ function onButtonMotion(obj, src, evt) end end - function onButtonUp(obj, src, event) + function onButtonUp(obj, ~, ~) obj.isActive = false; end - function wasCaptured = onKeyPress(obj, src, event) + function wasCaptured = onKeyPress(obj, ~, event) wasCaptured = true; diff --git a/code/tools/+roimanager/RoiTable.m b/code/tools/+roimanager/RoiTable.m index 3bb30d4e3..0d31c1ab8 100644 --- a/code/tools/+roimanager/RoiTable.m +++ b/code/tools/+roimanager/RoiTable.m @@ -300,14 +300,14 @@ function configureModernFigure(obj) end end - function onMousePressedInFigure(obj, src, evt) + function onMousePressedInFigure(obj, ~, ~) % Hide filter if mouse is pressed anywhere in figure. if ~isempty(obj.UITable.ColumnFilter) obj.UITable.ColumnFilter.hideFilters(); end end - function onTableSelectionChanged(obj, src, evt) + function onTableSelectionChanged(obj, ~, ~) %onTableSelectionChanged Callback for if table selection changed % % Get selected table rows and call the changeRoiSelection of @@ -326,14 +326,14 @@ function onTableSelectionChanged(obj, src, evt) obj.RoiGroup.changeRoiSelection(oldSelection, newSelection); end - function onTableCellEdited(obj, src, evt) + function onTableCellEdited(obj, ~, ~) %obj.roiTable.Properties.VariableNames( evt.Indices(2) ) % Todo: find right column name. % Todo, trigger roi update... %obj.RoiGroup.roiArray(evt.Indices(1)) = evt.NewValue; end - function onTableUpdated(obj, src, evt) + function onTableUpdated(obj, ~, evt) obj.RoiGroup.changeVisibleRois(evt.RowIndices, evt.Type); end @@ -477,7 +477,7 @@ function initializeTableColumnSettings(obj) pos = obj.getPreference('Position', initPos); end - function resizePanel(obj, src, evt) + function resizePanel(obj, ~, ~) parentPosition = getpixelposition(obj.Panel); if isempty(obj.UITable) || isempty(obj.UITable.HTable) || ... diff --git a/code/tools/+roimanager/RoiThumbnailDisplay.m b/code/tools/+roimanager/RoiThumbnailDisplay.m index 2183fa565..4d7fd5830 100644 --- a/code/tools/+roimanager/RoiThumbnailDisplay.m +++ b/code/tools/+roimanager/RoiThumbnailDisplay.m @@ -475,7 +475,7 @@ function setCurrentImageToShow(obj, name) pos = obj.getPreference('Position', initPos); end - function resizePanel(obj, src, evt) + function resizePanel(obj, ~, ~) posAxes = getpixelposition(obj.hAxes); posPanel = getpixelposition(obj.Panel); @@ -588,7 +588,7 @@ function onRoiClassificationChanged(obj, evtData) methods (Access = private) - function onSetImageMenuItemClicked(obj, src, evt) + function onSetImageMenuItemClicked(obj, src, ~) obj.setCurrentImageToShow(src.Text); end @@ -610,7 +610,7 @@ function removeRois(obj) methods - function tf = hittest(obj, src, evt) + function tf = hittest(obj, ~, ~) tf = ~isempty(obj.VisibleRois); end end diff --git a/code/tools/+roimanager/roiMap.m b/code/tools/+roimanager/roiMap.m index 0e6c0e1d0..ab986417f 100755 --- a/code/tools/+roimanager/roiMap.m +++ b/code/tools/+roimanager/roiMap.m @@ -1605,7 +1605,7 @@ function removeNeuropilPatch(obj, i) end end - function [wasInRoi, roiInd] = hittest(obj, src, event) + function [wasInRoi, roiInd] = hittest(obj, ~, event) %hittest Check if a mouseclick happened on a roi. %currentPoint = round( obj.hAxes.CurrentPoint(1, 1:2) ); diff --git a/code/wrappers/+nansen/+plugin/+imviewer/FluFinder.m b/code/wrappers/+nansen/+plugin/+imviewer/FluFinder.m index a0bf2720a..50336a115 100644 --- a/code/wrappers/+nansen/+plugin/+imviewer/FluFinder.m +++ b/code/wrappers/+nansen/+plugin/+imviewer/FluFinder.m @@ -81,7 +81,7 @@ function delete(obj) methods (Access = {?applify.mixin.AppPlugin, ?applify.AppWithPlugin} ) - function tf = keyPressHandler(obj, src, evt) + function tf = keyPressHandler(obj, ~, ~) tf = false; end From 08f1d136fce0ab95e02a1fa05144f1c5ef573e52 Mon Sep 17 00:00:00 2001 From: ehennestad Date: Thu, 14 May 2026 12:06:45 +0200 Subject: [PATCH 02/14] Fix call to non-existent method in OptionsManager. Co-Authored-By: Claude Opus 4.7 --- code/+nansen/+manage/OptionsManager.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/+nansen/+manage/OptionsManager.m b/code/+nansen/+manage/OptionsManager.m index 04e7f47e0..b1846eff2 100644 --- a/code/+nansen/+manage/OptionsManager.m +++ b/code/+nansen/+manage/OptionsManager.m @@ -438,8 +438,8 @@ function setOptions(obj, optionsName, options) if ~isempty(optsName) optsStruct = obj.getOptions(optsName); else - optsName = obj.listPresetOptions(); - optsStruct = obj.getOptions(optsName); + optsNames = obj.listPresetNames(); + optsStruct = obj.getOptions(optsNames{1}); end elseif nargin == 2 optsStruct = obj.getOptions(optsName); From 5651339a3399360f8c3852a11b44e75bc66cadec Mon Sep 17 00:00:00 2001 From: ehennestad Date: Thu, 14 May 2026 12:08:32 +0200 Subject: [PATCH 03/14] Update ModernUiMetaTableViewer.m Co-Authored-By: Claude Opus 4.7 --- code/+nansen/+ui/+metatable/ModernUiMetaTableViewer.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/+nansen/+ui/+metatable/ModernUiMetaTableViewer.m b/code/+nansen/+ui/+metatable/ModernUiMetaTableViewer.m index 3e6671c31..c32eac9a2 100644 --- a/code/+nansen/+ui/+metatable/ModernUiMetaTableViewer.m +++ b/code/+nansen/+ui/+metatable/ModernUiMetaTableViewer.m @@ -133,7 +133,7 @@ function delete(obj) function set.MetaTableType(obj, newValue) oldType = obj.MetaTableType; obj.MetaTableType = lower(newValue); - obj.RequireReset = ~strcmp(oldType, lower(newValue)); + obj.RequireReset = ~strcmpi(oldType, newValue); end function set.ColumnSettings(obj, newSettings) From eaba41a406a8513d4c69f44006d1d432639295af Mon Sep 17 00:00:00 2001 From: ehennestad Date: Thu, 14 May 2026 12:14:45 +0200 Subject: [PATCH 04/14] Fix loop bug in RoiMap class Co-Authored-By: Claude Opus 4.7 --- code/tools/+roimanager/roiMap.m | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/code/tools/+roimanager/roiMap.m b/code/tools/+roimanager/roiMap.m index ab986417f..83968932c 100755 --- a/code/tools/+roimanager/roiMap.m +++ b/code/tools/+roimanager/roiMap.m @@ -1384,20 +1384,19 @@ function updateRoiMaskAll(obj, roiInd, action) obj.roiMaskAll = {}; roiInd = sort(roiInd, 'descend'); + roiInd = reshape(roiInd, 1, []); switch lower(action) - case 'add' for i = roiInd thisRoi = obj.roiArray(i); obj.roiIndexMap{i} = thisRoi.getPixelIdxList(); - -% mask = obj.roiArray(roiInd(i)).mask; -% obj.roiIndMap(mask) = roiInd(i); end case 'remove' - obj.roiIndexMap{i} = []; + for i = roiInd + obj.roiIndexMap{i} = []; + end end % Todo: How does this work for inserts? From d704300fa069aa361de5829499ed954e8e43fe4e Mon Sep 17 00:00:00 2001 From: ehennestad Date: Thu, 14 May 2026 12:26:01 +0200 Subject: [PATCH 05/14] Fig loop index var in nested function (uifigure_menu_mode_demo.m) Co-Authored-By: Claude Opus 4.7 --- code/examples/uifigure_menu_mode_demo.m | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/code/examples/uifigure_menu_mode_demo.m b/code/examples/uifigure_menu_mode_demo.m index 89081c9a0..017229a84 100644 --- a/code/examples/uifigure_menu_mode_demo.m +++ b/code/examples/uifigure_menu_mode_demo.m @@ -158,8 +158,8 @@ function updateMenus() statusLabel.Text = "Mode: " + mode ... + ". Press q/e/r/h/Shift or use toolbar; Escape resets."; - for i = 1:numel(taskItems) - item = taskItems(i); + for iTask = 1:numel(taskItems) + item = taskItems(iTask); data = item.UserData; item.Text = data.BaseText + modeSuffix(mode); @@ -170,22 +170,22 @@ function updateMenus() end end - for i = 1:numel(modeItems) - if string(modeItems(i).Text) == mode - modeItems(i).Checked = "on"; + for iItem = 1:numel(modeItems) + if string(modeItems(iItem).Text) == mode + modeItems(iItem).Checked = "on"; else - modeItems(i).Checked = "off"; + modeItems(iItem).Checked = "off"; end end - for i = 1:numel(modeButtons) + for iButton = 1:numel(modeButtons) buttonMode = string(modeButtons(i).UserData); if buttonMode == mode - modeButtons(i).Color = "#0072BD"; - modeButtons(i).BackgroundColor = [0.86 0.93 0.98]; + modeButtons(iButton).Color = "#0072BD"; + modeButtons(iButton).BackgroundColor = [0.86 0.93 0.98]; else - modeButtons(i).Color = "#5F6368"; - modeButtons(i).BackgroundColor = [0.94 0.94 0.94]; + modeButtons(iButton).Color = "#5F6368"; + modeButtons(iButton).BackgroundColor = [0.94 0.94 0.94]; end end modeItems(1).Parent.Text = sprintf("Mode (%s)", mode); From 202355cfac896ebbb20fb6f72d46edcf87354841 Mon Sep 17 00:00:00 2001 From: ehennestad Date: Thu, 14 May 2026 14:23:59 +0200 Subject: [PATCH 06/14] Fix/clarify logical expression in RoI Co-Authored-By: Claude Opus 4.7 --- code/datatypes/RoI.m | 4 +++- code/tools/+roimanager/RoI.m | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/code/datatypes/RoI.m b/code/datatypes/RoI.m index eb169ab3d..026b48068 100644 --- a/code/datatypes/RoI.m +++ b/code/datatypes/RoI.m @@ -430,7 +430,9 @@ boxSize = size(obj.enhancedImage); end - assert(all( mod(boxSize,2)) ~= 0) + isOddBoxSize = mod(boxSize, 2) ~= 0; + assert(all(isOddBoxSize), 'NANSEN:RoI:GetThumbnailCoords:SizeMustBeOdd', ... + 'BoxSize must be odd in all dimensions. Instead it is %s.', strjoin(string(boxSize), 'x')) indX = (1:boxSize(2)) - ceil(boxSize(2)/2); indY = (1:boxSize(1)) - ceil(boxSize(1)/2); diff --git a/code/tools/+roimanager/RoI.m b/code/tools/+roimanager/RoI.m index b4714ef02..23b3a1315 100644 --- a/code/tools/+roimanager/RoI.m +++ b/code/tools/+roimanager/RoI.m @@ -365,7 +365,9 @@ boxSize = size(obj.enhancedImage); end - assert(all(mod(boxSize,2))~=0) + isOddBoxSize = mod(boxSize, 2) ~= 0; + assert(all(isOddBoxSize), 'NANSEN:RoI:GetThumbnailCoords:SizeMustBeOdd', ... + 'BoxSize must be odd in all dimensions. Instead it is %s.', strjoin(string(boxSize), 'x')) indX = (1:boxSize(2)) - ceil(boxSize(2)/2); indY = (1:boxSize(1)) - ceil(boxSize(1)/2); From 9aeefa17afb0377433471beb7eb5a9aeed738c6d Mon Sep 17 00:00:00 2001 From: ehennestad Date: Thu, 14 May 2026 14:47:33 +0200 Subject: [PATCH 07/14] Fix bug related to horizontal centering in virtual container Co-Authored-By: Claude Opus 4.7 --- code/graphics/+uim/+abstract/virtualContainer.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/graphics/+uim/+abstract/virtualContainer.m b/code/graphics/+uim/+abstract/virtualContainer.m index 605f8d092..190e7ae90 100644 --- a/code/graphics/+uim/+abstract/virtualContainer.m +++ b/code/graphics/+uim/+abstract/virtualContainer.m @@ -450,7 +450,7 @@ function setAutoLocation(obj) end % Centered along horizontal dimension - if strcmp(obj.Location, 'south') || strcmp(obj.Location, 'south') + if strcmp(obj.Location, 'south') || strcmp(obj.Location, 'north') newLocation(1) = (parentSize(1)-obj.Size(1)) / 2; end From e8acdff4a683ccdf43bbf22780592451354c447f Mon Sep 17 00:00:00 2001 From: ehennestad Date: Thu, 14 May 2026 14:47:47 +0200 Subject: [PATCH 08/14] Delete TaskTable.m Unused class Co-Authored-By: Claude Opus 4.7 --- code/apps/+nansen/TaskTable.m | 249 ---------------------------------- 1 file changed, 249 deletions(-) delete mode 100644 code/apps/+nansen/TaskTable.m diff --git a/code/apps/+nansen/TaskTable.m b/code/apps/+nansen/TaskTable.m deleted file mode 100644 index 2f50dedfc..000000000 --- a/code/apps/+nansen/TaskTable.m +++ /dev/null @@ -1,249 +0,0 @@ -classdef TaskTable < uiw.mixin.AssignPVPairs - -% Some java table properties -% gridColor -% intercellSpacing -% showVerticalLines -% selectionBackground -% selectionForeground -% -% How to change header appearance - - % TODO: - % 1 Same right click functionality as in info table. E.g. right click - % should select new cell and rightclick when many cells are selected - % should not deselect.. - % 2 Select the whole row. - -% Create a basic java table..... -% obj.Table = javacomponent('javax.swing.JTable', position, hParent); - - properties - - TableMode = 'queue' % Or 'history' - - Parent - Position - Table - jTable - - ColumnNames - ColumnEditable - end - - properties - selectedRows - end - - methods - - function obj = TaskTable(varargin) - - obj.assignPVPairs(varargin{:}) - - obj.create() - end - - function addTask(obj, tableRow, insertAt) - - if isempty(obj.Table.Data) - obj.Table.Data = tableRow{:,:}; - else - switch insertAt - case 'beginning' - obj.Table.Data = cat(1, tableRow{:,:}, obj.Table.Data); - case 'end' - obj.Table.Data(end+1, :) = tableRow{:,:}; - end - end - end - - function clearTable(obj) - obj.Table.Data = {}; % Reset Data. - end - end - - methods (Access = private) - - function create(obj) - - obj.Table = uitable(obj.Parent); - -% % obj.Table = uiw.widget.Table('Parent', obj.Parent, ... -% % 'Tag',obj.TableMode,... -% % 'Editable', true, ... -% % 'RowHeight', 20, ... -% % 'FontSize', 8, ... -% % 'FontName', 'helvetica', ... -% % 'FontName', 'avenir next', ... -% % 'SelectionMode', 'discontiguous', ... -% % 'Sortable', false, ... -% % 'Units','normalized', ... -% % 'Position',[0 0.0 1 1] ); - - % Set position - if isempty(obj.Position) - obj.Table.Units = 'pixel'; - pixelpos = getpixelposition(obj.Parent); - obj.Table.Position = [1 0 pixelpos(3:4)]; - obj.Table.Units = 'normalized'; - else - obj.Table.Position = obj.Position; - end - - obj.Table.ColumnName = obj.ColumnNames; - - numColumns = numel(obj.ColumnNames); - - obj.Table.ColumnEditable = obj.ColumnEditable; - - %logical([0,0,0,0,0,1]); - - % Change appearance - obj.Table.FontName = 'Avenir New'; - obj.Table.FontSize = 10; - - %obj.Table.CellSelectionCallback = @obj.onCellSelection; - - % Make some configurations on underlying java object - jScrollPane = findjobj(obj.Table); - - % We got the scrollpane container - get its actual contained table control - obj.jTable = jScrollPane.getViewport.getComponent(0); - obj.jTable = handle(obj.jTable, 'CallbackProperties'); - - set(obj.jTable, 'MousePressedCallback', @obj.tableMousePress); - - % Specify empty data to draw the table with the numbered column - obj.Table.Data = cell(2, numColumns); - - % Get size of visible table area. - javaRect = get(jScrollPane, 'ViewportBorderBounds'); - width = javaRect.getWidth(); - - % Set columnwidths - obj.Table.ColumnWidth = arrayfun(@(i) round(width/numColumns), 1:numColumns, 'uni', 0 ); - - obj.Table.Data = {}; % Reset Data. - end - - function tableMousePress(obj, ~, event) - %tableMousePress Callback for mousepress in table. - % - % This function is primarily used for - % 1) Creating an action on doubleclick - % 2) Selecting cell on right click - - if ~exist('obj', 'var') || ~isvalid(obj); return; end - - % Get the cell which is clicked using the awt.point and - % rowAtPoint method. NB! Indexing starts at 0 for java objects - mousePos = java.awt.Point(event.getX, event.getY); - - i = obj.jTable.rowAtPoint(mousePos); - j = obj.jTable.columnAtPoint(mousePos); - - hFig = ancestor(obj.Parent, 'figure'); - - switch hFig.SelectionType - case {'normal', 'extend'} - % Do nothing. - - case 'open' - - if isequal(get(event, 'button'), 3) - return - end - - case {'alt'} - % Change selection if new session is selected. Skip if - % another column is selected. - if j == 0 && ~ismember(i+1, obj.selectedRows) - obj.jTable.changeSelection(i,0,false,false) % 3rd = toggle, 4th = extend - % src.changeSelection(i, j, false, false) To select - % different column - end - end - end - - % Cell selection callback: UITableSessionList - function onCellSelection(obj, ~, event) - - % Is all this necessary for getting row selection?? - - ii = transpose( unique( event.Indices(:, 1) ) ); - - numCols = size(obj.Table.Data,2); - numColsSelected = histcounts(event.Indices(:, 1), 'BinMethod', 'integer', 'BinLimits', [1, numCols]); - - isRowSelected = find(numColsSelected == numCols); - - if all(ismember(ii, isRowSelected)) - disp('debug') - return - end - -% return - - % Remove deleselected rows. - isDeselected = ~ismember(obj.selectedRows, ii); - if sum(isDeselected)>0 - extend = true; - else - extend = true; - end - - isNew = ~ismember(ii, isRowSelected); - - if isempty(isNew) - isNew = true(size(ii)); - end - -% isNew = true(size(ii)); - - obj.selectedRows(isDeselected) = []; - - if any(isNew) - - for i = ii(isNew) - - obj.selectedRows(end+1) = i; - jjInd = find(event.Indices(:, 1) == i); -% jjTmp = 1:numCols; - - jSelected = event.Indices(jjInd, 2); - -% if jSelected == 1 -% jjTmp = [numCols, min([numCols,2])]; -% else -% jjTmp = [numCols, jSelected+1, jSelected-1, 1]; -% end -% -% jjTmp = unique(jjTmp); - - if numel(jSelected) == numCols; continue; end - - if numel(jSelected) == 1 - - if jSelected ~= 1 && jSelected ~= numCols - obj.jTable.changeSelection(i-1, jSelected-1, true, false) - end - - else - continue - end - - jjTmp = setdiff([numCols, 1], jSelected, 'stable'); - - for j = jjTmp - obj.jTable.changeSelection(i-1, j-1, false, extend) % 3rd = toggle, 4th = extend - extend = true; - end - end - end - - obj.selectedRows = unique(obj.selectedRows); - end - - end % /methods (Access = private) -end From e700f60011a5bca9c194694c36aababcfa494747 Mon Sep 17 00:00:00 2001 From: ehennestad Date: Thu, 14 May 2026 14:49:03 +0200 Subject: [PATCH 09/14] Fix code issues errors related to if/else blocks with same behavior in each block Co-Authored-By: Claude Opus 4.7 --- .../algorithms/+flufinder/+utility/findOverlappingRois.m | 3 ++- code/apps/+imviewer/+widget/ThumbnailSelector.m | 3 ++- code/datatypes/+nansen/+stack/open.m | 9 +++++---- code/tools/+roimanager/+utilities/findOverlappingRois.m | 3 ++- .../+nansen/+wrapper/+normcorre/+utility/nonrigid.m | 6 +----- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/code/algorithms/+flufinder/+utility/findOverlappingRois.m b/code/algorithms/+flufinder/+utility/findOverlappingRois.m index a6e2e552e..b4820cdd2 100644 --- a/code/algorithms/+flufinder/+utility/findOverlappingRois.m +++ b/code/algorithms/+flufinder/+utility/findOverlappingRois.m @@ -26,7 +26,8 @@ distance = sqrt( (xPosI-xPosJ).^2 + (yPosI-yPosJ).^2 ); if isequal(roiArrayA, roiArrayB) - [j, i] = find(distance < 10 & distance ~= 0); + [iA, iB] = deal(1:numel(roiArrayA)); + return else [j, i] = find(distance < 10 & distance ~= 0); end diff --git a/code/apps/+imviewer/+widget/ThumbnailSelector.m b/code/apps/+imviewer/+widget/ThumbnailSelector.m index 29d231a12..75d280d1c 100644 --- a/code/apps/+imviewer/+widget/ThumbnailSelector.m +++ b/code/apps/+imviewer/+widget/ThumbnailSelector.m @@ -223,7 +223,8 @@ function updateView(obj, src, event, mode) % Determine how many tiles to move across if ismac % Mac touchpad is too sensitive... - i = ceil(event.VerticalScrollCount); + scrollCountFactor = 1; % Todo: Find a better value + i = ceil(event.VerticalScrollCount * scrollCountFactor); else i = ceil(event.VerticalScrollCount); end diff --git a/code/datatypes/+nansen/+stack/open.m b/code/datatypes/+nansen/+stack/open.m index 7b5f19455..d6adb5f8c 100644 --- a/code/datatypes/+nansen/+stack/open.m +++ b/code/datatypes/+nansen/+stack/open.m @@ -65,11 +65,12 @@ if numFiles > 1 virtualData = nansen.stack.virtual.TiffMultiPart(pathStr, varargin{:}, nvPairs{:}); else - %try TODO - % virtualData = nansen.stack.virtual.Tiff(pathStr, varargin{:}, nvPairs{:}); - %catch + try % TODO + error('Not implemented yet') + virtualData = nansen.stack.virtual.Tiff(pathStr, varargin{:}, nvPairs{:}); %#ok + catch virtualData = nansen.stack.virtual.TiffMultiPart(pathStr, varargin{:}, nvPairs{:}); - %end + end end end diff --git a/code/tools/+roimanager/+utilities/findOverlappingRois.m b/code/tools/+roimanager/+utilities/findOverlappingRois.m index a6e2e552e..b4820cdd2 100644 --- a/code/tools/+roimanager/+utilities/findOverlappingRois.m +++ b/code/tools/+roimanager/+utilities/findOverlappingRois.m @@ -26,7 +26,8 @@ distance = sqrt( (xPosI-xPosJ).^2 + (yPosI-yPosJ).^2 ); if isequal(roiArrayA, roiArrayB) - [j, i] = find(distance < 10 & distance ~= 0); + [iA, iB] = deal(1:numel(roiArrayA)); + return else [j, i] = find(distance < 10 & distance ~= 0); end diff --git a/code/wrappers/+nansen/+wrapper/+normcorre/+utility/nonrigid.m b/code/wrappers/+nansen/+wrapper/+normcorre/+utility/nonrigid.m index e16b34810..62f6e542d 100644 --- a/code/wrappers/+nansen/+wrapper/+normcorre/+utility/nonrigid.m +++ b/code/wrappers/+nansen/+wrapper/+normcorre/+utility/nonrigid.m @@ -135,11 +135,7 @@ if size(Y, 3) == 1 [M, ncShifts, ref] = normcorre(Y, ncOpts, ref); else - if exist('normcorre_batch', 'file') && ~strcmp(ncOpts.shifts_method, 'fft') - [M, ncShifts, ref] = normcorre_batch(Y, ncOpts, ref); - else - [M, ncShifts, ref] = normcorre_batch(Y, ncOpts, ref); - end + [M, ncShifts, ref] = normcorre_batch(Y, ncOpts, ref); end M = cast(M, 'like', Y); From 6ed193f602a16808c628d4bfcf235c07f22b28fc Mon Sep 17 00:00:00 2001 From: ehennestad Date: Thu, 14 May 2026 14:51:37 +0200 Subject: [PATCH 10/14] Move findJavaComponents Co-Authored-By: Claude Opus 4.7 --- .../+ui/+legacy}/findJavaComponents.m | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename code/{graphics/+applify/@uicontrolSchemer => +nansen/+ui/+legacy}/findJavaComponents.m (100%) diff --git a/code/graphics/+applify/@uicontrolSchemer/findJavaComponents.m b/code/+nansen/+ui/+legacy/findJavaComponents.m similarity index 100% rename from code/graphics/+applify/@uicontrolSchemer/findJavaComponents.m rename to code/+nansen/+ui/+legacy/findJavaComponents.m From 60f1b1b44d7ed5d11cfdc3502669956dbe262dae Mon Sep 17 00:00:00 2001 From: ehennestad Date: Thu, 14 May 2026 14:59:34 +0200 Subject: [PATCH 11/14] Add error handling if trying to access removed JavaFrame property Co-Authored-By: Claude Opus 4.7 --- code/+nansen/+ui/+legacy/findJavaComponents.m | 4 ++-- .../@uicontrolSchemer/findJavaComponents.m | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 code/graphics/+applify/@uicontrolSchemer/findJavaComponents.m diff --git a/code/+nansen/+ui/+legacy/findJavaComponents.m b/code/+nansen/+ui/+legacy/findJavaComponents.m index 5a0110d0a..4c5453fb7 100644 --- a/code/+nansen/+ui/+legacy/findJavaComponents.m +++ b/code/+nansen/+ui/+legacy/findJavaComponents.m @@ -8,13 +8,13 @@ % finding uicontrols in a specific panel container. %% Find java handle of parent container Credit: findjobj @ Yair Altman - try jContainer = hParent.JavaFrame.getGUIDEView; + try jContainer = hParent.JavaFrame.getGUIDEView; %#ok catch, jContainer = []; end if isempty(jContainer) hFig = ancestor(hUic(1), 'figure'); - jf = get(hFig, 'JavaFrame'); + jf = get(hFig, 'JavaFrame'); %#ok jContainer = jf.getFigurePanelContainer.getComponent(0); end diff --git a/code/graphics/+applify/@uicontrolSchemer/findJavaComponents.m b/code/graphics/+applify/@uicontrolSchemer/findJavaComponents.m new file mode 100644 index 000000000..517301bcc --- /dev/null +++ b/code/graphics/+applify/@uicontrolSchemer/findJavaComponents.m @@ -0,0 +1,14 @@ +function jhUic = findJavaComponents(hUic, hParent) +%findUicJobj Find java objects of uicontrols in a figure panel +% +% jhUic = findUicJobj(hUic, hParent) return a cell array of java objects +% given an array og uicontrol objects and a panel they belong to. + + if nansen.util.isJavaFrameSupported() + jhUic = nansen.ui.legacy.findJavaComponents(hUic, hParent); + else + error('NANSEN:UIControlStyled:Unsupported', ... + "This function is unsupported and should have a modern " + ... + "replacement. If you see this error, please report.") + end +end From e58acf02a4d99ac446b3684467d6ea53a1054d34 Mon Sep 17 00:00:00 2001 From: ehennestad Date: Thu, 14 May 2026 16:08:03 +0200 Subject: [PATCH 12/14] fix: resolve all ASGLU code issues (unused assignments) Replace unused output assignments with ~ or reduce requested outputs across 36 files. Resolves all 62 ASGLU warnings reported by codecheckToolbox. Co-Authored-By: Claude Opus 4.7 --- .../+nansen/+common/+uiinform/+roimanager/informUser.m | 7 +++++-- .../notifyUserAboutStrangeAltBehaviorOnWindows.m | 2 +- .../+config/+addons/@AddonManagerUI/AddonManagerUI.m | 2 +- code/+nansen/+internal/+system/DiskConnectionMonitor.m | 4 ++-- code/+nansen/+session/SessionMethod.m | 2 +- .../+image/+registration/findRotationOffsetsFFT.m | 2 +- .../+autosegmentation/+cnmf/addManualComponent.m | 2 +- code/+nansen/+twophoton/+autosegmentation/+cnmf/run.m | 10 +++++----- .../+twophoton/+autosegmentation/+suite2p/run.m | 2 +- code/+nansen/+twophoton/+roi/+stats/imageprops.m | 2 -- code/+nansen/+ui/MetaTableColumnLayout.m | 2 +- .../+flufinder/+detect/findUniqueRoisFromComponents.m | 2 +- code/apps/+fovmanager/+mapobject/CranialWindow.m | 2 -- .../+fovmanager/+utility/+atlas/getRegionAtPoint.m | 1 - .../+fovmanager/+widget/searchAutoCompleteInputDlg.m | 2 +- code/apps/+imviewer/+plugin/@RoiManager/RoiManager.m | 4 +--- code/apps/+imviewer/+widget/ThumbnailSelector.m | 2 +- code/apps/+roisignalviewer/@App/App.m | 2 +- code/apps/roiSignalViewer.m | 2 +- code/dashboards/+roimanager/RoimanagerDashboard.m | 4 ++-- code/datatypes/+nansen/+stack/+utility/mat2tiffstack.m | 2 +- .../+nansen/+stack/+virtual/Suite2pCorrected.m | 4 ++-- code/datatypes/+nansen/+stack/open.m | 2 +- code/graphics/+applify/helpDialog.m | 2 +- code/graphics/+uics/searchAutoCompleteInputDlg.m | 2 +- code/graphics/+uim/+illustration/scalebar.m | 4 ++-- .../+roiRegistration/classifyMultiSessionRois.m | 2 +- .../+process/+roiRegistration/migrateRoisToFovs.m | 2 +- .../+utility/+sciscan/correctResonanceStretch.m | 1 - .../+twophoton/+utility/+sciscan/createAverageZStack.m | 2 +- code/tools/+roimanager/RoiTable.m | 2 +- code/tools/+roimanager/roiMap.m | 2 +- .../+nansen/+plugin/+imviewer/FlowRegistration.m | 2 +- .../+quicky/+utility/finalizeRoiSegmentation.m | 6 ++++-- .../+nansen/+wrapper/+quicky/@Processor/Processor.m | 2 +- .../+wrapper/+suite2p/@Processor/segmentPartition.m | 2 +- 36 files changed, 47 insertions(+), 50 deletions(-) diff --git a/code/+nansen/+common/+uiinform/+roimanager/informUser.m b/code/+nansen/+common/+uiinform/+roimanager/informUser.m index 64345453a..997d9768c 100644 --- a/code/+nansen/+common/+uiinform/+roimanager/informUser.m +++ b/code/+nansen/+common/+uiinform/+roimanager/informUser.m @@ -29,7 +29,7 @@ function informUser(infoID, mode) preferenceName = 'HowToAdjustAutodetectionArea'; dialogMessage = {... 'To adjust the active area used for autodetection of rois, use ''alt'' + mousescroll.', ... - 'The Crosshairs should resize to indicate the size of the active area' }; + 'The Crosshairs should resize to indicate the size of the active area.' }; end dialogTitle = 'Info'; @@ -39,7 +39,10 @@ function informUser(infoID, mode) setpref(preferenceGroup, preferenceName, 'ask'); case "default" - [pval, tf] = uigetpref(preferenceGroup, preferenceName, ... + if nansen.util.useModernUiComponents() + dialogMessage = strjoin(dialogMessage); + end + uigetpref(preferenceGroup, preferenceName, ... dialogTitle, dialogMessage, {'Ok'}); shownThisUserSession(infoID) = true; diff --git a/code/+nansen/+common/+uiinform/+roimanager/notifyUserAboutStrangeAltBehaviorOnWindows.m b/code/+nansen/+common/+uiinform/+roimanager/notifyUserAboutStrangeAltBehaviorOnWindows.m index 50b0281f9..d6b0ca53b 100644 --- a/code/+nansen/+common/+uiinform/+roimanager/notifyUserAboutStrangeAltBehaviorOnWindows.m +++ b/code/+nansen/+common/+uiinform/+roimanager/notifyUserAboutStrangeAltBehaviorOnWindows.m @@ -14,5 +14,5 @@ function notifyUserAboutStrangeAltBehaviorOnWindows(mode) 'time to unfreeze the pointer tool or to use the right ''alt'' button instead.'}; pbtns = {'Ok'}; - [pval, tf] = uigetpref(group, pref, title, msg, pbtns); + uigetpref(group, pref, title, msg, pbtns); end diff --git a/code/+nansen/+config/+addons/@AddonManagerUI/AddonManagerUI.m b/code/+nansen/+config/+addons/@AddonManagerUI/AddonManagerUI.m index 10f31c983..ace0bfe72 100644 --- a/code/+nansen/+config/+addons/@AddonManagerUI/AddonManagerUI.m +++ b/code/+nansen/+config/+addons/@AddonManagerUI/AddonManagerUI.m @@ -304,7 +304,7 @@ function onBrowseAddonPushed(obj, addonName, iRow) quest = {'Locate the folder where this addon is saved'}; pbtns = {'Ok', 'Cancel'}; - [pval, tf] = uigetpref(group,pref,title,quest,pbtns); + [pval, ~] = uigetpref(group,pref,title,quest,pbtns); switch pval case 'ok' diff --git a/code/+nansen/+internal/+system/DiskConnectionMonitor.m b/code/+nansen/+internal/+system/DiskConnectionMonitor.m index 23444e9d5..6fa1eaef9 100644 --- a/code/+nansen/+internal/+system/DiskConnectionMonitor.m +++ b/code/+nansen/+internal/+system/DiskConnectionMonitor.m @@ -99,14 +99,14 @@ function updateDiskList(obj, updatedVolumeList) % Update volumelist obj.VolumeList = updatedVolumeList; - [addedNames, idx] = setdiff(newNames, oldNames); + addedNames = setdiff(newNames, oldNames); if ~isempty(addedNames) fprintf('Added drives %s\n', addedNames{1}); obj.notify('DiskAdded', event.EventData) end % Check if any names were removed - [removedNames, idx] = setdiff(oldNames, newNames); + removedNames = setdiff(oldNames, newNames); if ~isempty(removedNames) fprintf('Removed drives %s\n', removedNames{1}); obj.notify('DiskRemoved', event.EventData) diff --git a/code/+nansen/+session/SessionMethod.m b/code/+nansen/+session/SessionMethod.m index 5f5bc3927..4ff796f23 100644 --- a/code/+nansen/+session/SessionMethod.m +++ b/code/+nansen/+session/SessionMethod.m @@ -233,7 +233,7 @@ function usePreset(obj, presetName) [flags, varargin] = utility.splitvararginflags(varargin, flags); % Check for any name, value pairs in varargin - [nvPairs, varargin] = utility.getnvpairs(varargin); + [nvPairs, ~] = utility.getnvpairs(varargin); S = utility.parsenvpairs(S, 1, nvPairs); diff --git a/code/+nansen/+tools/+image/+registration/findRotationOffsetsFFT.m b/code/+nansen/+tools/+image/+registration/findRotationOffsetsFFT.m index 57392d858..c4cb5cbbe 100755 --- a/code/+nansen/+tools/+image/+registration/findRotationOffsetsFFT.m +++ b/code/+nansen/+tools/+image/+registration/findRotationOffsetsFFT.m @@ -25,7 +25,7 @@ assert(ndims(IM) == 3, 'First input must be a 3D array.') % Get size of input image array -[imHeight, imWidth, nFrames] = size(IM); +[~, ~, nFrames] = size(IM); usFactor = 2; % Set rotating to true for all frames by default. diff --git a/code/+nansen/+twophoton/+autosegmentation/+cnmf/addManualComponent.m b/code/+nansen/+twophoton/+autosegmentation/+cnmf/addManualComponent.m index bac740c08..da9ee435a 100644 --- a/code/+nansen/+twophoton/+autosegmentation/+cnmf/addManualComponent.m +++ b/code/+nansen/+twophoton/+autosegmentation/+cnmf/addManualComponent.m @@ -44,7 +44,7 @@ Y_res = Ypatch - A(coor,:)*C; % Subtract activity from other rois in the square??? Y_res = bsxfun(@minus, Y_res, median(Y_res,2)); % same as Y_res-median(Y_res,2) - [atemp, ctemp, ~, ~, newcenter, ~] = greedyROI(reshape(Y_res,2*roiRad+1,2*roiRad+1,T), 1, options); % Call greedy roi to initialize a and c. + [atemp, ctemp] = greedyROI(reshape(Y_res,2*roiRad+1,2*roiRad+1,T), 1, options); % Call greedy roi to initialize a and c. % Add the new components to the list of components! A(coor,end+1) = atemp/norm(atemp); diff --git a/code/+nansen/+twophoton/+autosegmentation/+cnmf/run.m b/code/+nansen/+twophoton/+autosegmentation/+cnmf/run.m index a97a5a596..19b1b764f 100644 --- a/code/+nansen/+twophoton/+autosegmentation/+cnmf/run.m +++ b/code/+nansen/+twophoton/+autosegmentation/+cnmf/run.m @@ -14,7 +14,7 @@ options = autosegment.cnmf.getOptions(size(Y), roiRadius); % % fast initialization of spatial components using greedyROI and HALS - [Ain,Cin,bin,fin,center] = initialize_components(Y, numRois, roiRadius, options, P); + [Ain,Cin,bin,fin,~] = initialize_components(Y, numRois, roiRadius, options, P); % % update spatial components Yr = reshape(Y, options.d, options.nFrames); @@ -22,15 +22,15 @@ % % update temporal components P.p = 0; % set AR temporarily to zero for speed - [C,f,P,S,YrA] = update_temporal_components(Yr,A,b,Cin,fin,P,options); + [C,f,P,S,~] = update_temporal_components(Yr,A,b,Cin,fin,P,options); % % merge found components - [Am,Cm,K_m,merged_ROIs,Pm,Sm] = merge_components(Yr,A,b,C,f,P,S,options); + [Am,Cm,~,~,Pm,~] = merge_components(Yr,A,b,C,f,P,S,options); % % evaluate components options.space_thresh = 0.3; options.time_thresh = 0.3; - [rval_space,rval_time,ind_space,ind_time] = classify_comp_corr(Y,Am,Cm,b,f,options); + [~,~,ind_space,ind_time] = classify_comp_corr(Y,Am,Cm,b,f,options); keep = ind_time & ind_space; throw = ~keep; @@ -38,7 +38,7 @@ % % refine estimates excluding rejected components Pm.p = p; % restore AR value [A2,b2,C2] = update_spatial_components(Yr,Cm(keep,:),f,[Am(:,keep),b],Pm,options); - [C2,f2,P2,S2,YrA2] = update_temporal_components(Yr,A2,b2,C2,f,Pm,options); + [C2,~,P2,S2,~] = update_temporal_components(Yr,A2,b2,C2,f,Pm,options); % % do some plotting diff --git a/code/+nansen/+twophoton/+autosegmentation/+suite2p/run.m b/code/+nansen/+twophoton/+autosegmentation/+suite2p/run.m index 64b19c492..c1302b25d 100644 --- a/code/+nansen/+twophoton/+autosegmentation/+suite2p/run.m +++ b/code/+nansen/+twophoton/+autosegmentation/+suite2p/run.m @@ -118,7 +118,7 @@ % reshape U to be (nMaps x Y x X) U = reshape(U, [], size(U,ndims(U)))'; -[nSVD, Npix] = size(U); +nSVD = size(U, 1); U = reshape(U, nSVD, Ly, Lx); % compute neuropil basis functions for cell detection diff --git a/code/+nansen/+twophoton/+roi/+stats/imageprops.m b/code/+nansen/+twophoton/+roi/+stats/imageprops.m index 6efd452d7..0d1ee15a2 100644 --- a/code/+nansen/+twophoton/+roi/+stats/imageprops.m +++ b/code/+nansen/+twophoton/+roi/+stats/imageprops.m @@ -27,8 +27,6 @@ getAll = ischar(params.Properties) && strcmp(params.Properties, 'all'); get = @(name) any( strcmp(params.Properties, name) ); %getfcn - [imageHeight, imageWidth, numRois] = size(roiImageArray); - % Initialize output stats = struct; diff --git a/code/+nansen/+ui/MetaTableColumnLayout.m b/code/+nansen/+ui/MetaTableColumnLayout.m index 98d1b98f8..fa01869b2 100644 --- a/code/+nansen/+ui/MetaTableColumnLayout.m +++ b/code/+nansen/+ui/MetaTableColumnLayout.m @@ -113,7 +113,7 @@ %obj.loadSettings() % Todo: This should be better integrated... - [nvPairs, varargin] = utility.getnvpairs(varargin{:}); + [nvPairs, ~] = utility.getnvpairs(varargin{:}); params = utility.nvpairs2struct(nvPairs); if isfield(params, 'ColumnSettings') obj.settings_ = params.ColumnSettings; diff --git a/code/algorithms/+flufinder/+detect/findUniqueRoisFromComponents.m b/code/algorithms/+flufinder/+detect/findUniqueRoisFromComponents.m index c64e1321e..032e6c594 100644 --- a/code/algorithms/+flufinder/+detect/findUniqueRoisFromComponents.m +++ b/code/algorithms/+flufinder/+detect/findUniqueRoisFromComponents.m @@ -172,7 +172,7 @@ mask(yInd, xInd) = 0; if ~isempty(roisOut) && ~isempty(newRoi) - [iA, iB] = flufinder.utility.findOverlappingRois(roisOut, newRoi, 0.75); + [~, iB] = flufinder.utility.findOverlappingRois(roisOut, newRoi, 0.75); newRoi(iB) = []; end diff --git a/code/apps/+fovmanager/+mapobject/CranialWindow.m b/code/apps/+fovmanager/+mapobject/CranialWindow.m index e98e9018f..c751a0328 100644 --- a/code/apps/+fovmanager/+mapobject/CranialWindow.m +++ b/code/apps/+fovmanager/+mapobject/CranialWindow.m @@ -199,8 +199,6 @@ function addImage(obj) [xBorder, yBorder] = pol2cart(theta', rho'); winCoordsPx = [xBorder, yBorder] + radius; - [height, width] = deal(radius*2); - case {'Trapezoidal 3x5mm'} rcc = [min(coords), nansen.util.range(coords)]; diff --git a/code/apps/+fovmanager/+utility/+atlas/getRegionAtPoint.m b/code/apps/+fovmanager/+utility/+atlas/getRegionAtPoint.m index c97673677..585cd8bde 100644 --- a/code/apps/+fovmanager/+utility/+atlas/getRegionAtPoint.m +++ b/code/apps/+fovmanager/+utility/+atlas/getRegionAtPoint.m @@ -12,7 +12,6 @@ % Get some values from S m = S.magnificationFactor; regionLabels = S.regionLabels; - [mapHeight, mapWidth] = size(S.indexMap); x = round( (pointCoords(1) - S.referencePoint(1)) .* m ); y = round( (pointCoords(2) - S.referencePoint(2)) .* m ); diff --git a/code/apps/+fovmanager/+widget/searchAutoCompleteInputDlg.m b/code/apps/+fovmanager/+widget/searchAutoCompleteInputDlg.m index 83397ef8f..4a75794cd 100644 --- a/code/apps/+fovmanager/+widget/searchAutoCompleteInputDlg.m +++ b/code/apps/+fovmanager/+widget/searchAutoCompleteInputDlg.m @@ -63,7 +63,7 @@ function createDropDownSelector(obj, listOfChoices) % Set color (unfortunately, this only affects editable combos) obj.jComboBox.setBackground(java.awt.Color.white); - [jhComboBox, hContainer1] = javacomponent(obj.jComboBox, [], obj.uiPanel); + [~, hContainer1] = javacomponent(obj.jComboBox, [], obj.uiPanel); % set(jhComboBox, 'ActionPerformedCallback', []); set(hContainer1, 'Units', 'normalized', 'Position',[0,0,1,1]); diff --git a/code/apps/+imviewer/+plugin/@RoiManager/RoiManager.m b/code/apps/+imviewer/+plugin/@RoiManager/RoiManager.m index 88c146a1c..bfec6406a 100755 --- a/code/apps/+imviewer/+plugin/@RoiManager/RoiManager.m +++ b/code/apps/+imviewer/+plugin/@RoiManager/RoiManager.m @@ -640,8 +640,6 @@ function runAutoSegmentation(obj) Y = cast(mask, 'like', Y) .* Y; % Adapt this to virtual stack - [im, stat] = deal([]); - % NB: Function is missing. [foundRois, im, stat] = roimanager.autosegment.autosegmentSoma(Y, mean(Y, 3)); @@ -761,7 +759,7 @@ function extractSignals(obj) % Todo: Use imageStackProcessors and external metho end obj.ImviewerObj.displayMessage('Deconvolving DFF...') - [deconvolved, denoised, opts] = deconvolveDff(dff, 'deconvolutionMethod', 'caiman', obj.deconvolutionOptions); + [deconvolved, denoised, ~] = deconvolveDff(dff, 'deconvolutionMethod', 'caiman', obj.deconvolutionOptions); save(savePath, 'deconvolved', '-append') save(savePath, 'denoised', '-append') % Todo: save options diff --git a/code/apps/+imviewer/+widget/ThumbnailSelector.m b/code/apps/+imviewer/+widget/ThumbnailSelector.m index 75d280d1c..cfeaccfe4 100644 --- a/code/apps/+imviewer/+widget/ThumbnailSelector.m +++ b/code/apps/+imviewer/+widget/ThumbnailSelector.m @@ -31,7 +31,7 @@ function obj = ThumbnailSelector(parent, imdata, labels, callbacks, varargin) % % % if ndims(imdata) == 3 - [imHeight, imWidth, nImages] = size(imdata); + [~, ~, nImages] = size(imdata); % % % elseif ndims(imdata) == 4 % % % [imHeight, imWidth, ~, nImages] = size(imdata); % % % end diff --git a/code/apps/+roisignalviewer/@App/App.m b/code/apps/+roisignalviewer/@App/App.m index 815d999be..3bd18c0b5 100644 --- a/code/apps/+roisignalviewer/@App/App.m +++ b/code/apps/+roisignalviewer/@App/App.m @@ -415,7 +415,7 @@ function editParameters(obj, s, e) function editDeconvolutionParameters(obj, s, e) - [P, V] = nansen.twophoton.roisignals.getDeconvolutionParameters(); + [P, ~] = nansen.twophoton.roisignals.getDeconvolutionParameters(); P = rmfield(P, 'modelParams'); P = obj.DeconvolutionOptions; diff --git a/code/apps/roiSignalViewer.m b/code/apps/roiSignalViewer.m index 17410ee24..13bb4778b 100644 --- a/code/apps/roiSignalViewer.m +++ b/code/apps/roiSignalViewer.m @@ -258,7 +258,7 @@ function editParameters(obj, s, e) function editDeconvolutionParameters(obj, s, e) - [P, V] = nansen.twophoton.roisignals.getDeconvolutionParameters(); + [P, ~] = nansen.twophoton.roisignals.getDeconvolutionParameters(); P = rmfield(P, 'modelParams'); P = obj.DeconvolutionOptions; diff --git a/code/dashboards/+roimanager/RoimanagerDashboard.m b/code/dashboards/+roimanager/RoimanagerDashboard.m index 157be5583..32f04d35e 100644 --- a/code/dashboards/+roimanager/RoimanagerDashboard.m +++ b/code/dashboards/+roimanager/RoimanagerDashboard.m @@ -436,7 +436,7 @@ function initializeSettingsPanel(obj) P0.ActiveChannel_ = obj.getActiveChannelAlternatives(); i = 0; - [structs, names, callbacks, valueChangedFcn] = deal( {} ); + [structs, names, callbacks] = deal( {} ); i = i+1; structs{i} = P0; @@ -486,7 +486,7 @@ function initializeSettingsPanel(obj) i = i+1; - [P2, V] = nansen.twophoton.roisignals.getDeconvolutionParameters(); + [P2, ~] = nansen.twophoton.roisignals.getDeconvolutionParameters(); P2.modelType_ = {'ar1', 'ar2', 'exp2', 'autoar'}; P2.tauRise_ = struct('type', 'slider', 'args', {{'Min', 0, 'Max', 1000, 'nTicks', 100, 'TooltipPrecision', 0, 'TooltipUnits', 'ms'}}); diff --git a/code/datatypes/+nansen/+stack/+utility/mat2tiffstack.m b/code/datatypes/+nansen/+stack/+utility/mat2tiffstack.m index 56be335e9..841a1100b 100644 --- a/code/datatypes/+nansen/+stack/+utility/mat2tiffstack.m +++ b/code/datatypes/+nansen/+stack/+utility/mat2tiffstack.m @@ -97,7 +97,7 @@ function mat2tiffstack( mat, stackPath, createRgb, useBigTiff) end else - [height, width, nFrames] = size(mat); + [height, width, ~] = size(mat); mat = reshape(mat, height, width, []); nansen.stack.utility.mat2tiffstack(mat, stackPath, false, tiffMode) diff --git a/code/datatypes/+nansen/+stack/+virtual/Suite2pCorrected.m b/code/datatypes/+nansen/+stack/+virtual/Suite2pCorrected.m index df23f4dca..eb50d5777 100644 --- a/code/datatypes/+nansen/+stack/+virtual/Suite2pCorrected.m +++ b/code/datatypes/+nansen/+stack/+virtual/Suite2pCorrected.m @@ -74,9 +74,9 @@ if ischar(filepath) || (iscell(filepath) && numel(filepath)==1) if iscell(filepath) - [folder, ~, ext] = fileparts(filepath{1}); + folder = fileparts(filepath{1}); else - [folder, ~, ext] = fileparts(filepath); + folder = fileparts(filepath); end rootDir = utility.path.getAncestorDir(folder, 2); diff --git a/code/datatypes/+nansen/+stack/open.m b/code/datatypes/+nansen/+stack/open.m index d6adb5f8c..1a3b14357 100644 --- a/code/datatypes/+nansen/+stack/open.m +++ b/code/datatypes/+nansen/+stack/open.m @@ -17,7 +17,7 @@ if ~isa(pathStr, 'cell'); pathStr = {pathStr}; end numFiles = numel(pathStr); - [folder, filename, fileext] = fileparts(pathStr{1}); + [folder, ~, fileext] = fileparts(pathStr{1}); assert(all(contains(pathStr, fileext)), 'All files must be the same') diff --git a/code/graphics/+applify/helpDialog.m b/code/graphics/+applify/helpDialog.m index d88e9b219..c6a1c6a1c 100644 --- a/code/graphics/+applify/helpDialog.m +++ b/code/graphics/+applify/helpDialog.m @@ -31,7 +31,7 @@ function helpDialog(functionName, options) [idx, functions] = regexp(functionContentStr, 'classdef.*?end', 'start', 'match'); if isempty(idx) - [idx, functions] = regexp(functionContentStr, 'function.*?end', 'start', 'match'); + [~, functions] = regexp(functionContentStr, 'function.*?end', 'start', 'match'); end function_def = functions{1}; diff --git a/code/graphics/+uics/searchAutoCompleteInputDlg.m b/code/graphics/+uics/searchAutoCompleteInputDlg.m index 307129b35..ad51dd94c 100644 --- a/code/graphics/+uics/searchAutoCompleteInputDlg.m +++ b/code/graphics/+uics/searchAutoCompleteInputDlg.m @@ -222,7 +222,7 @@ function createDropDownSelector(obj) % Set color (unfortunately, this only affects editable combos) obj.jComboBox.setBackground(java.awt.Color.white); - [jhComboBox, hContainer1] = javacomponent(obj.jComboBox, [], obj.Parent); + [~, hContainer1] = javacomponent(obj.jComboBox, [], obj.Parent); set(hContainer1, 'Units', obj.Units_, 'Position', obj.Position_); obj.hContainerComboBox = hContainer1; diff --git a/code/graphics/+uim/+illustration/scalebar.m b/code/graphics/+uim/+illustration/scalebar.m index 913fe25bd..d8cda6244 100644 --- a/code/graphics/+uim/+illustration/scalebar.m +++ b/code/graphics/+uim/+illustration/scalebar.m @@ -126,7 +126,7 @@ obj.assignPVPairs(nvPairs{:}) % Parse nv pairs - [nvPairs, varargin] = getnvpairs(varargin{:}); + [nvPairs, ~] = getnvpairs(varargin{:}); obj.assignPVPairs(nvPairs{:}) % % Start creating scalebar @@ -362,7 +362,7 @@ function updateAxesSizePixel(obj) yData = calculateYData(obj) ; yLim = obj.hAxes.YLim; - [xSign, ySign] = configurePositionDirection(obj); + [~, ySign] = configurePositionDirection(obj); if strcmp(obj.hAxes.YDir, 'reverse') ySign = -ySign; diff --git a/code/modules/+nansen/+module/+ophys/+twophoton/+sessionmethod/+process/+roiRegistration/classifyMultiSessionRois.m b/code/modules/+nansen/+module/+ophys/+twophoton/+sessionmethod/+process/+roiRegistration/classifyMultiSessionRois.m index b7e117307..b7a8cac3b 100644 --- a/code/modules/+nansen/+module/+ophys/+twophoton/+sessionmethod/+process/+roiRegistration/classifyMultiSessionRois.m +++ b/code/modules/+nansen/+module/+ophys/+twophoton/+sessionmethod/+process/+roiRegistration/classifyMultiSessionRois.m @@ -90,7 +90,7 @@ % Concatenate roi from different channels and planes % longterm todo - [roiArray, roiImages, roiStats, roiClassification, roiLabels] = deal(cell(1, numSessions)); + [roiArray, roiImages, ~, roiClassification, roiLabels] = deal(cell(1, numSessions)); for i = 1:numSessions sessionID = sessionObject(i).sessionID; diff --git a/code/modules/+nansen/+module/+ophys/+twophoton/+sessionmethod/+process/+roiRegistration/migrateRoisToFovs.m b/code/modules/+nansen/+module/+ophys/+twophoton/+sessionmethod/+process/+roiRegistration/migrateRoisToFovs.m index 6bf54ee82..67f00cd10 100644 --- a/code/modules/+nansen/+module/+ophys/+twophoton/+sessionmethod/+process/+roiRegistration/migrateRoisToFovs.m +++ b/code/modules/+nansen/+module/+ophys/+twophoton/+sessionmethod/+process/+roiRegistration/migrateRoisToFovs.m @@ -126,7 +126,7 @@ fovImageArray = cat(3, fovImages{:}); % Register images for each fov/session to reference fov/session - [fovShifts, imArrayNR] = flufinder.longitudinal.alignFovs(fovImageArray); + [fovShifts, ~] = flufinder.longitudinal.alignFovs(fovImageArray); % Load rois for reference session sessionData = sessionObject(1).Data; diff --git a/code/modules/+nansen/+module/+ophys/+twophoton/+utility/+sciscan/correctResonanceStretch.m b/code/modules/+nansen/+module/+ophys/+twophoton/+utility/+sciscan/correctResonanceStretch.m index 6b26df106..4f34c5480 100644 --- a/code/modules/+nansen/+module/+ophys/+twophoton/+utility/+sciscan/correctResonanceStretch.m +++ b/code/modules/+nansen/+module/+ophys/+twophoton/+utility/+sciscan/correctResonanceStretch.m @@ -160,7 +160,6 @@ end im = im(:, cropLeft+1:end-cropRight, :); - [height, width, nFrames] = size(im); end new_im = im; diff --git a/code/modules/+nansen/+module/+ophys/+twophoton/+utility/+sciscan/createAverageZStack.m b/code/modules/+nansen/+module/+ophys/+twophoton/+utility/+sciscan/createAverageZStack.m index deed6d83b..20fa9334c 100644 --- a/code/modules/+nansen/+module/+ophys/+twophoton/+utility/+sciscan/createAverageZStack.m +++ b/code/modules/+nansen/+module/+ophys/+twophoton/+utility/+sciscan/createAverageZStack.m @@ -145,7 +145,7 @@ [h, w, numPlanes] = size(IM); IM = reshape(IM, h, w, 1, numPlanes); end - [h, w, numChannels, numPlanes] = size(IM); + [~, ~, numChannels, numPlanes] = size(IM); tmpPixelValues = reshape(IM, [], numChannels, numPlanes); diff --git a/code/tools/+roimanager/RoiTable.m b/code/tools/+roimanager/RoiTable.m index 0d31c1ab8..eeeaa6a96 100644 --- a/code/tools/+roimanager/RoiTable.m +++ b/code/tools/+roimanager/RoiTable.m @@ -444,7 +444,7 @@ function updateTableRow(obj, rowIdx, tableRowData) if size(obj.roiTable, 2) == size(tableRowData, 2) obj.roiTable(rowIdx, :) = tableRowData; else - [~, iA, iC] = intersect(obj.roiTable.Properties.VariableNames, ... + [~, iA] = intersect(obj.roiTable.Properties.VariableNames, ... tableRowData.Properties.VariableNames, 'stable'); obj.roiTable(rowIdx, iA) = tableRowData; end diff --git a/code/tools/+roimanager/roiMap.m b/code/tools/+roimanager/roiMap.m index 83968932c..24a569cc3 100755 --- a/code/tools/+roimanager/roiMap.m +++ b/code/tools/+roimanager/roiMap.m @@ -1144,7 +1144,7 @@ function createFreehandRoi(obj, x, y, thickness) IM = mean(imChunk(:, :, IND), 3); - [roiMaskSmall, s] = flufinder.binarize.findSomaMaskByEdgeDetection(IM); + [roiMaskSmall, ~] = flufinder.binarize.findSomaMaskByEdgeDetection(IM); roiMask = false(imSize); roiMask(S(2):L(2), S(1):L(1)) = roiMaskSmall; diff --git a/code/wrappers/+nansen/+plugin/+imviewer/FlowRegistration.m b/code/wrappers/+nansen/+plugin/+imviewer/FlowRegistration.m index b4a78b48c..b821315ad 100644 --- a/code/wrappers/+nansen/+plugin/+imviewer/FlowRegistration.m +++ b/code/wrappers/+nansen/+plugin/+imviewer/FlowRegistration.m @@ -126,7 +126,7 @@ function runTestAlign(obj) Y = single(Y); end - [Y, bidirBatchSize, colShifts] = nansen.wrapper.normcorre.utility.correctLineOffsets(Y, 100); + Y = nansen.wrapper.normcorre.utility.correctLineOffsets(Y, 100); obj.ImviewerObj.displayMessage('Running FlowRegistration...') diff --git a/code/wrappers/+nansen/+wrapper/+quicky/+utility/finalizeRoiSegmentation.m b/code/wrappers/+nansen/+wrapper/+quicky/+utility/finalizeRoiSegmentation.m index aa47ff2eb..9ec61514c 100644 --- a/code/wrappers/+nansen/+wrapper/+quicky/+utility/finalizeRoiSegmentation.m +++ b/code/wrappers/+nansen/+wrapper/+quicky/+utility/finalizeRoiSegmentation.m @@ -65,14 +65,16 @@ fprintf('Improving estimates for temporally active cells...\n') roiImageArray = roimanager.autosegment.extractRoiImages(imArray, roiArrayT, dffT', 'ImageType', 'correlation'); roiArrayT = roiArrayT.addImage(roiImageArray); - [roiArrayT1, ~] = roimanager.binarize.improveMaskEstimate2(roiArrayT); + + % Todo: Check if including this improves results + % [roiArrayT, ~] = roimanager.binarize.improveMaskEstimate2(roiArrayT); % Merge overlapping rois in the activity based roi Array. roiArrayT = roimanager.utilities.mergeOverlappingRois(roiArrayT); % Do a final check for overlapping rois... if opt.RingConvolutionSearch && ~isempty(roiArrayS) - [iA, iB] = roimanager.utilities.findOverlappingRois(roiArrayS, roiArrayT, 0.75); + [~, iB] = roimanager.utilities.findOverlappingRois(roiArrayS, roiArrayT, 0.75); roiArrayT(iB) = []; end diff --git a/code/wrappers/+nansen/+wrapper/+quicky/@Processor/Processor.m b/code/wrappers/+nansen/+wrapper/+quicky/@Processor/Processor.m index e78dbcdac..027d1da1a 100644 --- a/code/wrappers/+nansen/+wrapper/+quicky/@Processor/Processor.m +++ b/code/wrappers/+nansen/+wrapper/+quicky/@Processor/Processor.m @@ -209,7 +209,7 @@ function finalizeResults(obj) imArray = obj.getImageArray(); fMean = nansen.twophoton.roisignals.extractF(imArray, roiArrayT); - [fMean, roiArrayT] = flufinder.utility.removeIsNanDff(fMean, roiArrayT); + [~, roiArrayT] = flufinder.utility.removeIsNanDff(fMean, roiArrayT); % % Detect rois from a shape-based kernel convolution % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/code/wrappers/+nansen/+wrapper/+suite2p/@Processor/segmentPartition.m b/code/wrappers/+nansen/+wrapper/+suite2p/@Processor/segmentPartition.m index 2e7c0accd..bd54d366c 100644 --- a/code/wrappers/+nansen/+wrapper/+suite2p/@Processor/segmentPartition.m +++ b/code/wrappers/+nansen/+wrapper/+suite2p/@Processor/segmentPartition.m @@ -113,7 +113,7 @@ % reshape U to be (nMaps x Y x X) U = reshape(U, [], size(U,ndims(U)))'; - [nSVD, Npix] = size(U); + nSVD = size(U, 1); U = reshape(U, nSVD, Ly, Lx); % compute neuropil basis functions for cell detection From c064ca20e6a6036452fee07ae2f29ab43d359058 Mon Sep 17 00:00:00 2001 From: ehennestad Date: Thu, 14 May 2026 16:09:32 +0200 Subject: [PATCH 13/14] Remove unused jFrame (Deprecated/removed property) Co-Authored-By: Claude Opus 4.7 --- code/graphics/+applify/ModularApp.m | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/code/graphics/+applify/ModularApp.m b/code/graphics/+applify/ModularApp.m index 2891ec19a..563a5ead7 100644 --- a/code/graphics/+applify/ModularApp.m +++ b/code/graphics/+applify/ModularApp.m @@ -365,11 +365,7 @@ function maximizeWindow(app, ~, ~) end end - set(app.hFigure, 'Resize', 'on') - - jFrame = get(app.hFigure, 'JavaFrame'); - % jWindow = jFrame.getFigurePanelContainer.getTopLevelAncestor; - % jWindow.setFullScreen(false) + set(app.hFigure, 'Resize', 'on') % Todo: reset? newFigurePos = screenSize; app.hPanel.SizeChangedFcn = []; From 2f5ca06bfdb43f4863d672b2b9ac3e095b013fb0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 14 May 2026 20:49:20 +0000 Subject: [PATCH 14/14] Update GitHub badges [skip ci] --- .github/badges/code_issues.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/badges/code_issues.svg b/.github/badges/code_issues.svg index cd05e9181..367e4cc71 100644 --- a/.github/badges/code_issues.svg +++ b/.github/badges/code_issues.svg @@ -1 +1 @@ -code issuescode issues17041704 \ No newline at end of file +code issuescode issues12981298 \ No newline at end of file