ContrastClahe

class controllers.ContrastClahe

Bases: handle

CONTRASTCLAHE - Controller for the Contrast-limited Adaptive Histogram Equalization dialog.

Launch as GUI tool:

obj.mibController.startController('controllers.ContrastClahe');

Launch in batch mode:

BatchOpt.DatasetType = {'Current stack (3D)'};
BatchOpt.NumTilesY   = {8, [1 256], 'on'};
obj.mibController.startController('controllers.ContrastClahe', [], BatchOpt);
Constructor Summary
ContrastClahe(mibModel, varargin)

CONTRASTCLAHE - Constructor.

Syntax:
obj = ContrastClahe(mibModel)
obj = ContrastClahe(mibModel, [], BatchOpt)
Property Summary
BatchOpt

cell array of listener handles

listener

handle to main MIB figure (used as parent for modal dialogs)

mibGUI

handle to the view (views.ContrastClaheGUI)

mibModel
view

handle to MibModel

Method Summary
static ViewListner_Callback2(~, evnt)

VIEWLISTNER_CALLBACK2 - Static listener guard; safe even when view is invalid.

addCallbacks()

ADDCALLBACKS - Wire all widget callbacks after view creation.

applyFilter(imgIn)

APPLYFILTER - Apply CLAHE to a supplied image (preview) or to the current dataset.

Syntax:
imgOut = obj.applyFilter(imgIn)   % preview mode: apply and return
obj.applyFilter()                 % full mode: read model, apply, write back
Input Arguments:
  • imgIn (optional) - [numeric] 2-D or H×W×C image to process in preview mode. When omitted the filter is applied to the full dataset region defined by BatchOpt.DatasetType.

Output Arguments:
  • imgOut - [numeric] filtered image (only populated in preview mode).

closeWindow()

CLOSEWINDOW - Save session settings, destroy view, fire CloseEvent.

distributionChanged(event)

DISTRIBUTIONCHANGED - Update BatchOpt and toggle Alpha enable state.

figureKeyPress(event)

FIGUREKEYPRESS - Forward key presses to MIB main window shortcuts.

helpButton_Callback()

HELPBUTTON_CALLBACK - Open documentation in browser.

previewButtonPushed()

PREVIEWBUTTONPUSHED - Apply CLAHE to current view and display as overlay.

returnBatchOpt(BatchOptOut)

RETURNBATCHOPT - Send BatchOpt to mibBatchController.

updateAlphaState()

UPDATEALPHASTATE - Enable AlphaSpinner only for non-uniform distributions.

updateBatchOptFromGUI(event)

UPDATEBATCHOPTFROMGUI - Sync BatchOpt from a widget change event.

updateWidgets()

UPDATEWIDGETS - Refresh widgets to reflect current model state.