From ce82be8f448492e66b27a7d900eb45465fc3db9b Mon Sep 17 00:00:00 2001 From: Lucille Delisle Date: Thu, 12 Oct 2023 15:31:46 +0200 Subject: [PATCH] raise error when identical identifiers --- tools/interactive/interactivetool_ilastik.xml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/tools/interactive/interactivetool_ilastik.xml b/tools/interactive/interactivetool_ilastik.xml index b7976c7ab72d..3c037ac1f387 100644 --- a/tools/interactive/interactivetool_ilastik.xml +++ b/tools/interactive/interactivetool_ilastik.xml @@ -13,6 +13,17 @@ 1] + #if len(duplicates) > 0: + #set unique_duplicates = list(set(duplicates)) + echo "Cannot run ilastik because these identifiers are present more than once:" && + #for label in $unique_duplicates: + echo $label && + #end for + exit 1 && + #end if export HOME=\$PWD && ## Make a copy of the existing project if exists #if str($input_type.existing) == "existing": @@ -21,7 +32,7 @@ ## Link input images to current working directory #for input in $infiles: - ln -s '$input' ./'$input.name' && + ln -s '$input' ./'$input.element_identifier'.tif && #end for ## Write the bash script to run: #if str($input_type.existing) == "new": @@ -80,8 +91,9 @@ This tool has been designed uniquely to make/modify a project. + - It requires that input images have unique identifiers. - When you have trained your project, save it and quit the application. The project called 'MyProject.ilp' will be imported into your history. - - If you want to modify a project, make sure you use at least the same images as the first time (but you can add more). + - If you want to modify a project, make sure you use at least the same images (with the same identifiers) as the first time (but you can add more). Please, check the documentation at https://www.ilastik.org/documentation/. ]]>