BatchProcessing¶
- class controllers.BatchProcessing¶
Bases:
handleBATCHPROCESSING - Controller for the Batch Processing tool - MIB3 port of mibBatchController.
- Syntax:
obj.startController('controllers.BatchProcessing');
- Constructor Summary
- BatchProcessing(mibModel, varargin)¶
BATCHPROCESSING - Constructor - create a BatchProcessing controller and open its GUI window.
- Syntax:
obj = BatchProcessing(mibModel, mibController)
Builds the obj.Sections action catalogue (via initialize()), creates the AppDesigner view, adjusts fonts, positions the window to the left of the main MIB window, wires all GUI callbacks, registers three model listeners, and makes the window visible.
- Input Arguments:
mibModel - handle to the application MibModel instance
varargin{1} - handle to the parent MibController
Example - start the batch processing controller:
obj.startController('controllers.BatchProcessing');
- Property Summary
- CurrentBatch¶
a cell array with handles to listeners
- Protocol¶
a structure with selected Batch options, returned by returnBatchOpt function of the controller
- Sections¶
maximal number of protocol history for backup
- listener¶
handle to the view
- mibController¶
- mibModel¶
handle to mibController
- protocolBackups¶
a structure with picked actions that should be executed
- protocolBackupsCurrNumber¶
a cell array with backuped protocols
- protocolBackupsMaxNumber¶
current number of the protocol history
- protocolListIndex¶
index of a row selected in the selectedActionTable
- selectedAction¶
index of the selected section, i.e. id for obj.Sections(id) updated by obj.view.handles.selectProtocolSection
- selectedActionTableIndex¶
a strutcure with available Sections and corresponding actions Sections(id).Name -> name of available section (i.e. ‘Menu -> File’, ‘Menu -> Dataset’) Sections(id).Actions(id2).Name -> name of an action available for the selected section (i.e. ‘Tools for Images -> Image Arithmetics’, ‘Semi-automatic segmentation –> Global thresholding’) Sections(id).Actions(id2).Parameters -> a structure with parameters for the action
- selectedSection¶
index of a row selected in the protocolList
- stopProtocolSwitch¶
- view¶
handles to the model
- Method Summary
- addCallbacks()¶
ADDCALLBACKS - attach ValueChangedFcn / ButtonPushedFcn callbacks to every GUI widget.
- Syntax:
obj.addCallbacks()
Called once from the constructor after the view has been created. Wires callbacks to all GUI widgets:
selectProtocolSection/selectProtocolAction-selectProtocolSection_CallbackprotocolList-protocolList_SelectionCallbackrunProtocol-runProtocol_Callback('complete')runProtocolFromSelected-runProtocol_Callback('from')runProtocolStep-runProtocol_Callback('step')runProtocolStepAdvance-runProtocol_Callback('stepadvance')helpBtn-helpBtn_CallbackloadProtocol,saveProtocol,deleteProtocol- respective methodsundo,redo-backupProtocolRestore('undo'/'redo')addToProtocol,insertIntoProtocol,updateProtocol-protocolActions_CallbacklistenMIB-listenMIB_CallbackselectedActionTableCell*-selectedActionTableItem_UpdateselectedActionTable-displaySelectedActionTableItems
Example - attach all GUI callbacks:
obj.addCallbacks();
- backupProtocol()¶
BACKUPPROTOCOL - save a snapshot of the current protocol into the undo history.
- Syntax:
obj.backupProtocol()
The history depth is limited to obj.protocolBackupsMaxNumber entries. Any redo snapshots ahead of the current position are discarded.
- Usage:
Example 1:
obj.backupProtocol();
- backupProtocolRestore(mode)¶
BACKUPPROTOCOLRESTORE - restore the protocol from the undo/redo history.
- Syntax:
obj.backupProtocolRestore(mode)- Input Arguments:
mode - a string with direction of restoration ‘undo’ - restore the previous state ‘redo’ - restore the next state
- Usage:
Example 1:
obj.backupProtocolRestore('undo');Example 2:
obj.backupProtocolRestore('redo');
- closeWindow()¶
CLOSEWINDOW - close the BatchProcessing window and clean up listeners.
- Syntax:
obj.closeWindow()
Example - close the batch processing window:
obj.closeWindow();
- createContextMenus()¶
CREATECONTEXTMENUS - create and attach the right-click context menu to selectedActionTable.
- Syntax:
obj.createContextMenus()
Builds two context menus:
protocolList context menu (calls
protocolActions_Callback):Show settings- display settings of the selected stepDuplicate- duplicate the selected stepInsert STOP EXECUTION event- insert a stop step before the selected stepMove up- move the selected step one position upMove down- move the selected step one position downDelete from protocol- remove the selected step from the protocol
selectedActionTable context menu (calls
selectedActionTable_ContextCallback):Add parameter- append a new numeric/logical field to CurrentBatchDelete parameter- remove the highlighted field from CurrentBatchAdd directories- extend the directory list of a DIR LOOP stepModify directory- replace the selected directory with a new pathRemove directories- remove checked entries from a DIR LOOP listSet second column width- resize the value column of the parameter table
Example - build context menus:
obj.createContextMenus();
- deleteProtocol()¶
DELETEPROTOCOL - delete the current protocol (stores an undo snapshot first).
- Syntax:
obj.deleteProtocol()- Usage:
Example 1:
obj.deleteProtocol();
- directoryLoopAction_Callback(BatchOptInput)¶
DIRECTORYLOOPACTION_CALLBACK - build or apply the BatchOpt structure for a Directory Loop protocol step.
- Syntax:
obj.directoryLoopAction_Callback(BatchOptInput)
When called with no second argument (interactive mode) the function constructs a default BatchOpt and returns without doing anything further. When called with BatchOptInput == NaN it fires a SyncBatch event so that the Batch Processing controller can populate its parameter table with the defaults. When called with a struct it merges the supplied fields over the defaults via updateBatchOptCombineFields_Shared.
- The resulting BatchOpt specifies:
DirectoriesList - initially set to obj.mibModel.currentDirectory; the
- user expands the list via the context menu in the Batch Processing GUI
DirLoopWaitbar - [logical] whether to show a per-directory waitbar
- Input Arguments:
BatchOptInput - [optional] - NaN - send default BatchOpt to BatchProcessing via SyncBatch event - struct - override defaults with supplied fields and apply
- Usage:
Example 1:
obj.directoryLoopAction_Callback(NaN); // populate parameter tableExample 2:
obj.directoryLoopAction_Callback(BatchOpt); // apply saved settings
- directoryOperationsAction_Callback(BatchOptInput)¶
DIRECTORYOPERATIONSACTION_CALLBACK - build or apply the BatchOpt structure for a Directory Operations protocol step.
- Syntax:
obj.directoryOperationsAction_Callback(BatchOptInput)
When called with no second argument (interactive mode) the function constructs a default BatchOpt and returns. When called with BatchOptInput == NaN it fires a SyncBatch event so the Batch Processing controller populates its parameter table. When called with a struct it merges supplied fields over the defaults via updateBatchOptCombineFields_Shared.
- Supported operations (Operation field):
‘Change current MIB directory’ - set obj.mibModel.currentDirectory
‘Create new’ - create the resolved directory if absent
‘Delete directory’ - remove the resolved (empty) directory
- Directory resolution mode (Mode field):
‘Absolute’ - use DirectoryName verbatim
‘Relative to current MIB path’- resolve relative to currentDirectory
‘Inherit from Directory loop’ - use directory from the enclosing loop
‘Inherit dirs +Dirname’ - append DirectoryName to the loop directory
- Input Arguments:
BatchOptInput - [optional] - NaN - send default BatchOpt to BatchProcessing via SyncBatch event - struct - override defaults with supplied fields and apply
- Usage:
Example 1:
obj.directoryOperationsAction_Callback(NaN); // populate parameter tableExample 2:
obj.directoryOperationsAction_Callback(BatchOpt); // apply saved settings
- displaySelectedActionTableItems(evnt)¶
DISPLAYSELECTEDACTIONTABLEITEMS - show the appropriate editing widget for the currently highlighted row in selectedActionTable.
- Syntax:
obj.displaySelectedActionTableItems(evnt)
Hides all editing widgets, then makes exactly one visible based on the data type of the selected BatchOpt field: logical selectedActionTableCellCheck cell (strings) selectedActionTableCellPopup cell (numeric) selectedActionTableCellEdit char selectedActionTableCellEdit numeric selectedActionTableCellNumericEdit
- Input Arguments:
evnt - [optional] CellSelectionCallback event data; when provided the selected row index is read from evnt.Indices(1,1) and stored in obj.selectedActionTableIndex before updating the widgets
- Usage:
Example 1:
obj.displaySelectedActionTableItems();Example 2:
obj.displaySelectedActionTableItems(evnt);
- doBatchStep(stepId, stepOptions)¶
DOBATCHSTEP - execute a single step of the batch protocol.
- Syntax:
status = obj.doBatchStep(stepId, stepOptions)
Handles all built-in service steps (STOP EXECUTION, loop markers, Directory operations, File operations) directly, then delegates every other action to the MIB controller by calling eval() on the pre-built command string stored in obj.Protocol(stepId).Command. The current step is highlighted in the protocol listbox while it executes.
Returns false immediately if obj.stopProtocolSwitch is set to true (the user pressed the Stop button while the protocol was running).
- Input Arguments:
stepId - [numeric] 1-based index into obj.Protocol of the step to execute
stepOptions (optional) - [struct] loop context struct with fields:
.DirectoryName- directory from an enclosing Directory or File loop.FilenameFilter- bare filename (without path) supplied by a File loop.Filenames- full path(s) to the file supplied by a File loop.FileLoopWaitbar- [logical] when true suppress per-step waitbars.seriesId- integer BioFormats series index (from doSeriesLoop)
- Output Arguments:
status - [logical] true on success, false if the step failed or was aborted
Example 1 - execute a protocol step:
status = obj.doBatchStep(stepId);Example 2 - with loop context:
status = obj.doBatchStep(stepId, stepOptions);
- doFileLoop(startStep, finishStep, options)¶
DOFILELOOP - iterate over files matching a filter and execute a range of protocol steps for each file.
- Syntax:
status = obj.doFileLoop(startStep, finishStep, options)
Lists all non-directory entries in options.DirectoryName that match options.FilenameFilter, then runs protocol steps startStep..finishStep once per file, passing the file path through stepOptions so that steps such as ‘Load and combine images’ can pick up the correct filename. Aborts immediately and returns false if any step fails or the stop flag is set.
- Input Arguments:
startStep - [numeric] index of the first protocol step to execute inside the loop body
finishStep - [numeric] index of the last protocol step to execute inside the loop body
options - [struct] loop control struct with fields:
.DirectoryName- directory to scan; use'Current MIB path'to resolve at runtime.FilenameFilter- wildcard filter passed to dir() (e.g.,'*.tif').FileLoopWaitbar- [logical] when true show per-file waitbar and suppress per-step waitbars
- Output Arguments:
status - [logical] true on success, false if any step returned an error
Example - iterate over files matching a filter:
status = obj.doFileLoop(startStep, finishStep, FileloopSettings);
- doSeriesLoop(startStep, finishStep)¶
DOSERIESLOOP - iterate over all Bio-Formats series in a multi-series container and execute protocol steps for each.
- Syntax:
status = obj.doSeriesLoop(startStep, finishStep)
Opens the container defined by the ‘Load and combine images’ step at startStep using the Bio-Formats Memoizer reader, counts the available series, and then runs steps startStep..finishStep once per series. The current series index is passed to doBatchStep via stepOptions.seriesId. Requires the Bio-Formats MATLAB toolbox and Java to be available. Aborts immediately and returns false if any individual step fails.
- Input Arguments:
startStep - index of the ‘Load and combine images’ step (Series-by-series mode) that defines the container filename; also the first step executed for each series
finishStep - index of the last protocol step executed per series (inclusive)
- Output Arguments:
status - [logical] true on success, false if any step returned an error
- Usage:
Example 1:
status = obj.doSeriesLoop(startStep, finishStep);
- fileLoopAction_Callback(BatchOptInput)¶
FILELOOPACTION_CALLBACK - build or apply the BatchOpt structure for a File Loop protocol step.
- Syntax:
obj.fileLoopAction_Callback(BatchOptInput)
When called with no second argument (interactive mode) the function constructs a default BatchOpt and returns. When called with BatchOptInput == NaN it fires a SyncBatch event so that the Batch Processing controller populates its parameter table with the defaults. When called with a struct it merges supplied fields over the defaults via updateBatchOptCombineFields_Shared.
- The resulting BatchOpt specifies:
DirectoryName - source directory; choices include ‘Current MIB path’,
- ‘Inherit from Directory loop’, or an absolute path
FilenameFilter - wildcard applied inside the directory (default ‘.’)
FileLoopWaitbar - [logical] when true only the file-level waitbar is displayed; all per-step waitbars are suppressed
- Input Arguments:
BatchOptInput - [optional] - NaN - send default BatchOpt to BatchProcessing via SyncBatch event - struct - override defaults with supplied fields and apply
- Usage:
Example 1:
obj.fileLoopAction_Callback(NaN); // populate parameter tableExample 2:
obj.fileLoopAction_Callback(BatchOpt); // apply saved settings
- fileOperationsAction_Callback(BatchOptInput)¶
FILEOPERATIONSACTION_CALLBACK - build or apply the BatchOpt structure for a File Operations protocol step.
- Syntax:
obj.fileOperationsAction_Callback(BatchOptInput)
When called with no second argument (interactive mode) the function constructs a default BatchOpt and returns. When called with BatchOptInput == NaN it fires a SyncBatch event so the Batch Processing controller populates its parameter table. When called with a struct it merges supplied fields over the defaults via updateBatchOptCombineFields_Shared.
- Supported file operations (Operation field):
‘Copy’ - copy files matching FilenameMask from CurrentDirectory to TargetDirectory
‘Delete’ - delete files matching FilenameMask in CurrentDirectory
‘Move’ - move files matching FilenameMask from CurrentDirectory to TargetDirectory
Directory resolution is controlled independently for source and target via CurrentDirectoryMode / TargetDirectoryMode (Absolute, Relative to current MIB path, Inherit from Directory loop).
- Input Arguments:
BatchOptInput - [optional] - NaN - send default BatchOpt to BatchProcessing via SyncBatch event - struct - override defaults with supplied fields and apply
- Usage:
Example 1:
obj.fileOperationsAction_Callback(NaN); // populate parameter tableExample 2:
obj.fileOperationsAction_Callback(BatchOpt); // apply saved settings
- fitTableColumns()¶
FITTABLECOLUMNS - split selectedActionTable columns to fill the table container width.
- Syntax:
obj.fitTableColumns()
Called from the selectProtocolSectionPanel SizeChangedFcn so that columns always fill the available width after window resize, and from updateSelectedActionTable after new data is loaded. Column 1 (parameter names) gets ~38% of inner width; column 2 (values) takes remainder.
Example - resize table columns to fit container:
obj.fitTableColumns();
- helpBtn_Callback()¶
HELPBTN_CALLBACK - open the batch processing help page in the system browser.
- Syntax:
obj.helpBtn_Callback()- Usage:
Example 1:
obj.helpBtn_Callback();
- initialize()¶
INITIALIZE - build the obj.Sections catalogue of all available batch actions.
- Syntax:
obj.initialize()- Populates obj.Sections as a struct array where each element represents one section visible in the section dropdown:
Sections(id).Name - display name shown in selectProtocolSection
Sections(id).Actions(id2).Name - action name shown in selectProtocolAction
Sections(id).Actions(id2).Command - MATLAB expression evaluated by doBatchStep; the variable Batch is the BatchOpt struct
Called once from the constructor before the view is created so that the section popup can be populated immediately.
- Currently defined sections (14 total):
‘Menu Home’ - load/save, loops, directory/file ops
‘Menu Dataset’ - alignment, crop, resample, transform, etc.
‘Menu Image’ - intensity, colour, mode, morphology
‘Menu Models’ - model management
‘Menu Mask’ - mask management
‘Menu Selection’ - selection operations
‘Menu Plugins’ - plugins
‘Segmentation panel’ - segmentation tools
‘Semi-automatic segmentation’ - thresholding, watershed, region-growing
‘Menu Tools’ - rendering, stitch, drift correction, etc.
‘Annotations’ - annotation tools
‘Lines 3D’ - 3D skeleton tools
‘DeepMIB’ - deep learning
‘Service steps’ - STOP EXECUTION
- Usage:
Example 1:
obj.initialize();
- listenMIB_Callback()¶
LISTENMIB_CALLBACK - enable or disable the SyncBatch listener based on the listenMIB checkbox state.
- Syntax:
obj.listenMIB_Callback()- Usage:
Example 1:
obj.listenMIB_Callback();
- listener_Callbacks(src, evnt)¶
LISTENER_CALLBACKS - dispatch MibModel events to the appropriate GUI update methods.
- Syntax:
obj.listener_Callbacks(src, evnt)
Handles three model events: - UpdateGuiWidgets - refresh all GUI widgets via updateWidgets() - SyncBatch - populate the parameter table with the BatchOpt returned by the last action; auto-add to protocol when the autoAddToProtocol checkbox is checked - StopProtocol - set stopProtocolSwitch and reset the Run button
- Input Arguments:
src - source object that fired the event (unused, required by MATLAB)
evnt - event data; for SyncBatch, evnt.Parameter carries the BatchOpt struct
Example - register listeners for model events:
obj.listener{1} = addlistener(obj.mibModel, 'UpdateGuiWidgets', @(src,evnt) obj.listener_Callbacks(src, evnt));
- loadProtocol()¶
LOADPROTOCOL - load a protocol from a .mibProtocol file via a dialog.
- Syntax:
obj.loadProtocol()
Stores an undo snapshot before replacing the current protocol.
- Usage:
Example 1:
obj.loadProtocol();
- obtainDirectoryForAction(dirModeField, filenameField, stepId, stepOptions)¶
OBTAINDIRECTORYFORACTION - resolve and return an output directory for a single protocol step.
- Syntax:
dirOut = obj.obtainDirectoryForAction(dirModeField, filenameField, stepId, stepOptions)
Evaluates the directory-mode field of the step’s BatchOpt and returns the corresponding absolute path. If the directory does not yet exist it is created (except for the ‘Inherit from Directory loop’ modes). Returns an empty array on error so that the caller can abort cleanly.
- Supported directory modes (value of dirModeField):
‘Absolute’ - use the path stored in filenameField verbatim
‘Relative to current MIB path’- append filenameField to obj.mibModel.currentDirectory; leading “../” sequences navigate up the tree
‘Inherit from Directory loop’ - take stepOptions.DirectoryName from the enclosing directory loop
‘Inherit dirs +Dirname’ - concatenate stepOptions.DirectoryName with obj.Protocol(stepId).Batch.DirectoryName
- Input Arguments:
dirModeField - name of a BatchOpt field whose value selects the directory mode
filenameField - name of a BatchOpt field that holds the actual directory path string
stepId - index of the protocol step being executed
stepOptions - a struct passed down from the loop runner; may contain: - .DirectoryName - directory provided by an enclosing Directory loop
- Output Arguments:
dirOut - resolved absolute directory path, or [] on failure
- Usage:
Example 1:
dirOut = obj.obtainDirectoryForAction('Mode', 'DirectoryName', stepId, stepOptions);Example 2:
sourceDir = obj.obtainDirectoryForAction('CurrentDirectoryMode', 'CurrentDirectory', stepId, stepOptions);
- protocolActions_Callback(options)¶
PROTOCOLACTIONS_CALLBACK - add, remove, reorder or update steps in the protocol list.
- Syntax:
obj.protocolActions_Callback(options)- Input Arguments:
options - [char] operation specifier:
'add'- append current action as a new last step'duplicate'- duplicate the selected step (inserts copy after it)'insert'- insert current action before the selected step'insertstop'- insert a STOP EXECUTION step before the selected step'update'- overwrite the selected step with current action settings'show'- display settings of the selected step (read-only)'delete'- remove the selected step'moveup'- swap the selected step with the one above it'movedown'- swap the selected step with the one below it
Example 1 - add action to protocol:
obj.protocolActions_Callback('add');Example 2 - remove step from protocol:
obj.protocolActions_Callback('delete');Example 3 - reorder steps:
obj.protocolActions_Callback('moveup');
- protocolList_SelectionCallback()¶
PROTOCOLLIST_SELECTIONCALLBACK - handle row selection in the protocol listbox - loads parameters into the action table.
- Syntax:
obj.protocolList_SelectionCallback()
Reads the current listbox selection, updates obj.protocolListIndex, and populates selectedActionTable with the step’s BatchOpt fields.
- Usage:
Example 1:
obj.protocolList_SelectionCallback();
- runProtocol_Callback(parameter)¶
RUNPROTOCOL_CALLBACK - start or stop protocol execution in response to a toolbar button press.
- Syntax:
obj.runProtocol_Callback(parameter)
Orchestrates the top-level execution loop: walks obj.Protocol from the requested start step, dispatches Directory loop blocks to doDirectoryLoop logic inline, File loop blocks to doFileLoop, Bio-Formats series loops to doSeriesLoop, and all other steps to doBatchStep. Handles nested Directory-then-File loops and updates the Run button appearance (green / red) to reflect running state.
Pressing the Run button a second time while a protocol is executing sets obj.stopProtocolSwitch which causes doBatchStep to abort on the next step.
- Input Arguments:
parameter - [char] execution scope specifier:
'complete'- run all steps from the first to the last'from'- run from the currently selected step to the end'step'- execute only the currently selected step'stepadvance'- execute the currently selected step then advance the selection to the next step
Example 1 - run entire protocol:
obj.runProtocol_Callback('complete');Example 2 - resume from selected step:
obj.runProtocol_Callback('from');Example 3 - execute single step:
obj.runProtocol_Callback('step');Example 4 - step with auto-advance:
obj.runProtocol_Callback('stepadvance');
- saveProtocol()¶
SAVEPROTOCOL - save the current protocol to a .mibProtocol (MAT) or .xls file via a dialog.
- Syntax:
obj.saveProtocol()- Usage:
Example 1:
obj.saveProtocol();
- selectProtocolSection_Callback(hObject)¶
SELECTPROTOCOLSECTION_CALLBACK - handle value change in selectProtocolSection or selectProtocolAction.
- Syntax:
obj.selectProtocolSection_Callback(hObject)
Fires the selected action command with Batch=NaN to retrieve its default BatchOpt, then refreshes the selectedActionTable.
- Input Arguments:
hObject - handle to the dropdown widget that triggered the callback; Tag must be ‘selectProtocolSection’ or ‘selectProtocolAction’
- Usage:
Example 1:
obj.selectProtocolSection_Callback(obj.view.handles.selectProtocolSection);
- selectedActionTableItem_Update(hObject)¶
SELECTEDACTIONTABLEITEM_UPDATE - write an edited parameter value back to obj.CurrentBatch and the table cell.
- Syntax:
obj.selectedActionTableItem_Update(hObject)
Called by ValueChangedFcn of the four editing widgets: selectedActionTableCellEdit, selectedActionTableCellNumericEdit, selectedActionTableCellPopup, selectedActionTableCellCheck.
- Input Arguments:
hObject - handle to the widget that triggered the callback; Tag must be one of ‘selectedActionTableCellPopup’, ‘selectedActionTableCellCheck’, ‘selectedActionTableCellEdit’, or ‘selectedActionTableCellNumericEdit’
Example - update a parameter value:
obj.selectedActionTableItem_Update(obj.view.handles.selectedActionTableCellEdit);
- selectedActionTable_ContextCallback(parameter)¶
SELECTEDACTIONTABLE_CONTEXTCALLBACK - handle right-click context menu actions on the selected-action parameter table.
- Syntax:
obj.selectedActionTable_ContextCallback(parameter)
Each context menu item performs a structural edit on obj.CurrentBatch or on the table’s visual properties. The function returns early if no row is selected or if obj.CurrentBatch is empty.
- Supported operations (parameter):
‘add’ - prompt for a new numeric or logical parameter and append it to obj.CurrentBatch
‘delete’ - remove the currently highlighted parameter from obj.CurrentBatch
‘Add directories’ - open a multi-directory chooser and append the selected paths to the DirectoriesList of a DIRECTORY LOOP START step
‘Modify directory’ - open a single-directory chooser to replace the currently selected directory entry; works for DIRECTORY LOOP START, FILE LOOP START, Directory operations, File operations, and generic cell/char directory fields
‘Remove directories’- display a checklist and remove the ticked entries from the DirectoriesList of a DIRECTORY LOOP START step
‘Set second column width’ - prompt for a pixel width and apply it to the second column of selectedActionTable
- Input Arguments:
parameter - string matching one of the case labels listed above
- Usage:
Example 1:
obj.selectedActionTable_ContextCallback('add');Example 2:
obj.selectedActionTable_ContextCallback('Modify directory');Example 3:
obj.selectedActionTable_ContextCallback('Set second column width');
- updateProtocolList()¶
UPDATEPROTOCOLLIST - refresh the protocol listbox from obj.Protocol, preserving the current selection.
- Syntax:
obj.updateProtocolList()- Usage:
Example 1:
obj.updateProtocolList();
- updateSelectedActionTable(BatchOpt)¶
UPDATESELECTEDACTIONTABLE - populate selectedActionTable from a BatchOpt structure.
- Syntax:
obj.updateSelectedActionTable(BatchOpt)
Also updates obj.selectedSection, obj.selectedAction and obj.CurrentBatch.
- Input Arguments:
BatchOpt - [struct] action parameters. Field types that drive widget rendering in displaySelectedActionTableItems:
Logical scalar → checkbox
Cell {value; {list}} → dropdown
Cell {numeric; [limits]; rounding} → numeric text edit
Char string → text edit field
Plain numeric → numeric edit field
Required meta-fields (removed from table display):
.mibBatchSectionName- section name string.mibBatchActionName- action name string.mibBatchTooltip(optional) - struct with per-field tooltip strings
Example - populate parameter table from BatchOpt:
BatchOpt.colChannel = {1; {1,2,3}}; BatchOpt.showWaitbar = true; BatchOpt.mibBatchSectionName = 'Menu -> Image'; BatchOpt.mibBatchActionName = 'Invert image'; obj.updateSelectedActionTable(BatchOpt);
- updateWidgets()¶
UPDATEWIDGETS - refresh the section and action dropdowns to reflect current state.
- Syntax:
obj.updateWidgets()
Example - refresh all GUI widgets:
obj.updateWidgets();