Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mgeplf committed Jan 30, 2024
1 parent 8e2850e commit 3f83887
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions atlas_densities/app/combination.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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":
Expand Down

0 comments on commit 3f83887

Please sign in to comment.