Segmentation Tools

This panel hosts different tools that are used for the image segmentation.

Back to Index --> User Guide --> Panels --> Segmentation Panel

Contents

The 3D ball

Makes selection as a spherical object in the 3D space with a radius taken from the Radius, px edit box. The Eraser, x edit box modifies increse of the 3D ball eraser, when holding the Clrl key.
A brief demonstration is available in the following video:
https://youtu.be/ZcJQb59YzUA?t=1s



Note! The 3D shape of the ball is defined by the pixel dimensions, see Dataset Parameters in Menu->Dataset->Parameters.

Selection modifiers
  • None / Shift+left mouse click, will add selection with the existing one
  • Ctrl + left mouse click, will remove selection from the current

The 3D lines

A demonstration is available on youtube:
https://youtu.be/DNRUePJiCbE
The 3D lines tool can be used to draw lines in 3D and arrange them as graphs or skeletons. The 3D lines composed of Nodes (Vertices) connected with Edges (a line that connect two nodes). Separated from each other sets of 3D lines organized into separate trees.

Modification of nodes is possible using mouse clicks. To increase flexibility, the clicks can be extended with key-modifiers, such as Shift, Control, Alt. Each action can be configured depending on needs. Please refer to a table below for various options:

Available actions
  • Add node, add a new node to the active tree; the new point will be connected to the active point (shown in red) of the tree
  • Assign active node, assign the closest node to position of the mouse click, as a new active node
  • Connect to node, connect active node to another existing node
  • Delete node, delete the closest node to position of the mouse click; the edges will be rearranged to prevent splitting of the tree
  • Insert node after active, insert a new node after the active node
  • Modify active node, change position of the active node
  • New tree, add a new node and assign it to a new tree, which is not connected to other trees
  • Split tree, delete the closest node to position of the mouse click and split the tree at this point
Use the Show lines checkbox to toggle visibility of the lines in the Image View panel.
Press the Table view button to start a window which tables that describe the 3D lines (see below).



Tools panel
  • Load, load 3D lines from a file in matlab-compatible lines3d format
  • Save, export to Matlab or save 3D lines to a file:
    • Matlab format, *.lines3d, it is recommended to save the 3D lines in the matlab format!
    • Amira Spatial graph, *.am, Amira-compatible format in binary or ascii form
    • Excel format, *.xls, export Nodes and Edges tables to an Excel file
  • Refresh, refresh the tables shown in this window
  • Delete all, delete all 3D lines
  • Visualize in 3D, plot all trees in the 3D space
  • Settings, modify color and thickness of 3D lines
Table with the list of trees
The upper table shows the list of trees and number of nodes that compose each tree. Each tree should have an unique name!

Right mouse click starts a popup menu with various options:
  • Rename selected tree..., rename selected in the table tree; tree name should be unique!
  • Find tree by node..., find a tree which has a node with provided index
  • Visualize in 3D selected tree(s), plot the selected trees in 3D
  • Save/export selected tree(s), export to Matlab or save to a file the selected trees, see the Tools panel below for the list of available file formats
  • Delete selected tree(s), delete selected tree from the table


Space between the tables
  • Active tree, an index of the active tree
  • Active node, an index of the active node
  • Table, a combo box to select what should be shown in the lower table: Nodes or Edges
  • Field, a combo box to define an additional field that should be shown the lower table. By default, only the Radius and Weights fields are available
  • Auto jump, when selected, auto jump to the selected node
  • Auto refresh, automatically refresh the tables, may be quite slow with many nodes

Nodes table
The table shows list of nodes and offers multiple actions via a popup menu:
  • Jump to the node, jumps to the selected node and put it in the center of the Image View panel
  • Set as active node, makes the selected node active
  • Rename selected nodes..., assign a new name for the selected nodes
  • Show coordinates in pixels..., by default, the coordinates of the nodes are shown in the physical units of the dataset, i.e. with respect to the bounding box; this action shows coordinate of the node in pixels
  • New annotations from nodes, generate a new annotations from the position of nodes
  • Add nodes to annotations, add selected nodes to the existing annotations
  • Delete nodes from annotations, delete selected nodes from the existing annotations
  • Delete nodes..., delete selected nodes

Edges table
The table shows list of edges; certain actions available via a popup menu:
  • Jump to the node, jumps to the selected node and put it in the center of the Image View panel
  • Set as active node, makes the selected node active

Annotations

A brief demonstration is available in the following videos:
https://youtu.be/3lARjx9dPi0
https://youtu.be/6otBey1eJ0U
A set of tools to add/remove annotations. Each annotation allows to mark specific location in the dataset, assign a label and a value to it

