AGENT SKILL

filtering-segmentation

Apply SimpleITK filters for smoothing, thresholding, morphology, segmentation, N4 bias correction, and label-statistics validation.

License 许可
Apache-2.0
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

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

02 资源文件 5

03 SKILL.md 正文

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.
  • For source image generators, dimensional parameter vectors, event/progress callbacks, and reusable filter-object templates, use filter-patterns.
  • For Otsu/manual thresholding, connected/confidence connected region growing, fast marching, N4 correction, and label-statistics validation, use segmentation-recipes.
  • For representative Python signatures, defaults, and compact examples for smoothing, thresholding, segmentation, N4, and statistics filters, use api-reference.
  • For pixel type and dimension errors, seed or mask mistakes, expensive filters, validation surprises, and accidental viewer calls, use troubleshooting.
  • To check a local install with tiny synthetic images and no file IO or viewer, run filter_segmentation_smoke.py.

Boundary Notes

  • Use the sibling io-and-data sub-skill for ReadImage, WriteImage, DICOM discovery, ImageIO choices, and transform file IO.
  • Use the sibling image-core sub-skill for pixel ID selection, image dimensions, spacing/origin/direction, metadata, and array/image conversion fundamentals.
  • Use the sibling registration-transforms 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.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-triton-opt

Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-solve

END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-skill

PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-pattern-fusion

Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-orchestrate

Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-feedback

Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).

★ 351