Skip to main content

Edit Mask

The Edit Mask tool provides interactive 2D editing capabilities for mask objects. Use brush tools, polygon selection, and other drawing modes to add or remove voxels from masks directly in the slice views.

Accessing the Tool

  1. Navigate to the Segmentation tab in the ribbon.
  2. Click Edit Mask in the Operations section.

Drawing Tools

Brush Tool

Paint directly on masks using a circular or rectangular brush:

ParameterDescription
Brush SizeRadius of the brush in pixels (1-1024).
Brush TypeCircle or Rectangle.

Shortcuts:

  • + / -: Increase or decrease brush size.
  • Ctrl + O: Toggle between circular and rectangular brushes.

ROI Selection Tools

Draw regions using these selection tools:

ToolDescriptionUsage
RectangleDraw rectangular regions.Left-click and drag. Release to apply.
PolygonDraw freeform polygon regions.Left-click to add vertices. Middle-click to close and apply.
CircleDraw circular (cylindrical) regions.Left-click and drag. Release to apply.
LassoDraw freehand contours.Left-click and drag to draw. Release to apply.
BrushPaint with brush strokes.Left-click and drag to paint continuously.
LiveWireSemi-automatic edge tracing.See LiveWire for details.
Level TracingIntensity-based boundary tracing.Left-click and drag to trace boundaries.

Note: Hold Shift while using any ROI tool to switch between Draw and Erase operations.

Edit Options

OptionDescription
DrawAdd voxels within the ROI to the active mask.
EraseRemove voxels within the ROI from the active mask.
Multiple LayerApply the operation to all slices (unchecked: current slice only).

Shortcuts:

  • Shift: Toggle between Draw and Erase modes while using ROI tools.

Threshold Mode

When enabled with Draw mode, the specified threshold range is applied to the painted area:

ParameterDescription
Lower GrayvalueMinimum intensity value to include in the mask.
Upper GrayvalueMaximum intensity value to include in the mask.

Voxels within the drawn ROI are included in the mask only if their intensity falls within the threshold range.

LiveWire Parameters

When using the LiveWire ROI tool:

ParameterDescription
Curvature WeightInfluence of path curvature (0.0-1.0). Higher values favor smoother paths.
Edge Length WeightInfluence of path length (0.0-1.0). Higher values favor shorter paths.

Workflow

  1. Open the Edit Mask tool from the Segmentation tab.
  2. The active mask is automatically selected as the target.
  3. Choose a drawing tool by clicking the corresponding ROI button.
  4. Set Draw or Erase mode in the Edit options.
  5. Optionally enable Multiple Layer to apply edits to all slices.
  6. Draw in the 2D slice views to modify the mask:
    • For Brush: Left-click and drag to paint.
    • For Rectangle/Circle/Lasso: Left-click and drag, release to apply.
    • For Polygon: Left-click to add points, middle-click to close.
  7. Use Shift to temporarily toggle between Draw and Erase.
  8. Click Clear Mask to erase all content from the active mask.
  9. The tool remains active until you switch to another tool or tab.

Keyboard and Mouse Shortcuts

ShortcutAction
ShiftToggle between Draw and Erase modes (while using ROI tools).
+ / -Increase or decrease brush size.
Ctrl + OToggle between circular and rectangular brushes.
Left Mouse ButtonDraw/paint with the active ROI tool.
Middle Mouse ButtonClose polygon (Polygon ROI tool only).
Left Click + DragPaint continuously (Brush tool) or define region (other tools).

Tips

  • Use a large brush for rough initial painting, then refine with a smaller brush.
  • Hold Shift while using ROI tools to temporarily switch between Draw and Erase.
  • Use the Polygon tool for precise boundary following.
  • Enable Threshold mode (with Draw) to add only voxels within a specific intensity range.
  • The LiveWire tool automatically snaps to edges based on image gradients.
  • Use Multiple Layer to apply the same edit across all slices simultaneously.
  • Click Clear Mask to completely erase the active mask content.
tip

Combine threshold mode with brush painting to selectively add only specific intensity ranges within your painted region, useful for intensity-based segmentation refinement.

Use Cases

  • Manual Segmentation: Create segmentations slice-by-slice using Draw mode.
  • Correction: Fix errors in automatic segmentation results using Erase mode.
  • Refinement: Adjust boundaries with threshold-based painting.
  • Cleanup: Remove small artifacts with Erase mode and small brush.

See Also