Crates.io | glf |
lib.rs | glf |
version | 0.2.1 |
source | src |
created_at | 2024-06-10 11:14:11.993562 |
updated_at | 2024-06-10 11:19:48.61026 |
description | A Rust Library to read the GLF files produced by the Tritech Sonar. |
homepage | https://github.com/onidaito/glf |
repository | https://github.com/onidaito/glf |
max_upload_size | |
id | 1266960 |
size | 32,775 |
A rust crate for reading GLF Files from Tritech Sonar.
Documentation is available at https://docs.rs/glf/0.2.0/glf/.
To build this crate, run:
cargo build
use std::path::Path;
use glf::GLF;
let glf = GLF::new(Path::new("./pytritech_testdata/test_tritech.glf")).unwrap();
println!("GLF Image 0: {}", glf.images[0].header.time);
let img = glf.extract_image(1).unwrap();
img.save("test.png").unwrap();
To test the crate, you'll need to download a submodule that contains the test data. It's a little large and so isn't included in the basic install. To perform a full checkout of this repository you can run:
git clone --recurse-submodules https://github.com/onidaito/glf
Or, if you've already checked out
git submodule update --init --recursive
From then on, one can run the usual cargo command:
cargo test