Microscopy Image Browser 2.91
MIB
Loading...
Searching...
No Matches
mibGraphcutController Class Reference

class is responsible for showing the graphcut segmentation window, available from MIB->Menu->Tools->Graphcut segmentation More...

Inheritance diagram for mibGraphcutController:
Collaboration diagram for mibGraphcutController:

Public Member Functions

 mibGraphcutController (mibModel)
 
function  closeWindow ()
 closing mibGraphcutController window
 
function  updateWidgets ()
 update all widgets of the current window
 
function  updateMaterialsBtn_Callback ()
 callback for the update Materials button
 
function status = clearPreprocessBtn_Callback ()
 callback for press of clearPreprocessBtn; clear the preprocessed data
 
function  mode2dRadio_Callback (hObject)
 callback for selection of the segmentation mode
 
function  checkDimensions (hObject)
 check entered dimensions for the dataset to process
 
function  resetDimsBtn_Callback ()
 callback for resetDimsBtn - reset edit boxes with dataset dimensions
 
function  currentViewBtn_Callback ()
 callback for press of currentViewBtn; defines dataset from the current view
 
function  subAreaFromSelectionBtn_Callback ()
 callback for press of subAreaFromSelectionBtn; select subArea from the current selection layer
 
function  binSubareaEdit_Callback (hObject)
 callback for selection of subarea for segmentation
 
function  doGraphcutSegmentation ()
 make graphcut segmentation
 
function  superpixelsBtn_Callback (usePrecomputedSlic)
 callback for press of superpixelsBtn - calculate superpixels
 
function  exportSuperpixelsBtn_Callback ()
 callback for press of exportSuperpixelsBtn; export/save supervoxels
 
function  importSuperpixelsBtn_Callback (noImportSwitch)
 callback for press of importSuperpixelsBtn; import superpixel structure
 
function  superpixelsPreviewBtn_Callback ()
 callback for press of superpixelsPreviewBtn; preview superpixels in MIB
 
function  superpixTypePopup_Callback (parameter)
 callback for change of superpixTypePopup
 
function  recalcGraph_Callback (showWaitbar)
 callback for press of recalcGraph; recalculate energy barriers for the graphcut structure
 
function  pixelIdxListCheck_Callback ()
 calculate pixelIdxList for the superpixels this may improve performance of the segmentation process, but requires more memory
 
function  segmentBtn_Callback ()
 callback for press segmentBtn; start segmentation
 
function  segmentAllBtn_Callback ()
 callback for press segmentAllBtn; start segmentation for the complete dataset in the grid mode
 

Static Public Member Functions

static function  ViewListner_Callback2 (obj, src, evnt)
 
static function Graphcut = mibGraphcut_CalcSupervoxels (Graphcut, img, parLoopOptions, usePrecomputedSlic)
 generate 3D supervoxels and the graphcut structure
 

Public Attributes

 mibModel
 handles to the model
 
 View
 handle to the view
 
 listener
 a cell array with handles to listeners
 
 graphcut
 a structure array with the graphcut data
 
 mode
 a string with mode to use:
 
 realtimeSwitch
 enable real time segmentation
 
 slic_size
 size of slic superpixels
 
 shownLabelObj
 cell array with indices of currently displayed superpixels for the objects
 
 seedObj
 a cell array with the object seeds for each slice for 3D graphcut
 
 seedBg
 a cell array with the background seeds for each slice for 3D graphcut
 
 timerElapsed
 a variable to keep the elapsed time, when the elapsed time shorter than the timerElapsedMax the waitbar is not shown
 
 timerElapsedMax
 when the segmentation is longer that this number, the waitbar is displayed
 
 watershed_size
 size of watershed superpixels
 
EVENT closeEvent
 > Description of events event firing when window is closed
 
