Generated banner for Dicom Series To Volume
Generated logo for Dicom Series To Volume

Dicom Series To Volume

NVIDIAOfficialCreated by NVIDIA MedTech Team

  • Skill
  • Workflow
  • Science and research
  • Apache-2.0
  • Medium risk
  • Has scripts

From the author

Used for converting one CT DICOM series folder to a HU NIfTI volume with affine evidence. Not for multi-frame DICOM or clinical use.
— the description by NVIDIA MedTech Team

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

  1. Download the skill as a ZIP:

    https://autogineer.com/agent-skills/nvidia/dicom-series-to-volume/download
  2. Unzip 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 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.

  • 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

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.

Files

BENCHMARK.md

Skill Benchmark: dicom-series-to-volume

✅ Overall verdict: PASS — Recommended for publication

Publication Recommendation

Recommended for publication based on the completed evaluation evidence in this report.

Evaluation Metadata

  • Skill: dicom-series-to-volume

  • Evaluation date: 2026-09-14

  • Evaluator version: 1.5.6

  • Agents: Claude Code (aws/anthropic/bedrock-claude-opus-4-8), Codex (openai/openai/gpt-5.5)

  • Tasks: 2 evaluation tasks (1 positive, 1 negative)

  • Dataset digest: sha256:bfacb419e825a1845f5733e67b39a317b761af0a12a5e2b640238ea1106733e4 (skill-evaluator-dataset-snapshot/1)

  • Attempts per task: 3

  • Environment: k8s-sandbox

  • Tier 2 evidence: required for publication

  • Tier 3 evidence: required for publication

Each task attempt ran in its own isolated sandbox pod.

What This Report Answers

The three-tier evaluation checks whether the skill:

  • is safe to use;

  • produces correct answers;

  • is discovered and activated when needed;

  • helps the agent complete the user's goal and expected workflow; and

  • avoids wasted skill and tool usage.

Results at a Glance

MeasureClaude Code (Baseline → Skill Uplift)Codex (Baseline → Skill Uplift)
Overall92.2% — baseline ran, but no comparable score was available; uplift unavailable91.5% — baseline ran, but no comparable score was available; uplift unavailable
Security100.0% → 100.0% (±0.0 points)50.0% → 100.0% (+50.0 points)
Correctness15.0% → 100.0% (+85.0 points)100.0% → 100.0% (±0.0 points)
Discoverability80.0% — baseline ran, but no comparable score was available; uplift unavailable80.0% — baseline ran, but no comparable score was available; uplift unavailable
Effectiveness31.9% → 97.5% (+65.6 points)80.0% → 96.3% (+16.3 points)
Efficiency83.4% — baseline ran, but no comparable score was available; uplift unavailable81.2% — baseline ran, but no comparable score was available; uplift unavailable

How to read this table: baseline is the same task attempted without the target skill. Scores are rounded to one decimal; threshold-adjacent values use additional precision so their displayed band matches the verdict. Uplift is derived from those displayed scores and shown in percentage points.

Example: 47.0% → 92.0% (+45.0 points) means the skill-assisted run scored 92.0%, 45.0 percentage points above its 47.0% no-skill baseline.

A partial dimension was calculated from only the available configured signals; review the detailed report before relying on it.

Token Usage

Actual Tier 3 execution usage is reported for every observed agent/case pair and both conditions.

AgentDataset caseWith skillWithout skillDeltaChangeCoverage
claude-codeAll cases743,428619,880N/AN/Askill 2/2; base 4/4
claude-codeconvert-ct-series-to-nifti713,513528,780N/AN/Askill 1/1; base 3/3
claude-codereject-mixed-series-assumption29,91591,100-61,185-67.16%skill 1/1; base 1/1
codexAll cases413,714547,620-133,906-24.45%skill 2/2; base 2/2
codexconvert-ct-series-to-nifti385,777525,096-139,319-26.53%skill 1/1; base 1/1
codexreject-mixed-series-assumption27,93722,524+5,413+24.03%skill 1/1; base 1/1
ALL AGENTSDataset aggregate1,157,1421,167,500N/AN/Askill 4/4; base 6/6

