From 3f838874452ec9e61f8b70b0411a36b14c544355 Mon Sep 17 00:00:00 2001 From: Mike Gevaert Date: Tue, 30 Jan 2024 16:07:58 +0100 Subject: [PATCH] comments --- atlas_densities/app/combination.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/atlas_densities/app/combination.py b/atlas_densities/app/combination.py index 681bf9c..723a341 100644 --- a/atlas_densities/app/combination.py +++ b/atlas_densities/app/combination.py @@ -265,7 +265,7 @@ def parse_args(self, ctx, args): @click.option("--output-path", required=True, help="Path of the nrrd file to write") @click.option("--add", multiple=True, type=EXISTING_FILE_PATH, help="Add nrrd file to base-nrrd") @click.option( - "--subtract", multiple=True, type=EXISTING_FILE_PATH, help="Add nrrd file to base-nrrd" + "--subtract", multiple=True, type=EXISTING_FILE_PATH, help="Subtract nrrd file to base-nrrd" ) @click.option( "--clip", is_flag=True, default=False, help="Clip volume after each addition / subtraction" @@ -285,12 +285,14 @@ def manipulate(base_nrrd, clip, add, subtract, output_path): # pylint: disable= L.debug("Loading base NRRD: %s", base_nrrd) combined = voxcell.VoxelData.load_nrrd(base_nrrd) - # to `assert_properties`, all volumes have to be in a list, so we temporarily add the base_nrrd - volumes.append(combined) - assert_properties(volumes) + assert_properties( + [ + combined, + ] + + volumes + ) - volumes.pop() for operation, volume, path in zip(operations, volumes, paths): L.debug("%s with %s", operation, path) if operation == "add":