Crates.io | cryiorust |
lib.rs | cryiorust |
version | 0.6.0 |
source | src |
created_at | 2019-08-30 16:54:26.843571 |
updated_at | 2022-01-07 13:57:30.90293 |
description | Crystallographic IO API to read different detector formats |
homepage | https://soft.snbl.eu |
repository | https://git.3lp.cx/dyadkin/cryiorust |
max_upload_size | |
id | 160952 |
size | 135,566 |
Rust implementation of IO routines to read and write images produced by various 2D X-ray detectors.
Usage example:
use std::{io, fmt};
use cryiorust::frame::{self, Frame};
use std::path::Path;
fn test_cbf<P: AsRef<Path> + fmt::Debug>(path: P) -> io::Result<Box<dyn Frame>> {
let testfile = path;
let cbf: Box<dyn Frame> = frame::open(testfile)?;
println!("Frame size: {}x{}", cbf.dim1(), cbf.dim2());
println!("Frame sum: {}", cbf.sum());
Ok(cbf)
}
License: GPL-3.0+