Coder Social home page Coder Social logo

enet4 / dicom-rs Goto Github PK

View Code? Open in Web Editor NEW
398.0 13.0 74.0 5.2 MB

Rust implementation of the DICOM standard

Home Page: https://dicom-rs.github.io

License: Apache License 2.0

Rust 99.99% Shell 0.01%
dicom-standard rust dicom medical-imaging hacktoberfest

dicom-rs's Introduction

DICOM-rs

DICOM-rs on crates.io continuous integration Minimum Rust Version Stable dependency status DICOM-rs chat Documentation

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.

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.

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.

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

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.