diff --git a/pyproject.toml b/pyproject.toml index e970754..44eadf3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "maturin" [project] name = "ndbioimage" -version = "2027.0.0" +version = "2027.0.1" requires-python = ">=3.10" classifiers = [ "License :: OSI Approved :: MIT License", @@ -35,7 +35,7 @@ ndbioimage_generate_stub = "ndbioimage:ndbioimage_generate_stub" [tool.maturin] python-source = "py" -features = ["python", "bioformats_java", "tiffwrite"] +features = ["python", "bioformats_java", "tiffwrite", "czi"] module-name = "ndbioimage.ndbioimage_rs" include = ["py/ndbioimage/jassets/j4rs*", "py/ndbioimage/deps/libj4rs*"] diff --git a/src/readers/bioformats_java.rs b/src/readers/bioformats_java.rs index a44ba65..c81dd7e 100644 --- a/src/readers/bioformats_java.rs +++ b/src/readers/bioformats_java.rs @@ -106,11 +106,19 @@ fn jvm() -> Rc { Jvm::attach_thread().expect("Failed to attach to JVM") } else { *jvm_built = true; - JvmBuilder::new() + let j = JvmBuilder::new() .skip_setting_native_lib() .with_base_path(class_path.to_str().unwrap()) .build() - .expect("Failed to build JVM") + .expect("Failed to build JVM"); + if let Ok(e) = InvocationArg::try_from("ERROR") { + let _ = j.invoke_static( + "loci.common.DebugTools", + "setRootLevel", + &[e], + ); + } + j }) } }) @@ -484,7 +492,6 @@ impl Reader for BioFormatsJavaReader { where P: AsRef, { - DebugTools::set_root_level("ERROR")?; let mut path = path.as_ref().to_path_buf(); if path.is_dir() { let orig = path.clone(); @@ -562,7 +569,6 @@ impl Reader for BioFormatsJavaReader { where P: AsRef, { - DebugTools::set_root_level("ERROR")?; let mut path = path.as_ref().to_path_buf(); if path.is_dir() { let orig = path.clone();