選項
首頁首頁 Skill 資料庫管理 dicom-series-preflight

dicom-series-preflight

NVIDIA/skills NVIDIA/skills

掃描 DICOM 系列資料夾,以擷取標頭元資料,並在不解碼像素資料的情況下產生預檢結果。

...展開全部
11
更新時間 2026-09-25

DICOM 系列預檢

目的

  • 用於在轉換或導入前,對單一 DICOM 系列資料夾進行僅限標頭的預檢。不適用於去識別化或臨床審核。
  • 請嚴格依照文件說明使用此封裝程式;請勿以手寫實作取代上游的入口點。
  • 清單 I/O:輸入參數為dicom_dir;輸出參數為preflight_json。

操作說明

  • 在變更參數、副作用或驗證條件之前,請先閱讀skill_manifest.yaml檔案。
  • 請透過下方文件中所述的指令執行scripts/preflight_series.py;將輸出結果保留在呼叫方提供的執行目錄中。
  • 若主機代理程式公開了run_script 功能,請使用run_script("scripts/preflight_series.py", args=[...]); 否則請執行下方所示的 Bash/Python 指令。
  • 在將執行結果視為證據之前,請檢查產出的 JSON 以及對應的驗證器指引。

可用腳本

腳本 用途 參數
scripts/preflight_series.py 由 skill_manifest.yaml 宣告的主要入口點。 DICOM 目錄路徑

先決條件

  • 執行時需求:runtime.side_effects.pip_packages 中列出的 Python 套件。
  • 除非下文現有段落另有說明,否則請從儲存庫根目錄執行指令。

限制

  • 僅處理圖頭;不會解碼像素資料,亦不會偵測燒錄的 PHI。
  • 標準方向閘值假設採用 LPS 衍生的 CT 軸代碼 L、P、S。
  • 針對壓縮傳輸語法(Compressed Transfer Syntax)和多幀實例會發出警告,但不會進行解碼。
  • 僅支援單一目錄掃描;不會在單一目錄樹中整合多個研究。
  • 不適用於臨床部署、法規要求的去識別化、自主診斷,以及未經審核之轉換器進行的生產環境匯入。

疑難排解

錯誤 原因 解決方法
缺少依賴項或匯入錯誤 執行階段套件與skill_manifest.yaml 內容不符。 請安裝 manifests 中宣告的套件,或使用文件中記載的設定指令。
輸出為空或架構無效 輸入路徑錯誤、不支援的模態,或上游處理失敗。 請使用已知測試環境重新執行,並檢查封裝 JSON 檔及標準錯誤輸出。
驗證關卡失敗 輸出違反了已宣告的工程不變式。 請保留失敗的證據包,並利用檢查點訊息來修復輸入資料或封裝程式碼。

掃描 DICOM目錄(每個資料夾對應一個系列),且不進行像素解碼。 輸出包含清單、方位軸碼、PHI 標誌、發現結果,以及 預檢結果(preflight.verdict)為「通過」、「警告」或「失敗」的 JSON 檔。

python scripts/preflight_series.py PATH_TO_DICOM_DIR

搭配verifiers/dicom_preflight_quality_v1使用,以建立可信的預檢套件:

make run-trusted SKILL=dicom_series_preflight \
  FIXTURE=skills/dicom-series-preflight/fixtures/clean_no_phi \
  OUT=runs/dicom_preflight_demo

旗艦工作流程:

make run-workflow \
  WORKFLOW=examples/workflows/dicom_preflight_gate.yaml \
  WORKFLOW_INPUT=skills/dicom-series-preflight/fixtures/clean_no_phi \
  WORKFLOW_OUT=runs/dicom_preflight_gate

不適用於去識別化、私有標籤審查或臨床核准。

在 GitHub 上查看
---
name: dicom-series-preflight
description: Scans a DICOM series folder to extract header metadata and produce a preflight verdict without decoding pixel data.
license: Apache-2.0
---

# DICOM Series Preflight

## Purpose
- Used for header-only preflight of one DICOM series folder before conversion or inference. Not for de-identification or clinical clearance.
- 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 `preflight_json`.

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

## Available Scripts
| Script | Purpose | Arguments |
|---|---|---|
| `scripts/preflight_series.py` | Primary entrypoint declared by skill_manifest.yaml. | `PATH_TO_DICOM_DIR` |

## 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
- Header-only; does not decode pixel data or detect burnt-in PHI.
- Canonical orientation gate assumes LPS-derived CT axcodes L,P,S.
- Compressed transfer syntax and multi-frame instances are warned, not decoded.
- Single-directory scan; does not reconcile multiple studies in one tree.
- Not for clinical deployment, regulatory de-identification, autonomous diagnosis, production ingestion without a vetted converter.

## 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. |

Scans a DICOM **directory** (one series per folder) without decoding pixels.
Emits JSON with inventory, orientation axcodes, PHI flags, findings, and a
`preflight.verdict` of `pass`, `warn`, or `fail`.

```bash
python scripts/preflight_series.py PATH_TO_DICOM_DIR
```

Pair with `verifiers/dicom_preflight_quality_v1` for a trusted preflight pack:

```bash
make run-trusted SKILL=dicom_series_preflight \
  FIXTURE=skills/dicom-series-preflight/fixtures/clean_no_phi \
  OUT=runs/dicom_preflight_demo
```

Flagship workflow:

```bash
make run-workflow \
  WORKFLOW=examples/workflows/dicom_preflight_gate.yaml \
  WORKFLOW_INPUT=skills/dicom-series-preflight/fixtures/clean_no_phi \
  WORKFLOW_OUT=runs/dicom_preflight_gate
```

Not for de-identification, private-tag review, or clinical clearance.

安裝 dicom-series-preflight

請下載並將技能檔案解壓縮至您的 .claude/skills/ 目錄中。

下載 ZIP

複製儲存庫並將技能檔案複製到您的專案中。

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

複製 複製
快速設定: 將技能資料夾複製到 .claude/skills/ Claude 會自動偵測並使用該技能
儲存庫 NVIDIA/skills

相關技能

microservices-patterns
更新時間 2026-06-29
jpa-patterns
更新時間 2026-06-30
fabric-lakehouse
更新時間 2026-06-30
prisma-expert
更新時間 2026-06-29
OR