Prompt tokens include cached reads, so total tokens are prompt + completion (cached is not added twice). The Efficiency score uses (prompt - cached) + completion. N/A means the relevant trajectory counters were not available; coverage is never estimated.

Tier Status

TierPurposeStatusEvidence
Tier 1Static validationPASSED WITH OBSERVATIONS11 validator(s); 13 finding(s)
Tier 2Semantic deduplicationPASSED2 validator(s); 0 finding(s)
Tier 3Live agent evaluationPASS2 agent(s); 2 task(s)

Findings and Observations

<details> <summary>Show detailed findings and successful checks</summary>

  • MEDIUM SCHEMA/body_recommended_section: Missing recommended section: '## Examples' (skills/dicom-series-to-volume/SKILL.md)

  • MEDIUM SECURITY/Unknown (SDI-2): The skill extracts and emits DICOM metadata fields including StudyInstanceUID, SeriesInstanceUID, StudyDescription, Seri (scripts/series_to_volume.py:194)

  • MEDIUM SECURITY/Unknown (SQP-2): DICOM identifiers (StudyInstanceUID, SeriesInstanceUID) and sensitive study metadata (StudyDate, StudyDescription, Serie (scripts/series_to_volume.py:194)

  • MEDIUM SECURITY/Unknown (SSD-3): The code collects PHI-bearing DICOM header fields and prints them to stdout, accompanied by an inline comment that justi (scripts/series_to_volume.py:194)

  • LOW QUALITY/quality_reliability: Inputs are used but no dedicated Inputs section is documented (skills/dicom-series-to-volume/SKILL.md)

  • 8 additional finding(s) are available in the full evaluation artifacts.

</details>

Scoring Methodology

<details> <summary>Show dimension definitions, source signals, and thresholds</summary>

DimensionQuestionScored signals
SecurityIs it safe to use?security (100%)
CorrectnessIs the answer correct?accuracy (100%)
DiscoverabilityWas the right skill loaded when needed?skill_execution (100%)
EffectivenessDid the skill help complete the task?goal_accuracy (50%) + behavior_check (50%)
EfficiencyDid it avoid wasted tool calls and token usage?skill_efficiency (50%) + token_efficiency (50%)
  • Dimension bands: PASS at 50% or above; NEUTRAL from 40% to below 50%; FAIL below 40%.

  • Overall Tier 3 lift: PASS at +5 points or more; FAIL at -10 points or less; values between those bands are NEUTRAL.

  • Overall verdict: PASS only when every configured dimension passes for at least one supported agent. Lift is reported as diagnostic evidence and does not override this gate.

  • The 50% attempt pass threshold is a separate per-task gate; it is not the dimension pass threshold.

  • Effectiveness is the equal-weight mean of goal completion (goal_accuracy) and expected workflow adherence (behavior_check).

  • Efficiency is 50% tool-call productivity (the backward-compatible skill_efficiency wire id) and 50% token_efficiency. Positive-case skill routing is scored under Discoverability, not Efficiency; a negative case without a routing target is N/A. N/A sources are omitted, remaining weights are renormalized, and the dimension is marked partial.

Signals present in this run:

  • security (Security): unsafe operations, secret leakage, and unauthorized access.

  • skill_execution (Skill Execution): whether the expected skill was selected, decoys were avoided, and the workflow executed.

  • skill_efficiency (Tool Productivity): tool-call productivity (legacy wire id; routing is scored under Discoverability).

  • accuracy (Accuracy): final-answer correctness against the reference answer.

  • goal_accuracy (Goal Accuracy): whether the user's goal was achieved.

  • behavior_check (Behavior Check): whether the expected workflow behavior was followed.

  • token_efficiency (Token Efficiency): actual uncached prompt plus completion usage (50% of Efficiency).

</details>

Freshness

Regenerate this benchmark when the skill, evaluation dataset, target agent/model, evaluator version, environment, or scoring policy changes.

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