MorphOpsImages¶
- class controllers.MorphOpsImages¶
Bases:
handleMORPHOPSIMAGES - Controller for morphological operations on the image layer.
Applies imbothat, imclearborder, imclose, imdilate, imerode, imfill, imhmax, imhmin, imopen, imtophat to the image layer in 2D (slice or stack), 3D, or 4D mode.
Launch as GUI tool:
obj.mibController.startController('controllers.MorphOpsImages'); obj.mibController.startController('controllers.MorphOpsImages', 'Dilate image');Launch in batch mode:
BatchOpt.MorphOperation = {'Dilate image'}; BatchOpt.DatasetType = {'3D, Stack'}; obj.mibController.startController('controllers.MorphOpsImages', [], BatchOpt);Trigger return of default options:
obj.mibController.startController('controllers.MorphOpsImages', [], NaN);- Constructor Summary
- MorphOpsImages(mibModel, varargin)¶
MORPHOPSIMAGES - Constructor.
- Syntax:
obj = MorphOpsImages(mibModel) obj = MorphOpsImages(mibModel, initialOperation) obj = MorphOpsImages(mibModel, [], BatchOpt)
- Property Summary
- BatchOpt¶
cell array of listener handles
- listener¶
handle to main MIB figure (used as parent for dialogs)
- mibGUI¶
handle to the view (views.MorphOpsImagesGUI)
- mibModel¶
- view¶
handle to MibModel
- Method Summary
- Calculate(batchModeSwitch)¶
CALCULATE - Apply morphological operations to the image 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.
- applyOperation2D(imageSlice)¶
APPLYOPERATION2D - Apply current 2D operation to a single image slice.
Input/output are plain matrices (not cells); multi-channel supported.
- applyUIRules()¶
APPLYUIRULES - Enforce all widget enable/visible rules from current BatchOpt state.
- autoPreviewChanged(event)¶
AUTOPREVIEWCHANGED - Handle autoPreview checkbox; fire preview if just checked.
- closeWindow()¶
CLOSEWINDOW - Destroy view, listeners, fire CloseEvent.
- datasetTypeChanged(event)¶
DATASETTYPECHANGED - Handle DatasetType change; force Mode=2D for slice-only scope.
- figureKeyPress(event)¶
FIGUREKEYPRESS - Forward key presses to MIB main window shortcuts.
- getInfoText()¶
GETINFOTEXT - Return description for the currently selected operation.
- getStrelElement()¶
GETSTRELELEMENT - Build strel element from current BatchOpt settings.
- helpButton_Callback()¶
HELPBUTTON_CALLBACK - Open documentation in browser.
- loadPreviewImage()¶
LOADPREVIEWIMAGE - Load operation illustration from Resources folder.
- modeChanged(event)¶
MODECHANGED - Handle Mode dropdown change.
- morphOperationChanged(event)¶
MORPHOPERATIONCHANGED - Handle MorphOperation dropdown change.
- previewButtonPushed()¶
PREVIEWBUTTONPUSHED - Apply 2D operation to current view block and display.
- returnBatchOpt(BatchOptOut)¶
RETURNBATCHOPT - Send BatchOpt to mibBatchController.
- smoothHSizeChanged(event)¶
SMOOTHHSIZECHANGED - Handle SmoothHSize change; auto-set SmoothSigma = size/5.
- strelOrMultiplyChanged(event)¶
STRELORCHANGED - Handle StrelSize text edit change.
- triggerAutoPreview()¶
TRIGGERAUTPREVIEW - Fire preview when autoPreview is on and Mode is 2D.
- updateBatchOptFromGUI(event)¶
UPDATEBATCHOPTFROMGUI - Sync BatchOpt from a widget change event.
- updateConnectivityList()¶
UPDATECONNECTIVITYLIST - Refresh Connectivity dropdown items to match Mode.
- updateWidgets()¶
UPDATEWIDGETS - Refresh widgets to reflect current model state.