- Public Attributes inherited from handle
 addlistener
 Creates a listener for the specified event and assigns a callback function to execute when the event occurs.
 
 notify
 Broadcast a notice that a specific event is occurring on a specified handle object or array of handle objects.
 
 delete
 Handle object destructor method that is called when the object's lifecycle ends.
 
 disp
 Handle object disp method which is called by the display method. See the MATLAB disp function.
 
 display
 Handle object display method called when MATLAB software interprets an expression returning a handle object that is not terminated by a semicolon. See the MATLAB display function.
 
 findobj
 Finds objects matching the specified conditions from the input array of handle objects.
 
 findprop
 Returns a meta.property objects associated with the specified property name.
 
 fields
 Returns a cell array of string containing the names of public properties.
 
 fieldnames
 Returns a cell array of string containing the names of public properties. See the MATLAB fieldnames function.
 
 isvalid
 Returns a logical array in which elements are true if the corresponding elements in the input array are valid handles. This method is Sealed so you cannot override it in a handle subclass.
 
 eq
 Relational functions example. See details for more information.
 
 transpose
 Transposes the elements of the handle object array.
 
 permute
 Rearranges the dimensions of the handle object array. See the MATLAB permute function.
 
 reshape
 hanges the dimensions of the handle object array to the specified dimensions. See the MATLAB reshape function.
 
 sort
 ort the handle objects in any array in ascending or descending order.
 

Detailed Description

class is responsible for showing the graphcut segmentation window, available from MIB->Menu->Tools->Graphcut segmentation

Constructor & Destructor Documentation

◆ mibGraphcutController()

mibGraphcutController.mibGraphcutController ( mibModel)

References handle.addlistener, mibModel, mibRescaleWidgets(), and mibUpdateFontSize().

Referenced by superpixelsBtn_Callback().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ binSubareaEdit_Callback()

function mibGraphcutController.binSubareaEdit_Callback ( hObject)

callback for selection of subarea for segmentation

Parameters
hObjecthandle to the object
Required fields of hObject:

References min.

◆ checkDimensions()

function mibGraphcutController.checkDimensions ( hObject)

check entered dimensions for the dataset to process

Parameters
hObjecthandle on the selected object
Required fields of hObject:

References max, and min.

◆ clearPreprocessBtn_Callback()

function status = mibGraphcutController.clearPreprocessBtn_Callback ( )

callback for press of clearPreprocessBtn; clear the preprocessed data

References max, and min.

◆ closeWindow()

function mibGraphcutController.closeWindow ( )

closing mibGraphcutController window

References handle.isvalid, and handle.notify.

◆ currentViewBtn_Callback()

function mibGraphcutController.currentViewBtn_Callback ( )

callback for press of currentViewBtn; defines dataset from the current view

◆ doGraphcutSegmentation()

function mibGraphcutController.doGraphcutSegmentation ( )

make graphcut segmentation

References max, maxflow_v222(), mibResize3d(), min, handle.notify, and uint32.

Here is the call graph for this function:

◆ exportSuperpixelsBtn_Callback()

function mibGraphcutController.exportSuperpixelsBtn_Callback ( )

callback for press of exportSuperpixelsBtn; export/save supervoxels

References max, mibInputDlg(), mibInputMultiDlg(), min, mode, handle.notify, and handle.reshape.

Here is the call graph for this function:

◆ importSuperpixelsBtn_Callback()

function mibGraphcutController.importSuperpixelsBtn_Callback ( noImportSwitch)

callback for press of importSuperpixelsBtn; import superpixel structure

Parameters
noImportSwitch[optional] if 1, do not import the graphcut, but just update widgets (used in the updateWidgets function)

References mib_uigetfile(), mibInputMultiDlg(), mibLoadImages(), and handle.reshape.

Here is the call graph for this function:

◆ mibGraphcut_CalcSupervoxels()

static function Graphcut = mibGraphcutController.mibGraphcut_CalcSupervoxels ( Graphcut,
img,
parLoopOptions,
usePrecomputedSlic )
static

generate 3D supervoxels and the graphcut structure

Parameters
usePrecomputedSlicuse precomputed supervoxels placed in Graphcut.slic
Required fields of parLoopOptions:
Required fields of Graphcut:
Generated fields of Graphcut:

References imRAG(), imRichRAG(), max, mibResize3d(), min, handle.sort, and uint32.

Here is the call graph for this function:

◆ mode2dRadio_Callback()

function mibGraphcutController.mode2dRadio_Callback ( hObject)

callback for selection of the segmentation mode

Parameters
hObjecta handle to the selected radio button
  • mode2dCurrentRadio
  • mode2dRadio
  • mode3dRadio
  • mode3dGridRadio
Required fields of hObject:

◆ pixelIdxListCheck_Callback()

