Skip to content
Back to skills

Filtering Segmentation

ASecurity

"Apply SimpleITK filters for smoothing, thresholding, morphology,

  • 247 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 9, 2026
toolspythonapiperformance

Works with

  • api

Security analysis

A100/100

Pro scans all 6 files and shows the line behind each finding

Scanned September 9, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill filtering-segmentation --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Filtering Segmentation?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Filtering Segmentation
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-filtering-segmentation/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-filtering-segmentation)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: filtering-segmentation
description: "Apply SimpleITK filters for smoothing, thresholding, morphology,
  segmentation, N4 bias correction, and label-statistics validation."
disable-model-invocation: true
metadata:
  disco-role: operating
license: Apache 2.0
---

# SimpleITK Filtering and Segmentation

Use this sub-skill when a task asks to apply SimpleITK filters procedurally or with `*ImageFilter` objects, smooth or threshold an image, run connected/confidence region growing, use fast marching, correct bias with N4, inspect filter parameters, or validate segmentation output with label statistics.

## Route by Task

- For choosing between procedural `sitk.FilterName(image, ...)` calls and reusable `sitk.FilterNameImageFilter()` objects, use [filter-patterns](references/filter-patterns.md).
- For source image generators, dimensional parameter vectors, event/progress callbacks, and reusable filter-object templates, use [filter-patterns](references/filter-patterns.md).
- For Otsu/manual thresholding, connected/confidence connected region growing, fast marching, N4 correction, and label-statistics validation, use [segmentation-recipes](references/segmentation-recipes.md).
- For representative Python signatures, defaults, and compact examples for smoothing, thresholding, segmentation, N4, and statistics filters, use [api-reference](references/api-reference.md).
- For pixel type and dimension errors, seed or mask mistakes, expensive filters, validation surprises, and accidental viewer calls, use [troubleshooting](references/troubleshooting.md).
- To check a local install with tiny synthetic images and no file IO or viewer, run [filter_segmentation_smoke.py](scripts/filter_segmentation_smoke.py).

## Boundary Notes

- Use the sibling [io-and-data](../io-and-data/SKILL.md) sub-skill for `ReadImage`, `WriteImage`, DICOM discovery, ImageIO choices, and transform file IO.
- Use the sibling [image-core](../image-core/SKILL.md) sub-skill for pixel ID selection, image dimensions, spacing/origin/direction, metadata, and array/image conversion fundamentals.
- Use the sibling [registration-transforms](../registration-transforms/SKILL.md) sub-skill for registration frameworks, transform initialization, resampling semantics, and transform composition.
- Do not rely on optional elastix/transformix wrappers for filtering workflows; they are build-dependent and were not exposed by the inspected wheel.

## Common Entry Points

- `sitk.GaussianSource(...)` creates deterministic synthetic images for examples and smoke tests.
- `sitk.SmoothingRecursiveGaussian(image, sigma, normalizeAcrossScale=False)` and `sitk.DiscreteGaussian(image, variance, ...)` handle Gaussian smoothing with different performance/spacing behavior.
- `sitk.BinaryThreshold(...)`, `sitk.OtsuThreshold(...)`, `sitk.ConnectedThresholdImageFilter()`, and `sitk.ConfidenceConnectedImageFilter()` cover common binary and seeded segmentation workflows.
- `sitk.FastMarchingImageFilter()` creates arrival-time maps from trial points; threshold the time map to obtain a segmentation.
- `sitk.N4BiasFieldCorrectionImageFilter()` corrects slowly varying intensity bias when given a real-valued image and usually a mask.
- `sitk.LabelShapeStatisticsImageFilter()` validates label images by object count, bounding boxes, centroids, physical size, perimeter, and shape metrics.

Files in this skill

  • SKILL.md3.3 KB
  • references/api-reference.md5.9 KB
  • references/filter-patterns.md6.8 KB
  • references/segmentation-recipes.md7.5 KB
  • references/troubleshooting.md5.4 KB
  • scripts/filter_segmentation_smoke.py7.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.