From 77b8e7b3ccf58749f5915f85c2c1dd1a2af2691c Mon Sep 17 00:00:00 2001 From: Alan Race Date: Wed, 16 Nov 2022 15:34:07 +0100 Subject: [PATCH] Update to latest imc, where it is possible to load very large images --- Cargo.lock | 23 ++++++++++++++++++----- src/imc.rs | 6 +++--- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 45922fe..ca36b52 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -967,12 +967,12 @@ dependencies = [ [[package]] name = "calloop" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "595eb0438b3c6d262395fe30e6de9a61beb57ea56290b00a07f227fe6e20cbf2" +checksum = "5bcf530afb40e45e14440701e5e996d7fd139e84a912a4d83a8d6a0fb3e58663" dependencies = [ "log", - "nix 0.24.2", + "nix 0.25.0", "slotmap", "thiserror", "vec_map", @@ -2070,9 +2070,9 @@ dependencies = [ [[package]] name = "imc-rs" -version = "0.1.4" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f8ce66bc38749102bd7685fa5f3b95fc2f86214fbe92cd6d7107e183afbcdf4" +checksum = "2421a03ba38103619d038daa89baada2a8647d8b4a13ce82e50c8538d58d42cc" dependencies = [ "byteorder", "csv", @@ -2552,6 +2552,19 @@ dependencies = [ "memoffset", ] +[[package]] +name = "nix" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e322c04a9e3440c327fca7b6c8a63e6890a32fa2ad689db972425f07e0d22abb" +dependencies = [ + "autocfg", + "bitflags", + "cfg-if", + "libc", + "memoffset", +] + [[package]] name = "nohash-hasher" version = "0.2.0" diff --git a/src/imc.rs b/src/imc.rs index bcdd8ca..7c0730d 100644 --- a/src/imc.rs +++ b/src/imc.rs @@ -667,7 +667,7 @@ fn process_classifier_results( ); let pixel_annotation = commands - .spawn_bundle(SpriteBundle { + .spawn(SpriteBundle { transform: Transform::from_translation(Vec3::new( (-mcd_acquisition.width() as f32 * 0.5) + region.x as f32 @@ -1061,8 +1061,8 @@ fn load_imc( let image_task = thread_pool.spawn(async move { let image = panorama_image.as_rgba8()?; - let tile_width = 512; - let tile_height = 512; + let tile_width = 1024; + let tile_height = 1024; Ok(ToTileImage { image,