百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
D

dicom-rs

> 编程语言
开源

Rust 对 DICOM 标准的实现

552 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

Rust 对 DICOM 标准的实现

DICOM-rs

An ecosystem of library and tools for DICOM compliant systems.

This collection provides a pure Rust implementation of the DICOM standard, allowing users to work with DICOM objects and interact with DICOM applications, while aiming to be fast, safe, and intuitive to use.

Components

Library

The following library packages are designed to be used in other Rust libraries and applications.

  • object provides a high-level abstraction of DICOM objects and functions for reading and writing DICOM files.
  • pixeldata enables the decoding and conversion of DICOM objects into usable imaging data structures, such as images and multidimensional arrays.
  • dump provides helpful routines for dumping the contents of DICOM objects.
  • json provides serialization and deserialization to DICOM JSON.
  • ul implements the DICOM upper layer protocol.
  • dictionary-std contains a Rust definition of the standard data dictionary.
  • transfer-syntax-registry contains a registry of transfer syntax specifications.
  • parser provides a middle-level abstraction for the parsing and printing of DICOM data sets.
  • encoding contains DICOM data encoding and decoding primitives.
  • core represents all of the base traits, data structures and functions related to DICOM content.

Using as a library

The parent crate dicom aggregates the key components of the full library, so it can be added to a project as an alternative to selectively grabbing the components that you need.

Generally, most projects would add dicom_object, which is the most usable crate for reading DICOM objects from a file or a similar source. This crate is available in dicom::object. For working with the imaging data of a DICOM object, add pixeldata. Network capabilities may be constructed on top of ul.

A simple example of use follows. For more details, please visit the dicom documentation.

rust
use dicom::object::open_file;
use dicom::dictionary_std::tags;

let obj = open_file("0001.dcm")?;
let patient_name = obj.element(tags::PATIENT_NAME)?.to_str()?;
let modality = obj.element(tags::MODALITY)?.to_str()?;

Tools

The project also comprises an assortment of command line tools.

  • dump, aside from being a library, is also a command-line application for inspecting DICOM files.
  • scpproxy implements a Proxy service class provider.
  • echoscu implements a Verification service class user.
  • findscu implements a Find service class user.
  • storescu implements a Storage service class user.
  • storescp implements a Storage service class provider.
  • toimage lets you convert a DICOM file into an image file.
  • fromimage lets you replace the imaging data of a DICOM file with one from an image file.
  • pixeldata also includes dicom-transcode, which lets you transcode DICOM files to other transfer syntaxes.

Development tools

  • dictionary-builder is an independent application that generates code and other data structures for a DICOM standard dictionary.

Building

You can use Cargo to build all crates in the repository.

bash
cargo build

Other than the parts needed to build a pure Rust project, no other development dependencies are necessary unless certain extensions are included via Cargo features. Consult each crate for guidelines on selecting features to suit your needs.

Minimum Supported Rust version

DICOM-rs currently provides partial MSRV guarantees, defined by the following rules:

  • The minimum supported Rust version required to build library crates with default features is 1.85.0.
  • For any other cases, namely building the tool/binary crates or including extra features, only the latest stable toolchain is guaranteed to build.

As of 2026-03-28, version 1.88.0 can build the full project, though this is not prescriptive and is subject to change over time. Prefer using the latest stable toolchain whenever possible.

Roadmap & Contributing

This project is under active development.

Your feedback during the development of these solutions is welcome. Please see the wiki for additional guidelines related to the project's roadmap. See also the contributor guidelines and the project's Code of Conduct.

License

Licensed under either of

  • Apache License, Version 2.0, (LICENSE-APACHE or )
  • MIT license (LICENSE-MIT or )

at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rustdicomdicom-standardhacktoberfestmedical-imaging

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言