MibStatusBar

class controllers.MibStatusBar

MIBSTATUSBAR - controller for methods of the Selection and View settings panel in MIB.

Constructor Summary
MibStatusBar(mainCtrl, view, guiHandles, model)

MIBSTATUSBAR - Initialize status bar controller.

Syntax:
obj = MibStatusBar(mainCtrl, view, guiHandles, model)
Input Arguments:
  • mainCtrl - [controllers.MibController] handle to main MIB controller

  • view - [views.MibView] handle to main MIB view

  • guiHandles - [struct] GUI component handles for the status bar

  • model - [models.MibModel] handle to MIB model

Output Arguments:
  • obj - [MibStatusBar] initialized status bar controller instance

Property Summary
gui

handle to the GUI of the ROI panel (views.components.Roi)

handles

struct of ROI panel handles (panel, listbox, buttons, …)

listeners

cell array of listeners

mibController

controllers.MibController

mibModel

models.MibModel

view

MibView (full app view)

Method Summary
gui_Callbacks(mode)

GUI_CALLBACKS - Central callback dispatcher for status bar widgets.

Syntax:
obj.gui_Callbacks()
obj.gui_Callbacks(mode)

Routes execution to the appropriate handler based on the widget tag (mode). When DeveloperMode is enabled, each call logs the triggered mode to console for debugging.

Input Arguments:
  • obj - [MibStatusBar] controller instance

  • mode (optional) - [char] widget tag triggering callback (default: '' no-op). Supported values:

    • 'selectWorkingDirectory' - open directory picker dialog, update mibModel.currentDirectory, refresh file list

    • 'currentDirectory' - validate and apply manually typed path; keep parent folder if filename detected; revert if invalid

    • 'copyPath' - copy current directory path to system clipboard

    • 'openBrowser' - open current directory in native file browser, in front of the MIB window; error dialog if the path is invalid:

      • Windows - Windows Explorer via winopen (ShellExecute). system('explorer.exe ...') is used only as a fallback: it opens the window behind MIB, because the clicked MIB window belongs to the MATLABWindow process and MATLAB.exe may not take the foreground

      • macOS - Finder (via open)

      • Linux - first available of xdg-open, nautilus, dolphin, nemo, caja, thunar, pcmanfm, started with LD_LIBRARY_PATH unset so MATLAB’s libraries do not break it; error dialog if none is installed

    • 'zoom' - reserved for zoom-related status bar actions

Example 1 - Open directory picker dialog:

obj.gui_Callbacks('selectWorkingDirectory');

Example 2 - Apply typed path from currentDirectory field:

obj.handles.currentDirectory.Value = 'C:\Data\experiment01';
obj.gui_Callbacks('currentDirectory');

Example 3 - Copy active directory path to clipboard:

obj.gui_Callbacks('copyPath');

Example 4 - Open active directory in OS file browser:

obj.gui_Callbacks('openBrowser');
listener_updateStatusBar(src, evtData)

LISTENER_UPDATESTATUSBAR - Update status bar widgets on directory change or UpdateStatusBar event.

Syntax:
obj.listener_updateStatusBar(src, evtData)

Listener triggered by MibModel 'UpdateStatusBar' event (e.g., during Batch Processing directory changes).

Input Arguments:
  • obj - [MibStatusBar] controller instance

  • src - [MibModel] source object

  • evtData - [ToggleEventData] event data with properties:

    • .Parameters - [struct] optional parameters structure

    • .Source - [MibModel] handle to MibModel

    • .EventName - [char] event name that triggered callback

updatePyramidInfoLabel()

UPDATEPYRAMIDINFOLABEL - Update infoLabel with pyramid level info for BigData/Virtual datasets.

Syntax:
obj.updatePyramidInfoLabel()

Called after every zoom change. Populates obj.handles.infoLabel with the currently rendered pyramid level index, total level count, and downsampling factor. Only shown for pyramidal datasets (BigData / tiled Virtual); cleared for standard in-memory images.

Output Arguments:

(none)

zoomEdit_Callback(recenterSwitch, BatchOptIn)

ZOOMEDIT_CALLBACK - Callback for zoom editbox control in status bar to change image magnification.

Syntax:
obj.zoomEdit_Callback()
obj.zoomEdit_Callback(recenterSwitch, BatchOptIn)

Handles magnification changes triggered by obj.view.handles.status.zoom UI control. Supports direct UI interaction and batch processing mode.

Input Arguments:
  • recenterSwitch (optional) - [logical] whether to recenter image after zoom (default: false)

  • BatchOptIn (optional) - [struct|NaN] batch processing options. When NaN, triggers 'SyncBatch' event and returns defaults:

    • .Mode - [cell] magnification mode:

      • 'Set magnification' - (default)

      • 'Fit to screen'

      • '100%'

      • 'Zoom in'

      • 'Zoom out'

    • .MagnificationValue - [char] target magnification in percent (used when Mode is 'Set magnification')

Example 1 - Set magnification to 50%:

BatchOpt.Mode = {'Set magnification'};
BatchOpt.MagnificationValue = '50';
obj.zoomEdit_Callback([], BatchOpt);

Example 2 - Fit image to screen:

BatchOpt.Mode = {'Fit to screen'};
obj.zoomEdit_Callback([], BatchOpt);

Example 3 - Query batch options (returns defaults via SyncBatch event):

obj.zoomEdit_Callback([], NaN);