Skip to content

# Selection Panel

Back to MIB | User Guide | Panels

## Overview

The Selection Panel provides tools to manipulate the Selection layer, one of three key segmentation layers in MIB (Model, Selection, Mask). This layer works in combination with others for tasks like adding, subtracting, or refining segmentations. Learn more about these layers in Data Layers of MIB.

## The A button

Adds the Selection layer to the chosen Model or Mask layer, as selected in the `Add to` column in the Segmentation table of the Segmentation Panel.

Shortcuts

- `A`: add for the current slice only.
- `Shift` + `A`: add for all slices in the dataset.
- `Shift` + `Alt` + `A`: add for all slices, including the time dimension.

## The S button

Subtracts the Selection layer from the chosen Model or Mask layer, as selected in the `Add to` column in the Segmentation table of the Segmentation Panel.

Shortcuts

- `S`: subtract for the current slice only.
- `Shift` + `S`: subtract for all slices in the dataset.
- `Shift` + `Alt` + `S`: subtract for all slices, including the time dimension.

Possible usage combinations

Select from | Add to | Fix Selection to Material | Masked area | Result of subtraction
--- | --- | --- | --- | ---
Any | Mask | OFF | OFF | Mask - Selection
Material | Mask | ON | OFF | Mask within selected material - Selection
Any | NOT Mask | OFF | OFF | All Materials - Selection
Material | NOT Mask | ON | OFF | Selected material - Selection
Material | NOT Mask | ON | ON | Selected material within the Mask - Selection

## The R button

Replaces the material or mask selected in the `Add to` column in the Segmentation table of the Segmentation Panel. with the Selection layer contents.
This is sensitive to the Masked area checkbox in the Segmentation panel.

Shortcuts

- `R`: replace for the current slice only.
- `Shift` + `R`: replace for all slices in the dataset.
- `Shift` + `Alt` + `R`: replace for all slices, including the time dimension.

## The C button

Clears the Selection layer.

Shortcuts

- `C`: clear the current slice only.
- `Shift` + `C`: clear Selection for all slices in the dataset.
- `Shift` + `Alt` + `C`: Clear Selection for all slices, including the time dimension.

## The F button

Fills holes in the Selection layer.
This can happen automatically if Auto fill is checked.

Shortcuts

- `F`: fill holes for the current slice only.
- `Shift` + `F`: fill holes for all slices in the dataset.
- `Shift` + `Alt` + `F`: fill holes for all slices, including the time dimension.

## The Erode button

Performs binary erosion (shrinkage) on the Selection layer using MATLAB’s imerode function, with the size set in the Strel edit box.

Shortcuts

- `Z`: erode Selection for the current slice only.
- `Shift` + `Z`: erode Selection for all slices in the dataset.
- `Shift` + `Alt` + `Z`: erode Selection for all slices, including the time dimension.

Tip

- Enable 3D for 3D erosion.
- Check Difference to get the difference between the current and eroded selections.

## The Dilate button

Performs binary dilation (expansion) on the Selection layer using MATLAB’s imdilate function, with the size set in the Strel edit box.

When Adapt. is checked, dilation adapts to image intensities in expanded areas, controlled by the Adapt. edit box (mean ± standard deviation × coefficient).

Shortcuts

- `X`: dilate Selection for the current slice only.
- `Shift` + `X`: Dilate Selection for all slices in the dataset.
- `Shift` + `Alt` + `X`: Dilate Selection for all slices, including the time dimension.

Tip

- Enable 3D for 3D dilation.
- Check Difference to get the difference between the current and dilated selections.

## Additional controls

- Color channel combo box: selects the color channel used for segmentation tools in the Segmentation Panel.
- 3D: enables 3D manipulations for image and Mask/Model layers.
- Auto fill: automatically fills shapes drawn with the brush tool (and eraser) after releasing the left mouse button.
- Adapt: enables adaptive dilation or supervoxel selection with the Brush tool, limiting expansion based on mean ± standard deviation × Adapt. coefficient.
- Difference: shows the difference between original and eroded/dilated Selection layers.
- Strel edit box: sets the structural element size for erosion and dilation. Use a single number (e.g., 3) or two semi-colon-separated numbers (e.g., `3;5` for 3x5 pixels in 2D, or 3x3x5 in 3D).

## Right mouse click menu

Right-clicking an empty area opens a dropdown to hide/show panels, increasing the Image View Panel’s space.

Back to MIB | User Guide | Panels