オプション
家家 Skill データベース管理 dicom-metadata-extract

dicom-metadata-extract

NVIDIA/skills NVIDIA/skills

DICOMファイルから選択されたメタデータを抽出し、標準タグに含まれるPHIの有無をフラグ付けします。匿名化や臨床用途には使用できません。

...すべて拡張します
10
更新された時間 2026年9月25日

DICOMメタデータの抽出

目的

  • 1つのDICOMファイルから選択されたメタデータを抽出し、標準タグ「PHI」の有無をフラグ付けするために使用されます。匿名化や臨床用途には使用しないでください。
  • ドキュメントに記載されている通りにラッパーを使用してください。上流のエントリポイントを独自の実装で置き換えないでください。
  • マニフェストの入出力:入力は dicom_path;出力は metadata_json.

使用方法

  • Read skill_manifest.yaml 引数、副作用、または検証ゲートを変更する前に、必ずお読みください。
  • 以下のドキュメント化されたコマンドを実行してください。出力は、呼び出し元が指定した実行ディレクトリに保存 scripts/extract_metadata.py 以下のドキュメントに記載されたコマンドを実行し、出力は呼び出し元が指定した実行ディレクトリに保存してください。
  • ホストエージェントが run_scriptを公開している場合は、 run_script("scripts/extract_metadata.py", args=[...])を使用してください。そうでない場合は、以下に示す Bash/Python コマンドを実行してください。
  • 出力された JSON を確認し、 medagent.verifiers.dicom_metadata_quality_v1 を実行してから、その実行結果を「レビュー済み証拠」として扱ってください。

利用可能なスクリプト

スクリプト 目的 引数
scripts/extract_metadata.py skill_manifest.yaml で宣言されたプライマリエントリポイント。 PATH_TO_DICOM [--output OUT.json]

前提条件

  • 実行時の要件: runtime.side_effects.pip_packages.
  • 以下の既存のセクションで特に指定がない限り、リポジトリのルートディレクトリからコマンドを実行します。

制限事項

  • PS3.15 に準拠した、ごく一部の標準タグのみに対応しています。Basic Application Confidentiality Profile の完全な実装ではありません。
  • プライベートタグはチェックされません
  • 焼き付きピクセル PHI は検出されません
  • マルチフレームの処理は最小限
  • 臨床現場での導入、規制上の匿名化、自律的な診断、患者向けでの使用には適していません。

トラブルシューティング

エラー 原因 修正方法
依存関係の欠落またはインポートエラー 実行時のパッケージのドリフト skill_manifest.yaml. マニフェストで宣言されているパッケージをインストールするか、ドキュメントに記載されているセットアップコマンドを使用してください。
出力が空であるか、スキーマに違反している 入力パスが間違っている、サポートされていないモダリティ、またはアップストリームの失敗。 正常に動作することが確認済みのフィクスチャを使用して再実行し、ラッパーの JSON および stderr を確認してください。
検証ゲートの失敗 出力が宣言されたエンジニアリング不変条件に違反しました。 失敗したエビデンスパックを保持し、ゲートメッセージを参照して入力またはラッパーコードを修正してください。

pydicom を使用して 1 つの DICOM ファイルを読み込み、stdout に JSON を出力します。

python scripts/extract_metadata.py PATH_TO_DICOM
python scripts/extract_metadata.py PATH_TO_DICOM --output result.json

出力には、 transfer_syntax, modality、グループ化されたスタディ/シリーズ/画像 メタデータ、 phi_present、および phi_tags_found.

これを、Medical AI Skills スキルの最小限のエンドツーエンドの例として使用してください。 匿名化、プライベートタグのレビュー、ピクセル単位の PHI 検出、または臨床的 解釈には使用しないでください。

2回目のエビデンスレビューを行うには、信頼性の高い実行を生成してください:

python -m eval_engine.run_trusted skills/dicom-metadata-extract \
  --fixture skills/dicom-metadata-extract/fixtures/sample_ct.dcm \
  --out runs/dicom_metadata_trusted
GitHubで見る
---
name: dicom-metadata-extract
description: Extracts selected metadata from a DICOM file and flags standard-tag PHI presence. Not for anonymization or clinical use.
license: Apache-2.0
---

# DICOM Metadata Extract

## Purpose
- Used for extracting selected metadata from one DICOM file and flagging standard-tag PHI presence. Not for anonymization 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_path`; outputs are `metadata_json`.

## Instructions
- Read `skill_manifest.yaml` before changing arguments, side effects, or validation gates.
- Run `scripts/extract_metadata.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/extract_metadata.py", args=[...])`; otherwise run the Bash/Python command shown below.
- Check the emitted JSON and run `medagent.verifiers.dicom_metadata_quality_v1` on evidence packs before treating the run as reviewed evidence.

## Available Scripts
| Script | Purpose | Arguments |
|---|---|---|
| `scripts/extract_metadata.py` | Primary entrypoint declared by skill_manifest.yaml. | `PATH_TO_DICOM [--output OUT.json]` |

## 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
- Small PS3.15-inspired standard-tag subset only; not a complete Basic Application Confidentiality Profile implementation.
- Private tags not checked
- Burnt-in pixel PHI not detected
- Multi-frame handling minimal
- Not for clinical deployment, regulatory de-identification, autonomous diagnosis, patient-facing use.

## 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 file with pydicom and emits JSON on stdout.

```bash
python scripts/extract_metadata.py PATH_TO_DICOM
python scripts/extract_metadata.py PATH_TO_DICOM --output result.json
```

Output includes `transfer_syntax`, `modality`, grouped study/series/image
metadata, `phi_present`, and `phi_tags_found`.

Use this as the smallest end-to-end example of a Medical AI Skills skill. Do not use
it for anonymization, private-tag review, pixel PHI detection, or clinical
interpretation.

For second-pass evidence review, generate a trusted run:

```bash
python -m eval_engine.run_trusted skills/dicom-metadata-extract \
  --fixture skills/dicom-metadata-extract/fixtures/sample_ct.dcm \
  --out runs/dicom_metadata_trusted
```

dicom-metadata-extractをインストール

スキルファイルをダウンロードし、.claude/skills/ ディレクトリに解凍してください。

ZIPをダウンロード

リポジトリをクローンし、スキルファイルをプロジェクトにコピーしてください。

git clone https://github.com/NVIDIA/skills/tree/main/skills/dicom-metadata-extract # Copy SKILL.md to your .claude/skills/ directory

コピー コピー
クイックセットアップ: スキルフォルダを .claude/skills/ にコピーしてください。 Claude が自動的にそのスキルを検出して使用します。
リポジトリ NVIDIA/skills

関連スキル

microservices-patterns
更新された時間 2026年6月29日
jpa-patterns
更新された時間 2026年6月30日
fabric-lakehouse
更新された時間 2026年6月30日
prisma-expert
更新された時間 2026年6月29日
OR