When the Annotation tool is selected the mouse click above the image adds annotation to the model. The annotations can be removed by using Ctrl + left mouse click combination.
  • The Annotation list button starts a window with the list of existing annotations. It is possible to load and save annotations to the main Matlab workspace or to a file (matlab and excel formats). See more below.
  • The Delete All button removes all annotations
  • The Display as combobox - enables way how the annotations are displayed in the Image View panel.
      The following modes are available:

    • Marker, show only location of the annotation using a cross-marker
    • Label, show marker and label for each annotation
    • Value, show marker and value for each annotation
    • Label + Value, show marker, label and value for each annotation
  • Focus on Value checkbox, when enabled, the first parameter during visualization of annotations is value and the second parameter is label.

List of annotations window
  • The List of annotations table shows a list of annotations.
      The right mouse button click calls an additional popup menu that allows to
    • Jump to annotation, moves the image so that the selected annotation is in the middle of the Image View panel
    • Add annotation, manually add annotation to the list, position of the first and second fields are defined by the Value eccentric checkbox of the Annotation panel, see above
    • Rename selected annotations, rename names of the selected annotations
    • Batch modify selected annotations, modify annotation values or coordinates using a provided expression
    • Count selected annotations, calculate occurance of each annotation in the list of selected annotations. The results are displayed in the Matlab command window and copied to the system clipboard
    • Copy selected annotations to clipboard, the selected annotations are copied to the system clipboard as a text string ready to be pasted to Excel
    • Export selected annotations, export selected annotations in the Matlab format, landmarks for Amira (Note! only the coordinates are exported to Amira!), PSI format for Amira and Excel
    • Export selected annotations to Imaris, export selected annotations to Imaris (Note! please first export the dataset!)
    • Delete annotation, delete selected annotations from the list
  • The Load button, press to import annotations from the main Matlab workspace or load them from a file
  • The Save button, press to export annotations to the main Matlab workspace or to save them as a file in Matlab, Comma-separated CSV format, Excel formats or as landmarks for Amira ( Note! only the coordinates are exported!), or PSI format for Amira
  • The Precision editbox, modify precision of the value field in the table and for the visualization in the Image View panel
  • The Auto jump checkbox - when enabled, the image in the Image View panel is automatically shifted, thereby placing the selected annotation at the center of the image
  • The Sort table allows to sort annotations based on their Name, Value, X, Y, Z, T
  • The Refresh table button updates the list of annotations
  • The Delete all button removes all annotations

The Brush tool

Use brush to make selection. The brush size is regulated with the Radius, px edit box
A brief demonstration is available in the following video:
https://youtu.be/ZcJQb59YzUA?t=37s


Objects from different image slices may be connected using the Interpolation function (shortcut i or via Menu->Selection->Interpolate), see more in the Selection menu section.

Size of the Brush can be regulated using Ctrl + Mouse wheel.

Selection modifiers
  • None / Shift + left mouse click, will add selection with the existing one
  • Ctrl + left mouse click, will remove selection from the current, i.e. eraser mode
  • The radius of the brush in the eraser mode could be amplifier using the Eraser, x edit box.

Interpolation settings, press to start a dialog that allows to modify the interpolation settings. The settings can also be modified from the Preference dialog and the type can be switched using a dedicated button in the toolbar.

Superpixels with the Brush tool

The Superpixels mode can be initiated by selecting the Watershed or SLIC checkbox. In the Superpixels mode the brush tool selects not individual pixels but rather groups of pixels (superpixels). While drawing the selection of the last superpixel can be undone by pressiong the Ctrl+Z shortcut.

The superpixels are calculated using the

The two additional edit boxed (N, Compact/Invert) offer possibility to modify the size of generated superpixels (see below). The values in the N edit box can be changed using the Ctrl+Alt + mouse wheel or Ctrl+Alt+Shift + mouse wheel shortcuts.

References:

The set of superpixels is individual for each magnification (especially in the SLIC mode). It is possible to define size of superpixels (the N edit box, default value 220 for SLIC, for Watershed use lower numbers) and compactness (the Compact edit box; higher compactness gives more rectangularly shaped superpixels). In the Watershed mode the Compact edit box is called Invert; when objects have dark boundaries over bright backround number in the Invert edit box should be 1 (or higher), if the objects have bright boundaries over dark background this number should be 0.

During drawing the boundaries of the superpixels for the SLIC mode are shown using the drawregionboundaries.m function written by Peter Kovesi Centre for Exploration Targeting, School of Earth and Environment, The University of Western Australia.

Note 1! The Superpixels mode is sensitive to the Adapt. checkbox in the Selection panel. When the Adapt. checkbox is selected the superpixels are selected based on the mean value of the initial selection plus/minus standard deviation within the same area multiplied by the factor specified in the Adapt. editbox of the Selection panel.

Note 2! While drawing the value in the Adapt. editbox may be changed using the mouse wheel.

Note 3! The function relies on slicmex.c that should be compiled for your operating system. Please refer to the Microscopy Image Browser System Requirements section for details.

The Black and White Thresholding tool

Makes black and white thresholding of the current image slice or the whole dataset (depending on status of the 3D and 4D checkboxes).