function mibGraphcutController.pixelIdxListCheck_Callback ( )

calculate pixelIdxList for the superpixels this may improve performance of the segmentation process, but requires more memory

◆ recalcGraph_Callback()

function mibGraphcutController.recalcGraph_Callback ( showWaitbar)

callback for press of recalcGraph; recalculate energy barriers for the graphcut structure

References max, and min.

◆ resetDimsBtn_Callback()

function mibGraphcutController.resetDimsBtn_Callback ( )

callback for resetDimsBtn - reset edit boxes with dataset dimensions

◆ segmentAllBtn_Callback()

function mibGraphcutController.segmentAllBtn_Callback ( )

callback for press segmentAllBtn; start segmentation for the complete dataset in the grid mode

References handle.notify.

◆ segmentBtn_Callback()

function mibGraphcutController.segmentBtn_Callback ( )

callback for press segmentBtn; start segmentation

References handle.notify.

◆ subAreaFromSelectionBtn_Callback()

function mibGraphcutController.subAreaFromSelectionBtn_Callback ( )

callback for press of subAreaFromSelectionBtn; select subArea from the current selection layer

◆ superpixelsBtn_Callback()

function mibGraphcutController.superpixelsBtn_Callback ( usePrecomputedSlic)

callback for press of superpixelsBtn - calculate superpixels

Parameters
usePrecomputedSlic[logical, optional] - switch to use precalculated supervolxels, that are preloaded to obj.graphcut.slic; used from the Import button, default value == 0

References handle.fieldnames, imRAG(), imRichRAG(), max, mibGraphcutController(), and uint32.

Here is the call graph for this function:

◆ superpixelsPreviewBtn_Callback()

function mibGraphcutController.superpixelsPreviewBtn_Callback ( )

callback for press of superpixelsPreviewBtn; preview superpixels in MIB

References max, mibResize3d(), min, and handle.notify.

Here is the call graph for this function:

◆ superpixTypePopup_Callback()

function mibGraphcutController.superpixTypePopup_Callback ( parameter)

callback for change of superpixTypePopup

Parameters
parameter[optional string], 'clear' or 'keep', when keep, the superpixels are not recalculated

◆ updateMaterialsBtn_Callback()

function mibGraphcutController.updateMaterialsBtn_Callback ( )

callback for the update Materials button

◆ updateWidgets()

function mibGraphcutController.updateWidgets ( )

update all widgets of the current window

◆ ViewListner_Callback2()

static function mibGraphcutController.ViewListner_Callback2 ( obj,
src,
evnt )
static

References handle.notify.

Member Data Documentation

◆ closeEvent

EVENT mibGraphcutController.closeEvent

> Description of events event firing when window is closed

Events
closeEvent

◆ graphcut

mibGraphcutController.graphcut

a structure array with the graphcut data

◆ listener

mibGraphcutController.listener

a cell array with handles to listeners

◆ mibModel

mibGraphcutController.mibModel

handles to the model

Referenced by mibGraphcutController().

◆ mode

mibGraphcutController.mode

a string with mode to use:

  • mode2dCurrentRadio
  • mode2dRadio
  • mode3dRadio
  • mode3dGridRadio

Referenced by exportSuperpixelsBtn_Callback().

◆ realtimeSwitch

mibGraphcutController.realtimeSwitch

enable real time segmentation

◆ seedBg

mibGraphcutController.seedBg

a cell array with the background seeds for each slice for 3D graphcut

◆ seedObj

mibGraphcutController.seedObj

a cell array with the object seeds for each slice for 3D graphcut

◆ shownLabelObj

mibGraphcutController.shownLabelObj

cell array with indices of currently displayed superpixels for the objects

◆ slic_size

mibGraphcutController.slic_size

size of slic superpixels

◆ timerElapsed

mibGraphcutController.timerElapsed

a variable to keep the elapsed time, when the elapsed time shorter than the timerElapsedMax the waitbar is not shown

◆ timerElapsedMax

mibGraphcutController.timerElapsedMax

when the segmentation is longer that this number, the waitbar is displayed

◆ View

mibGraphcutController.View

handle to the view

◆ watershed_size

mibGraphcutController.watershed_size

size of watershed superpixels


The documentation for this class was generated from the following files: