region_quadtree

Crates.ioregion_quadtree
lib.rsregion_quadtree
version0.1.0
sourcesrc
created_at2023-12-21 20:32:43.357188
updated_at2023-12-21 20:32:43.357188
descriptionA lightweight Region Quadtree
homepage
repositoryhttps://github.com/juaquin456/Region-QuadTree.git
max_upload_size
id1077492
size61,230
Juaquin Remon Flores (juaquin456)

documentation

README

Region Quadtree

This is a lightweight implementation of a Region Quadtree in Rust. It is a static structure to represent an image.

Usage

use region_quadtree::region_qt::RegionQt;

fn main() {
    let mut tree = RegionQt::new();
    
    // build a region quadtree with dimensions and data given the image path
    tree.build("img/GH.png");
    
    // plot the original and draw each line that divide a quadrant
    tree.plot();
    
    // save to file a bincode encode of the tree struct
    tree.write("GH_qt.bin");
}

You can use the from_file method to read the bincode file

let mut tree = RegionQt::from_file("GH_qt.bin");

Plot

Commit count: 23

cargo fmt