MorphOps¶
- class controllers.MorphOps¶
Bases:
handleMORPHOPS - Controller for morphological operations on the selection layer.
Applies
bwmorph,bwmorph3,bwskel, andbwulterodeto the selection layer in 2D (slice or stack) or 3D mode.Launch as GUI tool:
obj.mibController.startController('controllers.MorphOps');Launch in batch mode:
BatchOpt.Objects3D = false; BatchOpt.MorphOperation = {'thin'}; BatchOpt.ApplyTo = {'Stack'}; BatchOpt.IterationsMode = {'Infinite'}; BatchOpt.showWaitbar = false; obj.mibController.startController('controllers.MorphOps', [], BatchOpt);Trigger return of possible options:
obj.mibController.startController('controllers.MorphOps', [], NaN);- Constructor Summary
- MorphOps(mibModel, varargin)¶
MORPHOPS - Constructor.
- Syntax:
obj = MorphOps(mibModel) obj = MorphOps(mibModel, [], BatchOpt)
- Property Summary
- BatchOpt¶
cell array of listener handles
- autoPreview¶
structure compatible with batch processing; field names match widget Tags
- listener¶
handle to main MIB figure (used as parent for dialogs)
- mibGUI¶
handle to the view (views.MorphOpsGUI)
- mibModel¶
- view¶
handle to MibModel
- Method Summary
- Calculate(batchModeSwitch)¶
CALCULATE - Apply morphological operations to the selection layer.
- Syntax:
obj.Calculate() obj.Calculate(batchModeSwitch)- Input Arguments:
batchModeSwitch - (optional) logical; when
trueskips backup andreturnBatchOptcall (defaultfalse)
- static ViewListner_Callback2(~, evnt)¶
VIEWLISTNER_CALLBACK2 - Static listener guard; safe even when view is invalid.
- addCallbacks()¶
ADDCALLBACKS - Wire all widget callbacks after view creation.
- applyMorphOp2D(selSlice)¶
APPLYMORPHOP2D - Apply current 2D morphological operation to a selection slice.
- applyUIRules()¶
APPLYUIRULES - Enforce all enable/visible rules from current BatchOpt state.
- autoPreviewChanged(event)¶
AUTOPREVIEWCHANGED - Handle autoPreview checkbox toggle.
- closeWindow()¶
CLOSEWINDOW - Save session settings, destroy view, fire CloseEvent.
- figureKeyPress(event)¶
FIGUREKEYPRESS - Forward key presses to MIB main window shortcuts.
- getInfoText()¶
GETINFOTEXT - Return description string for the currently selected operation.
- helpButton_Callback()¶
HELPBUTTON_CALLBACK - Open documentation in browser.
- iterationsModeChanged(event)¶
ITERATIONSMODECHANGED - Handle limitTo/infinite radio switch.
- modeSelectionChanged(event)¶
MODESELECTIONCHANGED - Handle Mode radio change; update bwulterode connectivity dimension.
- objects3DChanged(event)¶
OBJECTS3DCHANGED - Handle Objects3D checkbox; switch between 2D/3D morphological operations.
- operationChanged(event)¶
OPERATIONCHANGED - Handle MorphOperation dropdown change.
- previewButtonPushed()¶
PREVIEWBUTTONPUSHED - Apply 2D operation to current view block and display as overlay.
- returnBatchOpt(BatchOptOut)¶
RETURNBATCHOPT - Send BatchOpt to mibBatchController.
- triggerAutoPreview()¶
TRIGGERAUTPREVIEW - Fire preview if autoPreview is on and in 2D mode.
- updateBatchOptFromGUI(event)¶
UPDATEBATCHOPTFROMGUI - Sync BatchOpt from a widget change event.
- updateConnectivityList()¶
UPDATECONNECTIVITYLIST - Refresh Connectivity items to match BwulterodeMode.
- updateMorphOperationList()¶
UPDATEMORPHOPERATIONLIST - Refresh MorphOperation dropdown items to match Objects3D state.
- updateWidgets()¶
UPDATEWIDGETS - Refresh widgets to reflect current model state.