Module cryiorust::mar[][src]

Expand description

Mar345 format reader.

Only non-spiral compressed frames are supported.

Example usage:

use cryiorust::mar::Mar;
use cryiorust::frame::Frame;
use std::path::Path;

fn test_mar_read<P: AsRef<Path>>(path: P) {
    let testfile = path;
    let frame = Mar::read_file(testfile).unwrap();
    assert_eq!(frame.dim1(), 32, "dim1 != 32");
    assert_eq!(frame.dim2(), 32, "dim2 != 32");
    assert_eq!(frame.sum(), 17347273., "frame sum != 17347273.");
    assert_eq!(frame.max(), 10000000., "frame max != 10000000.");
    assert_eq!(frame.min(), 9., "frame min != 9.");
}

Structs

Main exported struct.