executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
torchioUse TorchIO 2.0 for medical image loading, preprocessing, augmentation, patch-based training/inference, CLI conversion, and I/O troubleshooting.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this skill when working with TorchIO, a PyTorch-oriented library for 3D medical image loading, preprocessing, augmentation, patch sampling, dense inference, and command-line image utilities.
import torchio as tio
print(tio.__version__)
Flip, Affine, Noise, Motion, BiasField, Spike, and Ghosting instead of old Random* class names.tio.ScalarImage(tensor) or tio.LabelMap(tensor) using 4D (C, I, J, K) tensors.Image, ScalarImage, LabelMap, Subject/Study, affines, points, bounding boxes, lazy/eager source handling, saving, and source-shape errors.Compose, OneOf, SomeOf, include/exclude routing, per-instance batches, history/inverse behavior, and MONAI/Cornucopia adapters.GridSampler, UniformSampler, WeightedSampler, LabelSampler, Queue, SubjectsLoader, PatchLocation, and PatchAggregator.torchio console entry point, info, convert, transform, cache, plotting/animation, NIfTI-Zarr, cloud/remote extras, and cache/download caveats.Run the nearest bundled script after installing TorchIO and its base dependencies:
python sub-skills/data-model/scripts/data_model_smoke.py
python sub-skills/transforms/scripts/transform_history_smoke.py
python sub-skills/transforms/scripts/include_exclude_smoke.py
python sub-skills/patch-workflows/scripts/patch_workflow_smoke.py
python sub-skills/cli-and-io/scripts/torchio_cli_smoke.py --print-only
Use full CLI smoke only when local temporary file creation and NIfTI conversion are acceptable:
python sub-skills/cli-and-io/scripts/torchio_cli_smoke.py
torch, nibabel, SimpleITK, numpy, tyro, fsspec[http], and TorchIO core APIs.plot for Matplotlib visualization, video for GIF/MP4 animation, monai and cornucopia for transform adapters, zarr for NIfTI-Zarr, and cloud extras for s3, azure, or gcs remote storage.ScalarImage for continuous intensity data and LabelMap for masks/segmentations so spatial transforms use correct interpolation.Subject to keep multiple images and metadata aligned through transforms and patch sampling.include/exclude transform arguments when only some image keys should change.GridSampler plus PatchAggregator for dense inference; use Queue plus random samplers for stochastic patch training.