From 21f2f7b26770d7e2218f0a688bb64418c40cfbb2 Mon Sep 17 00:00:00 2001 From: William Silversmith Date: Mon, 11 Dec 2023 13:49:09 -0500 Subject: [PATCH] fix: crashing bug in CLI for contrast normalization --- igneous/task_creation/image.py | 4 +++- igneous_cli/cli.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/igneous/task_creation/image.py b/igneous/task_creation/image.py index 5711d4b..062653e 100644 --- a/igneous/task_creation/image.py +++ b/igneous/task_creation/image.py @@ -1120,11 +1120,13 @@ def create_contrast_normalization_tasks( dvol.info['scales'] = dvol.info['scales'][:mip+1] dvol.commit_info() + dvol.meta.unlock_mips(mip) + if bounds is None: bounds = srcvol.bounds.clone() if shape is None: - shape = Bbox( (0,0,0), (2048, 2048, 64) ) + shape = Bbox( (0,0,0), (2048, 2048, dvol.chunk_size.z) ) shape = shape.shrink_to_chunk_size(dvol.underlying).size3() shape = Vec.clamp(shape, (1,1,1), bounds.size3() ) diff --git a/igneous_cli/cli.py b/igneous_cli/cli.py index ef086da..b43dec1 100644 --- a/igneous_cli/cli.py +++ b/igneous_cli/cli.py @@ -528,7 +528,7 @@ def equalize( """(2) Apply histogram equalization to z-slices.""" if bounds_mip is None: bounds_mip = mip - bounds = compute_bounds(path, bounds_mip, xrange, yrange, zrange) + bounds = compute_bounds(src, bounds_mip, xrange, yrange, zrange) tasks = tc.create_contrast_normalization_tasks( src, dest, levels_path=None,