Skip to main content

基于 MCP (Model Context Protocol) 的 DICOM 医学影像文件分析工具

Project description

DicomToolsForMCP

DicomToolsForMCP 是一个基于 MCP (Model Context Protocol) 的 DICOM 医学影像文件分析与上传工具。它提供了一整套命令行工具,用于处理、分析 DICOM 文件,并将其安全地上传到兼容 MCP 的服务器。

功能特性

  • DICOM 文件扫描与解析: 递归扫描指定目录,解析 DICOM 文件,并提取元数据。
  • 数据映射与预处理: 根据预定义的规则,将 DICOM 标签映射为 MCP 模型所需的数据结构。
  • 安全上传: 通过 Cookie 认证,将处理后的序列安全上传到服务器。
  • 状态查询: 实时查询已上传序列的处理状态。
  • 日志记录: 自动记录每次上传的详细信息(如 study_uid 和目录路径),方便后续追踪。

安装

您可以通过 pip 从 PyPI 安装此工具:

pip install DicomToolsForMCP

使用方法

该工具提供了一个名为 DicomToolsForMCP 的命令行入口。

1. 配置文件

在运行前,请确保您的项目根目录中包含一个 config.json 文件,用于配置服务器地址和认证信息。

config.json 示例:

{
  "base_url": "https://your-mcp-server.com",
  "cookie": "ls=your_session_cookie_here"
}

2. 运行主程序

通过以下命令启动主程序:

DicomToolsForMCP

程序将引导您完成以下操作:

  1. 选择要处理的 DICOM 文件目录。
  2. 自动扫描、解析并上传文件。
  3. 查询并显示上传结果。

依赖项

本项目依赖于以下 Python 包:

  • mcp>=0.9.0
  • pydicom>=2.4.0
  • requests>=2.31.0
  • pydantic>=2.0.0
  • tqdm>=4.66.0
  • pandas
  • pyorthanc

所有依赖项将在安装 DicomToolsForMCP 时自动安装。

许可证

本项目采用 MIT 许可证。详情请参阅 LICENSE 文件。

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dicomtoolsforseprate-1.0.3.tar.gz (110.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dicomtoolsforseprate-1.0.3-py3-none-any.whl (46.9 kB view details)

Uploaded Python 3

File details

Details for the file dicomtoolsforseprate-1.0.3.tar.gz.

File metadata

  • Download URL: dicomtoolsforseprate-1.0.3.tar.gz
  • Upload date:
  • Size: 110.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.18

File hashes

Hashes for dicomtoolsforseprate-1.0.3.tar.gz
Algorithm Hash digest
SHA256 e6bf4447bcbbec706eb987841e77dd618f53bdf41732f484229af51915fd39e5
MD5 cb7ca130e88b2610e1fbd26527d74b66
BLAKE2b-256 bbf0420b3a6d89b0d63dd683a0bc0bcfc0b76de8eae4fff7bebdd628a420a4e5

See more details on using hashes here.

File details

Details for the file dicomtoolsforseprate-1.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for dicomtoolsforseprate-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 77da466d9c9050ddb5fb55f29b9346e66b205ee8b13c6f837d6a4c32f22e1bdb
MD5 664746c34c20c8f61e8a732cdab94207
BLAKE2b-256 7793bd33cb9b258877ed6a98113c7923e5c0cd39b1441e66a4a86fafe0ca92e4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page