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.
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
| Field | Description |
|---|---|
| Connected shells | Total number of disconnected shell components in the active surface |
Filter Options
Select the filtering method that best suits your needs:
| Method | Description |
|---|---|
| Retain only the largest shell based on area | Keep only the single largest shell |
| Retain largest shells based on area | Keep a specified number of largest shells |
| Retain shells based on area | Keep shells with surface area above a minimum threshold |
| Retain shells based on volume | Keep shells with enclosed volume above a minimum threshold |
| Retain shells based on number of triangles | Keep shells with triangle count above a minimum threshold |
| Retain inside or outside shells | Keep shells based on their spatial relationship |
Method-Specific Parameters
Retain Largest Shells Based on Area
| Parameter | Description | Default |
|---|---|---|
| Largest shells | Number of largest shells to retain | 1 |
Retain Shells Based on Area
| Parameter | Description | Default |
|---|---|---|
| Minimum area (mm²) | Shells with area below this value are removed | 10.0 |
Retain Shells Based on Volume
| Parameter | Description | Default |
|---|---|---|
| Minimum volume (mm³) | Shells with volume below this value are removed | 10.0 |
Retain Shells Based on Number of Triangles
| Parameter | Description | Default |
|---|---|---|
| Minimum number of triangles | Shells with fewer triangles are removed | 50 |
Retain Inside or Outside Shells
| Option | Description |
|---|---|
| Retain inside shells | Keep shells that are contained within other shells |
| Retain outside shells | Keep shells that are not contained within other shells |
Visualization
Enable visualization to preview shell properties before filtering:
| Visualization Method | Description |
|---|---|
| Visualize a color map representing shell IDs | Each shell is colored by its unique identifier |
| Visualize a color map representing shell volumes | Color gradient based on shell volume |
| Visualize a color map representing shell surface areas | Color gradient based on shell surface area |
| Visualize a color map representing the number of triangles in each shell | Color gradient based on triangle count |
When visualization is enabled, a color bar legend appears in the 3D view showing the value range.
Actions
| Button | Description |
|---|---|
| Apply | Execute the filter operation |
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:
- Open the active surface in Filter Shells
- Select Retain only the largest shell based on area
- Click Apply
This keeps only the single largest connected component.
Cleaning Segmentation Output
For surfaces generated from noisy imaging data:
- Enable Visualization to preview shells
- Select Visualize a color map representing shell volumes or shell surface areas
- Identify an appropriate threshold by examining the color bar
- Select Retain shells based on area or volume
- Set the minimum threshold
- Click Apply
Removing Internal Structures
To extract only the outer surface (e.g., for creating a mold):
- Select Retain inside or outside shells
- Choose Retain outside shells
- Click Apply
This removes any shells that are completely contained within other shells.
Extracting Internal Structures
To isolate internal components:
- Select Retain inside or outside shells
- Choose Retain inside shells
- Click Apply
Best Practices
-
Use visualization first: Enable the visualization option to understand your shell distribution before filtering. This helps you choose appropriate thresholds.
-
Start conservative: Begin with less aggressive filtering (e.g., larger number of retained shells) and increase filtering gradually.
-
Consider the right metric:
- Use area for thin structures
- Use volume for solid structures
- Use triangle count when size varies with resolution
-
Verify after filtering: Run Diagnostics and Fixes to verify the filtered surface is still valid for your intended use.
-
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
| Scenario | Filter Shells | Split |
|---|---|---|
| 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 count | ✓ | Limited |
See Also
- Split - Separate shells into individual surface objects
- Merge - Combine surfaces into one object
- Diagnostics and Fixes - Comprehensive mesh analysis and repair