Use the Low Lim and High Lim sliders and edit boxes to provide the threshold values.

If the Masked area check box is selected the thresholding is performed only for the masked areas of the image, which is very convenient for local black and white thresholding.

The right mouse click above the threshold sliders opens a popup menu that allows to set the step for slider movement.

The Adaptive checkbox starts adaptive threshoding with the 'Sensitivity' and 'Width' parameters modified by the scroll bars.
A brief demonstration is available in the following video:
https://youtu.be/ZcJQb59YzUA?t=4m37s

Drag & Drop materials

Shift MIB layers (selection, mask, model) to left/right/up/down direction. The tool allows to move individual 2D/3D objects as well as complete contents of the layers in 2D and 3D.

A combobox offers possibility to choose the layer to be moved. Mouse click or use of the buttons in the panel move the selected layer left/right/up/down by the specified number of pixels.

A brief demonstration is available in the following video:
https://youtu.be/NGudNrxBbi0



Start by Modifier 3D checkbox Action
Mouse click over an objectControlUncheckedMove the selected object in 2D
Mouse click over an objectControlCheckedMove the selected 3D object. Note! Only for Matlab version 2017b and newer
Mouse clickShiftUncheckedMove all objects on the shown slice, i.e. 2D movement
Mouse clickShiftCheckedMove all objects on all slices, i.e. 3D movement
Left/Right/Up/Down buttons-UncheckedMove all objects on the shown slice by the specified number of pixels, i.e. 2D movement
Left/Right/Up/Down buttons-CheckedMove all objects on all slices by the specified number of pixels, i.e. 3D movement

The Lasso tool

Selection with a lasso, rectangle, ellipse or polyline tools.
A brief demonstration is available in the following video:
https://youtu.be/OHFdGj9uBro

How to use:
  • Press and release the selection mouse key (default: left mouse button) above the image to initialize the lasso tool
  • Press the left mouse button and drag the mouse to start selection of areas
  • Release the left mouse button to finish selection
  • Modify selected area, if needed
  • Accept selection using a double click of the left mouse button
When the Add mode is switched to the Subtract mode the selected area is removed from the Selection layer.

The Lasso tool works also in 3D.

The Magic Wand+Region Growing tool

Selection of pixels with the mouse button based on their intensities. The intensity variation is calculated from the intensity of the selected pixel and two threshold values from the Variation edit boxes.

A brief demonstration is available in the following video:
https://youtu.be/ZcJQb59YzUA?t=1m50s
  • Connect 8 specifies the 8 (26 for 3D) connected neighbourhood connectivity
  • Connect 4 specifies the 4 (6 for 3D) connected neighbourhood connectivity
  • Radius allows defining an effective range for the magic wand

The Magic Wand works also in the 3D mode (the 3D switch in the Selection panel).

Selection modifiers for the Magic wand tool:

The Membrane Click Tracker tool

This tool tracks membrane-type objects by using 2 mouse clicks that define start and end point of the membrane domain.

A brief demonstration for 2D is available in the following video:
https://youtu.be/ZcJQb59YzUA?t=3m14s
A brief demonstration for 3D is available in the following video:
https://youtu.be/ZcJQb59YzUA?t=2m22s
How to use:
  • Ctrl + left mouse click to define the starting point of a membrane fragment (before MIB version 2.651 the Shift + left mouse click combination was used)
  • mouse click to trace the membrane from the starting point to the clicked point

The membrane is traced with help of Accurate Fast Marching function http://www.mathworks.se/matlabcentral/fileexchange/24531-accurate-fast-marching by Dirk-Jan Kroon, 2011, University of Twente.

Note! It is highly recommended to compile the corresponding function (see details in the Membrane Click Tracker section of the System Requirements page ), otherwise the function is very slow!

Extra parameters:

Note! When the 3D switch in the Selection panel is enabled the Membrane Click Tracker tool connects points (linearly) in the 3D space (this may be very usefull for tracing microtubules).

Object Picker

This mode allows fast selection of objects from the Mask or Model layers. When the Mask and Model radio buttons define the target layer for selection.

A brief demonstration is available in the following video:
https://youtu.be/mzILHpbg89E
Works also in 3D (select the 3D check box in the Selection panel).

Note! The 3D mode requires calculating statistics for the objects. Please select the material in the Select from list box and press the Recalc. Stats button (the button becomes available when the Mask->Mask statistics... or Menu->Models->Model statistics....

Possible Object Picker selection modes are:

Selection modifiers:

The Spot tool

Adds a spot - a circular object with a mouse click

A brief demonstration is available in the following video:
https://youtu.be/AlCzjKuyJww
Use the Radius, px edit box to specify the radius of the spot.

Works also in 3D.

Selection modifiers
  • None / Shift + left mouse click, will add new spot to the existing ones
  • Ctrl + left mouse click, will remove selection from the current

Back to Index --> User Guide --> Panels --> Segmentation Panel