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

This a template class for making GUI windows for MIB it is the second version that was designed to be compatible with future macro editor. More...

Inheritance diagram for mibBatchController:
Collaboration diagram for mibBatchController:

Public Member Functions

function  updateWidgets ()
 update widgets of mibBatchController class
 
 mibBatchController (mibModel, varargin)
 
function  closeWindow ()
 closing mibBatchController window
 
function  helpBtn_Callback ()
 show help page
 
function  selectAction_Callback (hObject)
 ---------------------------------------------------------------— % Additional functions and callbacks callback for change of the selected actions in popups: sectionPopup and actionPopup defined by hObject
 
function  updateSelectedActionTable (BatchOpt)
 update selected action table using the BatchOpt structure Parameters: BatchOpt: a structure with parameters .Checkbox - logical, true/false, will be displayed as a checkbox .Popupmenu - a cell array with 2 items for popupmenus. .Popupmenu(1) - {Container 1}, selected item .Popupmenu(2) - [{Container 1},{Container 2},{Container 3'}] .Editbox - a string for edit box
 
function  displaySelectedActionTableItems ()
 display current options for the highlighted row in the selectedActionTable
 
function  selectedActionTableItem_Update (hObject)
 update selected action in selectedActionTable
 
function  selectedActionTable_ContextCallback (parameter)
 callback for context menu over selectedActionTable
 
function  deleteProtocol ()
 delete current protocol
 
function  saveProtocol ()
 save protocol to a file
 
function  loadProtocol ()
 load protocol from a file
 
function  protocolActions_Callback (options)
 options to modify protocol options: a string with action to perform to the protocol add - add selected action to the protocol duplicate - duplicate selected action insert - insert selected action to the protocol insertstop - insert a stop action update - update selected action of the protocol show - display settings for the selected action delete - delete selected action from the protocol
 
function  protocolList_SelectionCallback ()
 callback for selection of a row in protocolList
 
function  updateProtocolList ()
 update protocol list
 
function  BackupProtocol ()
 backup the current protocol if isempty(obj.Protocol); return; end
 
function  BackupProtocolRestore (mode)
 restore protocol from the backup Parameters: mode: a string undo - to make an undo redo - to make a redo
 
function  runProtocolBtn_Callback (parameter)
 run the protocol
 
function status = doSeriesLoop (startStep, finishStep)
 do open each series in dataset-container one-by-one and process until end of File loop or end of the protocol Only for Bio-formats!
 
function status = doFileLoop (startStep, finishStep, options)
 do the file loop action
 
function status = doBatchStep (stepId, stepOptions)
 do a single step of the protocol
 
function  DirectoryLoopAction_Callback (BatchOptInput)
 callback for selection of Directory Loop action
 
function  FileOperationsAction_Callback (BatchOptInput)
 do various operations with files
 
function  DirectoryOperationsAction_Callback (BatchOptInput)
 Directory operations of MIB.
 
function  FileLoopAction_Callback (BatchOptInput)
 callback for selection of File Loop action
 
function  gui_WinMouseMotionFcn ()
 get mouse coordinates for the window to change cursor shape when above separatingPanel to rescaling the panels
 
function  gui_WindowButtonDownFcn ()
 callback for mouse press over the figure, to start rescaling of panels
 
function  panelShiftBtnUpFcn ()
 get values to change size of the panels
 
function  sizeChangedFcn ()
 main resizing function for the window
 
function  listenMIB_Callback ()
 modify listener to actions from MIB
 

Static Public Member Functions

static function  ViewListner_Callback2 (obj, src, evnt)
 

Public Attributes

 mibController
 handle to mibController
 
 mibModel
 handles to the model
 
 View
 handle to the view
 
 listener
 a cell array with handles to listeners
 
 CurrentBatch
 a structure with selected Batch options, returned by returnBatchOpt function of the controller
 
 jSelectedActionTable
 a handle to java class for the selectedActionTable
 
 jSelectedActionTableScroll
 a handle to java class for the selectedActionTable scroll
 
 Protocol
 a structure with picked actions that should be executed
 
 ProtocolBackups
 a cell array with backuped protocols
 
 ProtocolBackupsCurrNumber
 current number of the protocol history
 
 ProtocolBackupsMaxNumber
 maximal number of protocol history for backup
 
 Sections
 a strutcure with available Sections and corresponding actions Sections(id).Name -> name of available section (i.e. Menu -> File, Menu -> Dataset) Sections(id).Actions(id2).Name -> name of an action available for the selected section (i.e. Tools for Images -> Image Arithmetics, Semi-automatic segmentation --> Global thresholding) Sections(id).Actions(id2).Parameters -> a structure with parameters for the action
 
 selectedActionTableIndex
 index of a row selected in the selectedActionTable
 
 protocolListIndex
 index of a row selected in the protocolList
 
 selectedSection
 index of the selected section, i.e. id for obj.Sections(id) updated by obj.View.handles.sectionPopup
 
 selectedAction
 index of the selected action for the currect section, i.e. id2 for Sections(id).Actions(id2) updated by obj.View.handles.actionPopup
 
 stopProtocolSwitch
 stop protocol property
 
EVENT closeEvent
 > Description of events event firing when window is closed
 
EVENT stopProtocol
 stop batch
 
- 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

This a template class for making GUI windows for MIB it is the second version that was designed to be compatible with future macro editor.

obj.startController('mibBatchController'); // as GUI tool

Constructor & Destructor Documentation

◆ mibBatchController()

mibBatchController.mibBatchController ( mibModel,
varargin )

References handle.addlistener, findjobj(), mibModel, mibRescaleWidgets(), mibUpdateFontSize(), moveWindowOutside(), and handle.sort.

Here is the call graph for this function:

Member Function Documentation

◆ BackupProtocol()

function mibBatchController.BackupProtocol ( )

backup the current protocol if isempty(obj.Protocol); return; end

◆ BackupProtocolRestore()

function mibBatchController.BackupProtocolRestore ( mode)

restore protocol from the backup Parameters: mode: a string undo - to make an undo redo - to make a redo

References min.

◆ closeWindow()

function mibBatchController.closeWindow ( )

closing mibBatchController window

References handle.isvalid, and handle.notify.

◆ deleteProtocol()

function mibBatchController.deleteProtocol ( )

delete current protocol

◆ DirectoryLoopAction_Callback()

function mibBatchController.DirectoryLoopAction_Callback ( BatchOptInput)

callback for selection of Directory Loop action

References handle.notify, and updateBatchOptCombineFields_Shared().

Here is the call graph for this function:

◆ DirectoryOperationsAction_Callback()

function mibBatchController.DirectoryOperationsAction_Callback ( BatchOptInput)

Directory operations of MIB.

References handle.notify, and updateBatchOptCombineFields_Shared().

Here is the call graph for this function:

◆ displaySelectedActionTableItems()

function mibBatchController.displaySelectedActionTableItems ( )

display current options for the highlighted row in the selectedActionTable

References handle.fieldnames.

◆ doBatchStep()

function status = mibBatchController.doBatchStep ( stepId,
stepOptions )

do a single step of the protocol

Parameters
stepIdindex of a step to be done
stepOptionsan optional structure with parameters
  • .DirectoryName -> directory name provided by the File or Directory loop
  • .FilenameFilter -> FilenameFilter == filename provided by the File loop
  • .Filenames -> full path to the filename
  • .FileLoopWaitbar -> when true show waitbar for the file loop only, all waitbars for subfunctions will be disabled
Return values
status[logical], success or fail of the function
Required fields of stepOptions:

References handle.notify.

◆ doFileLoop()

function status = mibBatchController.doFileLoop ( startStep,
finishStep,
options )

do the file loop action

Parameters
startStepis index of the first action inside the file loop
finishStepis index of the last action of the file loop
optionsa structure with parameters
  • .DirectoryName - name of the file loop directory
  • .FilenameFilter - filter for filenames
  • .FileLoopWaitbar - when true show waitbar for the file loop only, all waitbars for subfunctions will be disabled
Return values
status[logical], success or fail of the function
Required fields of options:

◆ doSeriesLoop()

function status = mibBatchController.doSeriesLoop ( startStep,
finishStep )

do open each series in dataset-container one-by-one and process until end of File loop or end of the protocol Only for Bio-formats!

Parameters
startStepis index of the first action inside the file loop
finishStepis index of the last action of the file loop
Return values
status[logical], success or fail of the function

◆ FileLoopAction_Callback()

function mibBatchController.FileLoopAction_Callback ( BatchOptInput)

callback for selection of File Loop action

References handle.notify, and updateBatchOptCombineFields_Shared().

Here is the call graph for this function:

◆ FileOperationsAction_Callback()

function mibBatchController.FileOperationsAction_Callback ( BatchOptInput)

do various operations with files

References handle.notify, and updateBatchOptCombineFields_Shared().

Here is the call graph for this function:

◆ gui_WindowButtonDownFcn()

function mibBatchController.gui_WindowButtonDownFcn ( )

callback for mouse press over the figure, to start rescaling of panels

◆ gui_WinMouseMotionFcn()

function mibBatchController.gui_WinMouseMotionFcn ( )

get mouse coordinates for the window to change cursor shape when above separatingPanel to rescaling the panels

◆ helpBtn_Callback()

function mibBatchController.helpBtn_Callback ( )

show help page

◆ listenMIB_Callback()

function mibBatchController.listenMIB_Callback ( )

modify listener to actions from MIB

◆ loadProtocol()

function mibBatchController.loadProtocol ( )

load protocol from a file

References mib_uigetfile().

Here is the call graph for this function:

◆ panelShiftBtnUpFcn()

function mibBatchController.panelShiftBtnUpFcn ( )

get values to change size of the panels

◆ protocolActions_Callback()

function mibBatchController.protocolActions_Callback ( options)

options to modify protocol options: a string with action to perform to the protocol add - add selected action to the protocol duplicate - duplicate selected action insert - insert selected action to the protocol insertstop - insert a stop action update - update selected action of the protocol show - display settings for the selected action delete - delete selected action from the protocol

References max.

◆ protocolList_SelectionCallback()

function mibBatchController.protocolList_SelectionCallback ( )

callback for selection of a row in protocolList

◆ runProtocolBtn_Callback()

function mibBatchController.runProtocolBtn_Callback ( parameter)

run the protocol

Parameters
parametera string with details complete - run all steps of the protocol from - run the protocol from the selected step step - run the selected step only stepadvance - run the selected step and advance to next

References min, and handle.notify.

◆ saveProtocol()

function mibBatchController.saveProtocol ( )

save protocol to a file

References handle.fieldnames, Protocol, and xlswrite2().

Here is the call graph for this function:

◆ selectAction_Callback()

function mibBatchController.selectAction_Callback ( hObject)

---------------------------------------------------------------— % Additional functions and callbacks callback for change of the selected actions in popups: sectionPopup and actionPopup defined by hObject

Required fields of hObject:

◆ selectedActionTable_ContextCallback()

function mibBatchController.selectedActionTable_ContextCallback ( parameter)

callback for context menu over selectedActionTable

References handle.fieldnames, mibInputMultiDlg(), and uigetfile_n_dir().

Here is the call graph for this function:

◆ selectedActionTableItem_Update()

function mibBatchController.selectedActionTableItem_Update ( hObject)

update selected action in selectedActionTable

Required fields of hObject:

References handle.fieldnames.

◆ sizeChangedFcn()

function mibBatchController.sizeChangedFcn ( )

main resizing function for the window

◆ updateProtocolList()

function mibBatchController.updateProtocolList ( )

update protocol list

◆ updateSelectedActionTable()

function mibBatchController.updateSelectedActionTable ( BatchOpt)

update selected action table using the BatchOpt structure Parameters: BatchOpt: a structure with parameters .Checkbox - logical, true/false, will be displayed as a checkbox .Popupmenu - a cell array with 2 items for popupmenus. .Popupmenu(1) - {Container 1}, selected item .Popupmenu(2) - [{Container 1},{Container 2},{Container 3'}] .Editbox - a string for edit box

Required fields of BatchOpt:

References handle.fieldnames.

◆ updateWidgets()

function mibBatchController.updateWidgets ( )

update widgets of mibBatchController class

◆ ViewListner_Callback2()

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

Member Data Documentation

◆ closeEvent

EVENT mibBatchController.closeEvent

> Description of events event firing when window is closed

Events
closeEvent

◆ CurrentBatch

mibBatchController.CurrentBatch

a structure with selected Batch options, returned by returnBatchOpt function of the controller

◆ jSelectedActionTable

mibBatchController.jSelectedActionTable

a handle to java class for the selectedActionTable

◆ jSelectedActionTableScroll

mibBatchController.jSelectedActionTableScroll

a handle to java class for the selectedActionTable scroll

◆ listener

mibBatchController.listener

a cell array with handles to listeners

◆ mibController

mibBatchController.mibController

handle to mibController

◆ mibModel

mibBatchController.mibModel

handles to the model

Referenced by mibBatchController().

◆ Protocol

mibBatchController.Protocol

a structure with picked actions that should be executed

Referenced by saveProtocol().

◆ ProtocolBackups

mibBatchController.ProtocolBackups

a cell array with backuped protocols

◆ ProtocolBackupsCurrNumber

mibBatchController.ProtocolBackupsCurrNumber

current number of the protocol history

◆ ProtocolBackupsMaxNumber

mibBatchController.ProtocolBackupsMaxNumber

maximal number of protocol history for backup

◆ protocolListIndex

mibBatchController.protocolListIndex

index of a row selected in the protocolList

◆ Sections

mibBatchController.Sections

a strutcure with available Sections and corresponding actions Sections(id).Name -> name of available section (i.e. Menu -> File, Menu -> Dataset) Sections(id).Actions(id2).Name -> name of an action available for the selected section (i.e. Tools for Images -> Image Arithmetics, Semi-automatic segmentation --> Global thresholding) Sections(id).Actions(id2).Parameters -> a structure with parameters for the action

◆ selectedAction

mibBatchController.selectedAction

index of the selected action for the currect section, i.e. id2 for Sections(id).Actions(id2) updated by obj.View.handles.actionPopup

◆ selectedActionTableIndex

mibBatchController.selectedActionTableIndex

index of a row selected in the selectedActionTable

◆ selectedSection

mibBatchController.selectedSection

index of the selected section, i.e. id for obj.Sections(id) updated by obj.View.handles.sectionPopup

◆ stopProtocol

EVENT mibBatchController.stopProtocol

stop batch

Events
stopProtocol

◆ stopProtocolSwitch

mibBatchController.stopProtocolSwitch

stop protocol property

Note
This property has the MATLAB attribute SetObservable set to true.
Matlab documentation of property attributes.

◆ View

mibBatchController.View

handle to the view


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