New to Claude Skills? Learn how to install them →

nvidia on GitHub

DICOM Series to Volume

OfficialFree

Convert CT DICOM series to NIfTI volumes easily.

by nvidia2.8k stars on nvidia/skills
1 views
Updated Aug 7, 2026
Get this skill

Free · Opens the source repo

What DICOM Series to Volume does

The DICOM Series to Volume skill is designed specifically for converting a single CT DICOM series folder into a HU NIfTI volume, complete with affine evidence. This skill is not intended for multi-frame DICOM files or clinical applications, making it ideal for developers and researchers working with single-series CT data who need to prepare their data for further analysis or processing. By utilizing this skill, users can streamline their workflow when dealing with DICOM files, ensuring that the output is in the NIfTI format commonly used in medical imaging research.

The skill operates by reading the DICOM series, sorting the slices according to the ImagePositionPatient attribute, and applying the necessary transformations using RescaleSlope and RescaleIntercept. It constructs an affine transformation based on the orientation and spacing tags found in the DICOM headers, ensuring that the resulting NIfTI file maintains the correct spatial relationships. The output consists of a .nii.gz file and a JSON summary that includes key metadata such as the number of slices and the affine transformation parameters.

Installation and usage are straightforward, with clear instructions provided in the skill's documentation. Users must ensure they follow the guidelines for input paths and output specifications to avoid common pitfalls, such as unsupported modalities or schema validation errors. The skill is particularly useful for those in academic or research settings where single-series CT data is prevalent and requires conversion for further analysis, such as segmentation or visualization tasks.

However, it is important to note the limitations of this skill. It does not support multi-series input, multi-frame DICOM files, or compressed transfer syntaxes. Additionally, it is not suitable for clinical deployment or any regulatory submissions, which require a more robust and vetted conversion process. Users should consider these factors when deciding whether this skill meets their needs.

When to use it

Use this skill when you need to convert a single CT DICOM series for research or analysis purposes.

When not to use it

Avoid using this skill for clinical applications or when working with multi-frame DICOM files.

What you can build with it

Research Data Preparation

Prepare single-series CT DICOM data for analysis by converting it to NIfTI format, facilitating easier manipulation and visualization.

Image Processing Pipeline Integration

Integrate the conversion skill into a larger image processing pipeline where NIfTI volumes are required for further analysis.

Educational Use in Medical Imaging

Utilize the skill in academic settings to teach students about DICOM file handling and NIfTI format conversions.

How to install DICOM Series to Volume

View source

1. Install with the skills CLI

npx skills add nvidia/skills/dicom-series-to-volume --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by nvidia

dicom_series_to_volume

Purpose

  • Used for converting one CT DICOM series folder to a HU NIfTI volume with affine evidence. Not for multi-frame DICOM or clinical use.
  • Use the wrapper exactly as documented; do not replace the upstream entrypoint with a handwritten implementation.
  • Manifest I/O: inputs are dicom_dir; outputs are nifti_volume and result_json.

Instructions

  • Read skill_manifest.yaml before changing arguments, side effects, or validation gates.
  • Run scripts/series_to_volume.py through the documented command below; keep outputs under a caller-provided run directory.
  • If a host agent exposes run_script, use run_script("scripts/series_to_volume.py", args=[...]); otherwise run the Bash/Python command shown below.
  • Check the emitted JSON and the paired dicom_volume_quality_v1 verifier before treating the run as evidence.

Available Scripts

ScriptPurposeArguments
scripts/series_to_volume.pyPrimary entrypoint declared by skill_manifest.yaml.PATH_TO_DICOM_DIR [--output OUT.nii.gz]

Prerequisites

  • Runtime requirements: Python packages listed in runtime.side_effects.pip_packages.
  • Run commands from the repository root unless an existing section below says otherwise.

Limitations

  • Single-series only; multi-series input is rejected at preflight.
  • Multi-frame DICOM (NumberOfFrames > 1 per file) not supported.
  • Compressed transfer syntaxes (JPEG / JPEG2000 / RLE) not supported.
  • No voxel reorientation. The affine is derived from DICOM headers and represented in NIfTI/RAS coordinates; a downstream gate (e.g. expected_axcodes) is expected to assert orientation before this volume is fed to a segmentation model.
  • Not for clinical deployment, autonomous diagnosis, regulatory submission, production inference (use a vetted converter such as dcm2niix for that).

Troubleshooting

ErrorCauseFix
Missing dependency or import errorRuntime package drift from skill_manifest.yaml.Install the packages declared in the manifest or use the documented setup command.
Empty or schema-invalid outputWrong input path, unsupported modality, or upstream failure.Re-run with a known fixture and inspect the wrapper JSON plus stderr.
Validation gate failureOutput violated a declared engineering invariant.Keep the failed evidence pack and use the gate message to repair inputs or wrapper code.

Reads one DICOM series, sorts slices by ImagePositionPatient, applies RescaleSlope and RescaleIntercept, builds an affine from orientation and spacing tags, and writes a .nii.gz plus JSON summary.

python scripts/series_to_volume.py PATH_TO_DICOM_DIR --output PATH_TO_OUT.nii.gz

For a trusted run with the paired verifier:

python -m eval_engine.run_trusted skills/dicom-series-to-volume \
  --fixture PATH_TO_DICOM_DIR \
  --out runs/dicom_series_to_volume_trusted

Key output fields: n_slices, series_instance_uid, output.path, output.shape, output.spacing, output.axcodes, output.affine, hu_range, and runtime.conversion_seconds.

Scope limits: single-series CT only; no multi-frame DICOM, compressed transfer syntax handling, RT structure sets, auto-reorientation, or clinical use.

Frequently asked questions about DICOM Series to Volume

Similar skills