Dicom Series To Volume
NVIDIAOfficialCreated by NVIDIA MedTech Team
- Skill
- Workflow
- Science and research
- Apache-2.0
- Medium risk
- Has scripts
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
The dicom-series-to-volume skill provides a programmatic interface to convert CT DICOM series into NIfTI format. It processes DICOM slices by sorting them based on patient position, applying rescale slope and intercept values to calculate Hounsfield Units, and constructing an affine matrix from header metadata. The output includes the NIfTI volume and a JSON summary containing technical details such as slice count, shape, spacing, and affine information. This tool is intended for research and development workflows and explicitly excludes clinical use, multi-frame DICOM, and compressed transfer syntaxes.
What it does
- Converts a single CT DICOM series folder into a NIfTI volume.
- Applies RescaleSlope and RescaleIntercept to generate Hounsfield Unit values.
- Constructs an affine matrix based on DICOM orientation and spacing tags.
- Generates a JSON summary file containing metadata about the conversion process.
- Supports integration with external verifiers for trusted execution.
- Validates input series before processing to ensure compatibility.
When to use it
- When preparing CT scan data for research-based image analysis or machine learning pipelines.
- When you need to extract NIfTI volumes from DICOM series while preserving affine evidence.
- When building automated research workflows that require consistent metadata output.
- When working in non-clinical environments where custom conversion scripts are acceptable.
Advantages
- Provides structured metadata output alongside the NIfTI volume.
- Integrates with validation gates to ensure output quality.
- Maintains affine consistency using updated library dependencies.
- Automates the sorting and scaling logic required for CT data.
Usage examples
- “Convert the CT DICOM series located in /data/scan_01 to a NIfTI file named output.nii.gz.”
- The agent executes the conversion script, resulting in a NIfTI volume and a JSON summary file in the specified path.
- “Run a trusted conversion of the DICOM series in /data/scan_01 using the built-in verifier.”
- The agent runs the trusted evaluation command, producing a validated output directory containing the NIfTI volume and verification logs.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/nvidia/dicom-series-to-volume/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip dicom-series-to-volume.zip -d .agents/skills
Documentation by NVIDIA MedTech Team
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 arenifti_volumeandresult_json.
Instructions
Read
skill_manifest.yamlbefore changing arguments, side effects, or validation gates.Run
scripts/series_to_volume.pythrough the documented command below; keep outputs under a caller-provided run directory.If a host agent exposes
run_script, userun_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_v1verifier before treating the run as evidence.
Available Scripts
| Script | Purpose | Arguments |
|---|---|---|
scripts/series_to_volume.py | Primary 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.NiBabel 5.4 or newer is required so extreme-oblique axes remain labeled consistently across reorientation.
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
| Error | Cause | Fix |
|---|---|---|
| Missing dependency or import error | Runtime package drift from skill_manifest.yaml. | Install the packages declared in the manifest or use the documented setup command. |
| Empty or schema-invalid output | Wrong input path, unsupported modality, or upstream failure. | Re-run with a known fixture and inspect the wrapper JSON plus stderr. |
| Validation gate failure | Output 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.gzFor 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_trustedKey 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.
Files
- ATTRIBUTION.mdAdded by AutoGineer937 B
- BENCHMARK.md7.4 KiB
- LICENSELicence file added by AutoGineer11.2 KiB
- SKILL.md3.6 KiB
- evals/evals.json1.5 KiB
- fixtures/generate_fixtures.pyScript5.6 KiB
- scripts/series_to_volume.pyScript9.1 KiB
- skill-card.md3.9 KiB
- skill.oms.sig5.7 KiB
- skill_manifest.yaml6.2 KiB
- tests/test_orientation_regression.pyScript2.4 KiB
- validators/output_schema.json2.1 KiB
skill.oms.sig
{"mediaType":"application/vnd.dev.sigstore.bundle.v0.3+json","verificationMaterial":{"x509CertificateChain":{"certificates":[{"rawBytes":"MIICgzCCAgmgAwIBAgIUKIyS7SxNteQIiWzK1dWj85E6520wCgYIKoZIzj0EAwMwVTELMAkGA1UEBhMCVVMxGzAZBgNVBAoMEk5WSURJQSBDb3Jwb3JhdGlvbjEpMCcGA1UEAwwgTlZJRElBIEFnZW50IENhcGFiaWxpdGllcyBJQ0EgMDEwHhcNMjYwNDAxMDAwMDAwWhcNMjgwNDIyMTUzMzA5WjBUMQswCQYDVQQGEwJVUzEbMBkGA1UECgwSTlZJRElBIENvcnBvcmF0aW9uMSgwJgYDVQQDDB9OVklESUEgQWdlbnQgU2tpbGxzIFNpZ25pbmcgMDAxMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEYoRM9bQl/dGlwSRNi6bTpIJUXH8Nv9GciP6LSflJYYMLCc296kpyuTSsk5ddbAWiDcFX3C/ydX3jwc+qCLYP6uHy9XphyLjOQ27Yb2J6rBLVtRBS1mgGco/Gr7fL6ODco4GaMIGXMB0GA1UdDgQWBBRQ/5ZW3nJ6lmo9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3ZGM1NDgwMmExNTBjNmM4MzdjYWUyYzQzZmI4ODg5Mjg0YzdmZDUyN2RmNWY3Yzg4NTBhOTBlNmIyMCIsCiAgICAgICAgImFsZ29yaXRobSI6ICJzaGEyNTYiLAogICAgICAgICJuYW1lIjogInZhbGlkYXRvcnMvb3V0cHV0X3NjaGVtYS5qc29uIgogICAgICB9CiAgICBdLAogICAgInNlcmlhbGl6YXRpb24iOiB7CiAgICAgICJtZXRob2QiOiAiZmlsZXMiLAogICAgICAiYWxsb3dfc3ltbGlua3MiOiBmYWxzZSwKICAgICAgImhhc2hfdHlwZSI6ICJzaGEyNTYiLAogICAgICAiaWdub3JlX3BhdGhzIjogWwogICAgICAgICIuZ2l0aHViIiwKICAgICAgICAiLmdpdGlnbm9yZSIsCiAgICAgICAgIi5naXQiLAogICAgICAgICIuZ2l0YXR0cmlidXRlcyIKICAgICAgXQogICAgfQogIH0KfQ==","payloadType":"application/vnd.in-toto+json","signatures":[{"sig":"MGUCMBZUqBWeJsFWMrU3ylySHJg9J0i9jI6aFbXrgfiFgoubuyUrQL97hjUKH2Di1RlqyAIxAIRA4xB0fDuWqb8vJjn49AqkWqhdyWEjvz0OBhI4QP34jJwwyK8peLMqy9HVdEppNw==","keyid":""}]}}Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Declares allowed tools, Needs Python
Security
What our scanner noticed· Medium risk
- Large base64-encoded blobs
- Scripts that your agent may run
This skill includes scripts that your agent may run. Read them before you use it.
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- NVIDIA MedTech Team
- Publisher
- NVIDIA (Official)
- Source
- NVIDIA/skills · skills/dicom-series-to-volume · commit fce3cca
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE-APACHE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by NVIDIA MedTech Team or NVIDIA.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download dicom-series-to-volume.zip