Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions src/imcflibs/imagej/bdv.py
Original file line number Diff line number Diff line change
Expand Up @@ -1374,7 +1374,7 @@ def interest_points_registration(
def duplicate_transformations(
project_path,
transformation_type="channel",
channel_source=None,
channel_source=0,
tile_source=None,
transformation_to_use="[Replace all transformations]",
):
Expand Down Expand Up @@ -1413,7 +1413,10 @@ def duplicate_transformations(
if transformation_type == "channel":
apply = "[One channel to other channels]"
target = "[All Channels]"
source = str(channel_source - 1)
if channel_source > 0:
source = str(channel_source - 1)
else:
source = "0"
if tile_source:
tile_apply = "apply_to_tile=[Single tile (Select from List)] "
tile_process = "processing_tile=[tile " + str(tile_source) + "] "
Expand All @@ -1423,13 +1426,13 @@ def duplicate_transformations(
apply = "[One tile to other tiles]"
target = "[All Tiles]"
source = str(tile_source)
if channel_source:
if channel_source > 0:
ch_apply = "apply_to_channel=[Single channel (Select from List)] "
ch_process = "processing_channel=[channel " + str(channel_source - 1) + "] "
else:
ch_apply = "apply_to_channel=[All channels] "
else:
sys.exit("Issue with transformation duplication")
raise ValueError("Invalid transformation type: %s" % transformation_type)

options = (
"apply="
Expand Down
Loading