MibQuickAccessBar¶
- class controllers.MibQuickAccessBar¶
MIBQUICKACCESSBAR - controller for methods of the Quick access bar in MIB.
- Constructor Summary
- MibQuickAccessBar(mainCtrl, view, guiHandles, model)¶
MIBQUICKACCESSBAR - Initialize Quick Access Bar controller.
- Syntax:
obj = MibQuickAccessBar(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 Quick Access Bar
model - [models.MibModel] handle to MIB model
- Output Arguments:
obj - [MibQuickAccessBar] initialized Quick Access Bar controller instance
- Property Summary
- handles¶
struct of QAB panel handles (panel, listbox, buttons, …)
- listeners¶
cell array of listeners
- mibController¶
controllers.MibController
- mibModel¶
models.MibModel
- view¶
MibView (full app view)
- Method Summary
- createCentralMarker(centerX, centerY, options)¶
CREATECENTRALMARKER - create a central marker on the image axes.
- Syntax:
obj.createCentralMarker(centerX, centerY) obj.createCentralMarker(centerX, centerY, options)
Creates a simple crosshair marker at the specified position on the currently selected image view. The marker is non-interactive and always displays on top of the image.
- Input Arguments:
centerX - [double] X coordinate for marker position (in image data units)
centerY - [double] Y coordinate for marker position (in image data units)
options (optional) - [struct] marker appearance settings with fields:
.Marker- [char] marker symbol (default:'+')'+'- crosshair'o'- circle'*'- asterisk'.'- point'x'- X mark'square'- square'diamond'- diamond
.MarkerSize- [double] marker size in points (default:12).Color- [char|RGB] marker color (default:'y'yellow).LineWidth- [double] marker line thickness (default:2)
Example 1 - Place default marker at axes center:
ax = obj.mibController.cImageDoc{obj.mibModel.Sets.selectedSet}.handles.imViewAxes; centerX = mean(ax.XLim); centerY = mean(ax.YLim); obj.createCentralMarker(centerX, centerY);Example 2 - Create custom red circle marker:
opts.Marker = 'o'; opts.Color = 'r'; opts.MarkerSize = 15; opts.LineWidth = 3; obj.createCentralMarker(100, 200, opts);Example 3 - Create cyan crosshair:
opts.Color = [0 1 1]; % RGB cyan obj.createCentralMarker(centerX, centerY, opts);
- gui_Callbacks(hWidget, hData)¶
GUI_CALLBACKS - callbacks for widgets of the quick access bar of MIB.
- Syntax:
obj.gui_Callbacks(hWidget, hData)- Input Arguments:
hWidget - handle to the pressed widget hWidget.tag char, identifier the widget, used when the same operation is called from menu ‘’ ->
hData - handle to supporting data class
- orientationChange(hWidget, moveMouseSw)¶
ORIENTATIONCHANGE - Callback for the orientation toggle buttons in the Quick Access Bar.
- Syntax:
obj.orientationChange(hWidget, moveMouseSw)
Switches the viewing plane of the current dataset to YX (XY), XZ, or YZ. Converted from MIB2 @mibController/mibToolbarPlaneToggle.m
- Input Arguments:
hWidget - [matlab.ui.control.Button|char] orientation button handle (
yx_orientation,xz_orientation, oryz_orientation) or target orientation description string (for keyboard-shortcut callers)moveMouseSw (optional) - [logical] move mouse cursor to orientation change pivot point (default:
false); used with Alt+1/2/3 keyboard shortcuts to keep cursor over image
Example 1 - Called from gui_Callbacks when orientation button pressed:
obj.orientationChange(hWidget);Example 2 - Called from gui_WindowKeyPressFcn with mouse centering (Alt+1):
obj.mibController.cActiveDataset.cQAB.orientationChange( ... obj.mibController.view.handles.qab.handles.yx_orientation, true);