Annotations

class controllers.Annotations

Bases: handle

ANNOTATIONS - @type Annotations class is responsible for the List of Annotations dialog.

available from MIB Ribbon Models Annotations List of annotations

obj.startController('controllers.Annotations'); // as GUI tool
Constructor Summary
Annotations(mibModel, varargin)

ANNOTATIONS - Constructor for the Annotations controller.

Syntax:
obj = Annotations(mibModel)
obj = Annotations(mibModel, BatchOpt)
Input Arguments:
  • mibModel - handle to MibModel

  • varargin{1} - controller handle (unused, for startController compatibility)

  • varargin{2} - (optional) BatchOpt structure; when NaN returns defaults via SyncBatch

Property Summary
BatchOpt

cell array of names of open child controllers

batchModifyExpressionFactor

last-used operation in ‘Batch modify’ dialog

batchModifyExpressionOperation

Nx2 array of [row, col] indices of currently selected table cells

childControllers

last-used factor in ‘Batch modify’ dialog

childControllersIds

cell array of open child controllers

imarisOptions

a cell array with handles to listeners

indices

a structure with export options for Imaris .radii - default radius scaling factor .color - default color [R G B A] in range 0..1 .name - default spot name

listener

handle to the view / views.AnnotationsGUI

mibModel
view

handle to the MibModel

Method Summary
static ViewListner_Callback2(src, evnt)

VIEWLISTNER_CALLBACK2 - Guard: if the view was closed before listener cleanup, clean up and return.

Syntax:
obj.ViewListner_Callback2(src, evnt)
addCallbacks()

ADDCALLBACKS - Wire all widget callbacks. Called once from the constructor.

Syntax:
obj.addCallbacks()
annotationTable_CellEditCallback(Indices)

ANNOTATIONTABLE_CELLEDITCALLBACK - Callback for cell edit in annotationTable.

Syntax:
obj.annotationTable_CellEditCallback(Indices)
Input Arguments:
  • Indices - [row col] of the edited cell (from CellEditCallback event.Indices)

annotationTable_CellSelectionCallback(Selection)

ANNOTATIONTABLE_CELLSELECTIONCALLBACK - Callback for cell selection change in annotationTable.

Syntax:
obj.annotationTable_CellSelectionCallback(Selection)
Input Arguments:
  • Selection - Nx2 array of [row col] pairs (from SelectionChangedFcn event.Selection)

annotationTable_KeyPressFcn(eventdata)

ANNOTATIONTABLE_KEYPRESSFCN - Key-press callback for the annotation table; handles reorder shortcuts.

Syntax:
obj.annotationTable_KeyPressFcn(eventdata)
closeWindow()

CLOSEWINDOW - Close the Annotations window and clean up listeners.

Syntax:
obj.closeWindow()
deleteBtn_Callback()

DELETEBTN_CALLBACK - Delete all annotations from the current dataset.

Syntax:
obj.deleteBtn_Callback()
gui_KeyPressFcn(eventdata)

GUI_KEYPRESSFCN - Key-press callback for the main figure window.

Syntax:
obj.gui_KeyPressFcn(eventdata)
helpBtn_Callback()

HELPBTN_CALLBACK - Open the Annotations help page in the browser.

Syntax:
obj.helpBtn_Callback()
loadBtn_Callback()

LOADBTN_CALLBACK - Import annotations from a file or from the MATLAB workspace.

Syntax:
obj.loadBtn_Callback()
precisionEdit_Callback()

PRECISIONEDIT_CALLBACK - Callback for the precision spinner; refresh table with new decimal places.

Syntax:
obj.precisionEdit_Callback()
resortTablePopup_Callback()

RESORTTABLEPOPUP_CALLBACK - Resort the annotation list by the chosen column.

Syntax:
obj.resortTablePopup_Callback()
saveAnnotationsToFile(labelText, labelPosition, labelValue)

SAVEANNOTATIONSTOFILE - Save annotations to a file chosen by the user.

Syntax:
obj.saveAnnotationsToFile(labelText, labelPosition, labelValue)
Input Arguments:
  • labelText - cell array of annotation labels

  • labelPosition - Nx4 matrix [z x y t] in pixels

  • labelValue - Nx1 numeric array of annotation values

saveBtn_Callback()

SAVEBTN_CALLBACK - Export annotations to a file or to the MATLAB workspace.

Syntax:
obj.saveBtn_Callback()
settingsBtn_Callback()

SETTINGSBTN_CALLBACK - Open the annotation display settings dialog.

Syntax:
obj.settingsBtn_Callback()
tableContextMenu_cb(parameter)

TABLECONTEXTMENU_CB - Callbacks for the annotation table context menu.

Syntax:
obj.tableContextMenu_cb(parameter)
Input Arguments:
  • parameter - string selecting the action

  • ‘Add’ - add a new annotation

  • ‘Modify’ - batch-modify values/coords of selected annotations

  • ‘Rename’ - rename selected annotations

  • ‘Jump’ - move view to selected annotation

  • ‘Count’ - count and sum selected annotations

  • ‘Clipboard’ - copy selected rows to clipboard

  • ‘ClipboardPaste’ - paste clipboard into selected column

  • ‘CropPatches’ - crop image patches around selected annotations

  • ‘Mask’ - rasterise selected annotations into the mask layer

  • ‘Interpolate’ - interpolate positions between selected annotations

  • ‘Export’ - export selected annotations to file

  • ‘Imaris’ - export selected annotations to Imaris

  • ‘OrderTop’ / ‘OrderUp’ / ‘OrderDown’ / ‘OrderBottom’ - reorder

  • ‘Delete’ - delete selected annotations

updateWidgets()

UPDATEWIDGETS - Refresh the annotation table from the current dataset.

Syntax:
obj.updateWidgets()