#cli #dicom #dump

bin+lib dicom-dump

A CLI tool for inspecting DICOM files

1 unstable release

0.5.0-rc.1 Nov 18, 2021

#1616 in Command line utilities

MIT/Apache

33KB
698 lines

DICOM-rs dump

CratesIO Documentation

A command line utility for inspecting the contents of DICOM files by printing them in a human readable format.

A programmatic API for dumping DICOM objects is also available.

This tool is part of the DICOM-rs project.

Usage

    dicom-dump [FLAGS] [OPTIONS] <file>

FLAGS:
    -h, --help             Prints help information
        --no-text-limit    whether text value width limit is disabled (limited to `width` by default)
    -V, --version          Prints version information

OPTIONS:
        --color <color>    color mode [default: auto]
    -w, --width <width>    the width of the display (default is to check automatically)

ARGS:
    <file>    The DICOM file to read

lib.rs:

DICOM data dumping library

This is a helper library for dumping the contents of DICOM objects and elements in a human readable way.

Examples

A quick and easy way to dump the contents of a DICOM object is via [dump_file] (or [dump_file_to] to print to an arbitrary writer).

use dicom::object::open_file;
use dicom_dump::dump_file;

let obj = open_file("path/to/file.dcm")?;
dump_file(&obj)?;
# Result::<(), Box<dyn std::error::Error>>::Ok(())

See the [DumpOptions] builder for additional dumping options.

use dicom::object::open_file;
use dicom_dump::{DumpOptions, dump_file};

let obj = open_file("path/to/file2.dcm")?;
let mut options = DumpOptions::new();
// dump to stdout (width = 100)
options.width(100).dump_file(&obj)?;
# Result::<(), Box<dyn std::error::Error>>::Ok(())

Dependencies

~12MB
~206K SLoC