技能 pydicom
🏥

pydicom

安全 ⚡ 包含腳本📁 檔案系統存取

處理 DICOM 醫學影像檔案

也可從以下取得: davila7

處理 DICOM 醫學影像,包括 CT、MRI、X 光與超音波。可讀取、寫入、匿名化、轉換,並從醫療影像檔案中擷取中繼資料。

支援: Claude Codex Code(CC)
🥉 74 青銅
1

下載技能 ZIP

2

在 Claude 中上傳

前往 設定 → 功能 → 技能 → 上傳技能

3

開啟並開始使用

測試它

正在使用「pydicom」。 Read a DICOM file and show me the key patient and study information

預期結果:

  • Patient Name: Doe^John
  • Study Date: 20240115
  • Modality: CT
  • Image Size: 512x512 pixels
  • Body Part: CHEST

正在使用「pydicom」。 Convert a CT scan to a PNG image

預期結果:

  • Successfully converted to PNG
  • Applied windowing for CT display
  • Image saved with correct contrast

正在使用「pydicom」。 Anonymize this chest CT DICOM file

預期結果:

  • Removed 18 PHI tags
  • Patient name replaced with ANONYMOUS
  • Patient ID replaced with ANONYMOUS
  • Dates shifted to preserve anonymity

安全審計

安全
v4 • 1/17/2026

This is a documentation and guidance skill for the legitimate pydicom medical imaging library. All 253 static findings are false positives: the scanner misinterpreted markdown code formatting (triple backticks) as shell backtick execution, DICOM transfer syntax identifiers (JPEG, JPEG2000 compression) as weak cryptographic algorithms, and documentation reference URLs as hardcoded network endpoints. The Python scripts perform standard medical imaging operations (anonymize, convert, extract metadata) with no malicious intent, no network operations, and no credential access.

7
已掃描檔案
2,678
分析行數
2
發現項
4
審計總數
審計者: claude 查看審計歷史 →

品質評分

64
架構
90
可維護性
85
內容
22
社群
100
安全
91
規範符合性

你能建構什麼

準備影像資料集

匿名化病患識別資訊,並將 DICOM 檔案轉換以用於研究與機器學習流程。

轉換並匯出影像

從 DICOM 格式擷取並轉換醫療影像為標準影像格式以供報告使用。

建構影像處理管線

處理大量醫療影像資料,用於 AI 模型訓練與驗證。

試試這些提示

讀取 DICOM 檔案
Read a DICOM file and show me the patient name, study date, modality, and image dimensions.
轉換為 PNG
Convert a DICOM file to PNG format and normalize the pixel values for proper display.
匿名化 PHI
Anonymize a DICOM file by removing all patient health information including name, ID, and dates.
處理序列
Read all DICOM files from a directory, sort them by slice position, and create a 3D volume array.

最佳實務

  • 在分享醫療資料之前,務必確認匿名化完整性
  • 為 JPEG/JPEG2000 的 DICOM 檔案安裝壓縮處理器(pylibjpeg、gdcm)
  • 使用正確的窗位設定(VOI LUT)以正確顯示 CT 與 MRI 影像

避免

  • 未經適當醫療監督,勿將此技能用於臨床診斷
  • 未驗證所有 PHI 已移除前,勿分享匿名化資料
  • 勿假設所有 DICOM 檔案結構相同—請檢查可選標籤

常見問題

支援哪些 DICOM 模態?
支援所有成像模態,包括 CT、MRI、X 光、超音波、PET 與乳房攝影。
如何安裝壓縮處理器?
Run: uv pip install pylibjpeg pylibjpeg-libjpeg pylibjpeg-openjpeg python-gdcm
匿名化是可逆的嗎?
基本匿名化會以佔位值替換欄位。分享前請確認所有 PHI 已移除。
我可以處理多幀 DICOM 檔案嗎?
是的,對於影片或多幀 DICOM 檔案,可透過 pixel_array[index] 存取影格。
這會連線到醫院的 PACS 系統嗎?
不可以,此技能僅處理本機檔案,且不進行網路連線。
可以轉換成哪些影像格式?
輸出支援 PNG、JPEG、TIFF 與 BMP 格式。

開發者詳情

作者

K-Dense-AI

授權

https://github.com/pydicom/pydicom/blob/main/LICENSE

引用

main