Skip to main content

Filter Shells

The Filter Shells tool detects individual shells within a surface and applies filtering to remove unwanted components based on various criteria. This tool is essential for cleaning surfaces that contain noise artifacts, small disconnected fragments, or internal structures that need to be removed.

Medical Disclaimer

This tool is provided for research and educational purposes only. Any clinical or diagnostic use requires proper validation in accordance with applicable regulations.

Overview

Surfaces generated from segmentation data often contain small disconnected shells that represent imaging noise, partial volume effects, or unwanted anatomical structures. The Filter Shells tool provides multiple strategies for identifying and removing these unwanted components while preserving the main structure.

Unlike the Split tool which creates separate surface objects for each shell, Filter Shells modifies the existing surface by removing shells that don't meet the specified criteria.

Interface

Active Surface Information

FieldDescription
Connected shellsTotal number of disconnected shell components in the active surface

Filter Options

Select the filtering method that best suits your needs:

MethodDescription
Retain only the largest shell based on areaKeep only the single largest shell
Retain largest shells based on areaKeep a specified number of largest shells
Retain shells based on areaKeep shells with surface area above a minimum threshold
Retain shells based on volumeKeep shells with enclosed volume above a minimum threshold
Retain shells based on number of trianglesKeep shells with triangle count above a minimum threshold
Retain inside or outside shellsKeep shells based on their spatial relationship

Method-Specific Parameters

Retain Largest Shells Based on Area

ParameterDescriptionDefault
Largest shellsNumber of largest shells to retain1

Retain Shells Based on Area

ParameterDescriptionDefault
Minimum area (mm²)Shells with area below this value are removed10.0

Retain Shells Based on Volume

ParameterDescriptionDefault
Minimum volume (mm³)Shells with volume below this value are removed10.0

Retain Shells Based on Number of Triangles

ParameterDescriptionDefault
Minimum number of trianglesShells with fewer triangles are removed50

Retain Inside or Outside Shells

OptionDescription
Retain inside shellsKeep shells that are contained within other shells
Retain outside shellsKeep shells that are not contained within other shells

Visualization

Enable visualization to preview shell properties before filtering:

Visualization MethodDescription
Visualize a color map representing shell IDsEach shell is colored by its unique identifier
Visualize a color map representing shell volumesColor gradient based on shell volume
Visualize a color map representing shell surface areasColor gradient based on shell surface area
Visualize a color map representing the number of triangles in each shellColor gradient based on triangle count

When visualization is enabled, a color bar legend appears in the 3D view showing the value range.

Actions

ButtonDescription
ApplyExecute the filter operation
note

The Apply button is only enabled when the active surface contains more than one connected shell.

Filtering Strategies

By Count (Largest Shells)

Use this when you know how many significant structures should remain:

  • Use case: Keep the 5 largest vertebrae, discard all smaller fragments
  • Advantage: Simple and predictable
  • Consideration: Shell size is measured by surface area, not volume

By Area Threshold

Use this when you have a meaningful area cutoff:

  • Use case: Remove all shells smaller than 10 mm²
  • Advantage: Works well when noise shells are consistently small
  • Consideration: May not catch all noise if some artifacts are larger than expected

By Volume Threshold

Use this when enclosed volume is the meaningful metric:

  • Use case: Keep only shells with significant internal volume
  • Advantage: Better for distinguishing solid structures from thin noise
  • Consideration: Requires closed, manifold shells for accurate volume calculation

By Triangle Count

Use this when mesh resolution correlates with significance:

  • Use case: Remove shells with very few triangles (likely noise)
  • Advantage: Independent of physical size—works at any scale
  • Consideration: High-resolution meshes may have noise shells with many triangles

By Spatial Relationship (Inside/Outside)

Use this for nested structures:

  • Retain inside shells: Keep internal structures (e.g., trabecular bone inside cortical shell)
  • Retain outside shells: Keep outer surfaces (e.g., cortical bone only)

Typical Workflows

Basic Noise Removal

To quickly clean a surface of small artifacts:

  1. Open the active surface in Filter Shells
  2. Select Retain only the largest shell based on area
  3. Click Apply

This keeps only the single largest connected component.

Cleaning Segmentation Output

For surfaces generated from noisy imaging data:

  1. Enable Visualization to preview shells
  2. Select Visualize a color map representing shell volumes or shell surface areas
  3. Identify an appropriate threshold by examining the color bar
  4. Select Retain shells based on area or volume
  5. Set the minimum threshold
  6. Click Apply

Removing Internal Structures

To extract only the outer surface (e.g., for creating a mold):

  1. Select Retain inside or outside shells
  2. Choose Retain outside shells
  3. Click Apply

This removes any shells that are completely contained within other shells.

Extracting Internal Structures

To isolate internal components:

  1. Select Retain inside or outside shells
  2. Choose Retain inside shells
  3. Click Apply

Best Practices

  1. Use visualization first: Enable the visualization option to understand your shell distribution before filtering. This helps you choose appropriate thresholds.

  2. Start conservative: Begin with less aggressive filtering (e.g., larger number of retained shells) and increase filtering gradually.

  3. Consider the right metric:

    • Use area for thin structures
    • Use volume for solid structures
    • Use triangle count when size varies with resolution
  4. Verify after filtering: Run Diagnostics and Fixes to verify the filtered surface is still valid for your intended use.

  5. Use Split for separate objects: If you need the filtered-out shells as separate objects (rather than just removing them), use Split followed by deletion of unwanted objects.

Filter Shells vs. Split

ScenarioFilter ShellsSplit
Remove small noise shells
Create separate objects for each shell
Keep shells meeting specific criteria in one object
Extract N largest shells as separate objects
Preview shell properties with visualization
Filter by volume, area, or triangle countLimited

See Also

  • Split - Separate shells into individual surface objects
  • Merge - Combine surfaces into one object
  • Diagnostics and Fixes - Comprehensive mesh analysis and repair