ImageFilters¶
- class controllers.ImageFilters¶
Bases:
handleIMAGEFILTERS - Controller for the Image Filters dialog.
Launch as GUI tool:
obj.mibController.startController('controllers.ImageFilters');Launch with a pre-selected filter:
obj.mibController.startController('controllers.ImageFilters', 'Gaussian');Launch in batch mode:
BatchOpt.FilterName = {'Gaussian'}; obj.mibController.startController('controllers.ImageFilters', [], BatchOpt);- Constructor Summary
- ImageFilters(mibModel, varargin)¶
IMAGEFILTERS - Constructor.
- Syntax:
obj = ImageFilters(mibModel) obj = ImageFilters(mibModel, DesiredFilterName) obj = ImageFilters(mibModel, [], BatchOpt)
- Property Summary
- BasicFiltersList¶
cell array of listener handles
- BatchOpt¶
cell array of dynamically created filter-parameter widget handles
- BinarizationFiltersList¶
cell array with available contrast adjustment filters
- ContrastFiltersList¶
cell array with available edge-preserving filters
- EdgePreservingFiltersList¶
cell array with available basic filters
- Filters3D¶
structure with parameters for each filter (local copy of sessionSettings.ImageFilters)
- ParaHandles¶
list of filter names that support 3D mode
- imageFiltersParams¶
cell array with available binarization filters
- infoHtmlTempFile¶
structure compatible with batch processing; field names match widget Tags
- listener¶
handle to main MIB figure (used as parent for modal dialogs)
- mibGUI¶
handle to the view (views.ImageFiltersGUI)
- mibModel¶
- view¶
handle to MibModel
- Method Summary
- Filter(img, batchModeSwitch)¶
FILTER - Apply the currently selected image filter to the dataset or a supplied image.
- Syntax:
obj.Filter() % reads data from model, applies filter, writes back img = obj.Filter(img) % applies filter to supplied image (used by preview/thumbnail)- Input Arguments:
img - (optional) image to filter; when empty the filter reads/writes via MibModel
batchModeSwitch - (optional)
1in batch mode (skips reading parameters from GUI)
- FilterGroupValueChanged(event)¶
FILTERGROUPVALUECHANGED - Update FilterName list when FilterGroup changes.
- FilterNameValueChanged(event)¶
FILTERNAMEVALUECHANGED - Rebuild parameter widgets when FilterName changes.
- Mode3DValueChanged()¶
MODE3DVALUECHANGED - Toggle 3D mode; force DatasetType to >=3D Stack.
- PreviewButtonPushed()¶
PREVIEWBUTTONPUSHED - Apply filter to current view and display as overlay.
- static ViewListner_Callback2(~, evnt)¶
VIEWLISTNER_CALLBACK2 - Static listener guard; safe even when view is invalid.
- addCallbacks()¶
ADDCALLBACKS - Wire all widget callbacks after view creation.
- closeWindow()¶
CLOSEWINDOW - Save session settings, destroy view, fire CloseEvent.
- figureKeyPress(event)¶
FIGUREKEYPRESS - Forward key presses to MIB main window shortcuts.
- helpButton_Callback()¶
HELPBUTTON_CALLBACK - Open documentation in browser.
- infoHtmlDataChanged(event)¶
INFOHTMLDATACHANGED - Handle events sent from the InfoHTML uihtml component. In R2026a+ direct <a href> navigation is sandboxed; links are intercepted by JavaScript and forwarded here via sendEventToMATLAB(eventName, data). MATLAB receives them in HTMLEventReceivedFcn: event.HTMLEventData.url
- renderThumbnailPreview()¶
RENDERTHUMBNAILPREVIEW - Apply filter to the test image and show in ThumbnailView2.
- returnBatchOpt(BatchOptOut)¶
RETURNBATCHOPT - Send BatchOpt (with filter params) to mibBatchController.
- scrollWheel_Callback(event)¶
SCROLLWHEEL_CALLBACK - Adjust spinner / editfield value with mouse wheel.
- setInfoHtml(infoText)¶
SETINFOHTML - Write info HTML to a unique temp file and load it into InfoHTML. Inline HTMLSource strings block <script> in R2026a (CSP); a file path allows scripts. tempname() gives a unique path each call so uihtml always detects a change and reloads (same path = no reload). uihtml is a web page with a white background and black text regardless of the MATLAB theme: in the dark theme give it the colors of the window. A theme switch calls this function again (ThemeChangedFcn in the constructor)
- updateBatchOptFromGUI(event)¶
UPDATEBATCHOPTFROMGUI - Sync BatchOpt from a widget change event.
- updateImageFiltersParameters(hWidget, ~)¶
UPDATEIMAGEFILTERSPARAMETERS - Sync ImageFilters struct when a parameter widget changes.
- updateSessionSettings()¶
UPDATESESSIONSETTINGS - Populate default session settings for all image filters.
- Syntax:
obj.updateSessionSettings()
Builds
obj.mibModel.sessionSettings.ImageFilters- a struct with one sub-struct per filter name. Each sub-struct holds:default parameter values (scalars, cell arrays, strings)
mibBatchTooltipsub-struct with tooltip/help strings for batch UI
Called once from the constructor when
sessionSettings.ImageFiltersdoes not yet exist. Also callable manually to reset all filter defaults.- Input Arguments:
obj -
controllers.ImageFiltersinstance
- Output Arguments:
(none) - results written to
obj.mibModel.sessionSettings.ImageFilters
- updateWidgets()¶
UPDATEWIDGETS - Refresh widgets to reflect current model state.