File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1374,7 +1374,7 @@ def interest_points_registration(
13741374def duplicate_transformations (
13751375 project_path ,
13761376 transformation_type = "channel" ,
1377- channel_source = None ,
1377+ channel_source = 0 ,
13781378 tile_source = None ,
13791379 transformation_to_use = "[Replace all transformations]" ,
13801380):
@@ -1413,7 +1413,10 @@ def duplicate_transformations(
14131413 if transformation_type == "channel" :
14141414 apply = "[One channel to other channels]"
14151415 target = "[All Channels]"
1416- source = str (channel_source - 1 )
1416+ if channel_source > 0 :
1417+ source = str (channel_source - 1 )
1418+ else :
1419+ source = "0"
14171420 if tile_source :
14181421 tile_apply = "apply_to_tile=[Single tile (Select from List)] "
14191422 tile_process = "processing_tile=[tile " + str (tile_source ) + "] "
@@ -1423,13 +1426,13 @@ def duplicate_transformations(
14231426 apply = "[One tile to other tiles]"
14241427 target = "[All Tiles]"
14251428 source = str (tile_source )
1426- if channel_source :
1429+ if channel_source > 0 :
14271430 ch_apply = "apply_to_channel=[Single channel (Select from List)] "
14281431 ch_process = "processing_channel=[channel " + str (channel_source - 1 ) + "] "
14291432 else :
14301433 ch_apply = "apply_to_channel=[All channels] "
14311434 else :
1432- sys . exit ( "Issue with transformation duplication" )
1435+ raise ValueError ( "Invalid transformation type: %s" % transformation_type )
14331436
14341437 options = (
14351438 "apply="
You can’t perform that action at this time.
0 commit comments