Antspy

From VectorSpaceLab/AREX-Skill · View interactive version

Antspy is an AI agent skill from the GitHub repository VectorSpaceLab/AREX-Skill. Use ANTsPy/antspyx for medical image IO, ANTsImage metadata, image operations, registration, segmentation, visualization, and learning helper workflows.

How to use this skill

Skill file

ANTsPy Repo Skill

Use this repo skill when a task involves the Python package distributed as antspyx and imported as ants: medical image IO, ANTsImage objects, preprocessing, registration, transforms, segmentation, labels, plotting, interoperability, or ANTsPy learning/deeplearn helper utilities.

Start Here

  1. Install the package with pip install antspyx or conda install conda-forge::antspyx.
  2. Verify the public import with python -c "import ants; print(ants.__name__)".
  3. Run scripts/antspy_environment_check.py for a tiny import/API smoke check.
  4. Read references/package-overview.md for package scope, compiled-backend caveats, and workflow boundaries.
  5. Read references/troubleshooting.md when installation, import, compiled libraries, physical-space metadata, optional dependencies, or expensive algorithms fail.
  6. Check references/repo-provenance.md before deciding whether this skill is stale for a newer ANTsPy checkout.

Route by Task

| User task | Read |

| --- | --- |

| Create, read, write, clone, index, compare, or validate ants.ANTsImage objects and physical metadata | image-core |

| Smooth, denoise, mask, crop, pad, slice, resample, threshold, run iMath, compute image metrics, or use morphology | image-ops-math |

| Register images, apply transforms to images or points, inspect transform files, build templates, run motion correction, or compute Jacobians | registration-transforms |

| Run Atropos, k-means, Otsu, priors, joint label fusion, label stats, overlap, geometry, label matrices, centroids, or point images | segmentation-labels |

| Save plots headlessly, build overlays/grids/movies, handle RGB/vector channels, convert image lists/matrices, or interoperate with nibabel/SimpleITK | visualization-interop |

| Use sparse/eigen learning helpers, patch extraction/reconstruction, one-hot labels, random augmentation, simulated bias fields, or learning-oriented crop/pad helpers | learning-deeplearn |

Cross-Cutting Rules

Shared References and Scripts

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.