Mercurial > repos > imgteam > superdsm
changeset 6:f1eb41d85b79 draft default tip
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/superdsm/ commit cf3fa4747320c93d82b715f4e7dcd6dbda7f2405
| author | imgteam |
|---|---|
| date | Mon, 02 Mar 2026 16:36:05 +0000 |
| parents | e284ea1fca25 |
| children | |
| files | superdsm.xml validators.xml |
| diffstat | 2 files changed, 68 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/superdsm.xml Mon Mar 02 14:53:09 2026 +0000 +++ b/superdsm.xml Mon Mar 02 16:36:05 2026 +0000 @@ -3,8 +3,9 @@ <macros> <import>creators.xml</import> <import>tests.xml</import> + <import>validators.xml</import> <token name="@TOOL_VERSION@">0.2.0</token> - <token name="@VERSION_SUFFIX@">3</token> + <token name="@VERSION_SUFFIX@">4</token> </macros> <creator> <expand macro="creators/bmcv"/> @@ -53,7 +54,7 @@ <requirement type="package" version="2024.12.30">imagecodecs</requirement> </requirements> - <command detect_errors="aggressive"> + <command detect_errors="exit_code"> <![CDATA[ python '$__tool_directory__/run-superdsm.py' '${dataset}' @@ -125,9 +126,18 @@ --> <environment_variable name="MKL_DEBUG_CPU_TYPE">5</environment_variable> + <!-- + Suppress warning that Ray Dashboard is not installed: + --> + <environment_variable name="RAY_DISABLE_IMPORT_WARNING">1</environment_variable> + </environment_variables> <inputs> - <param name="dataset" type="data" format="tiff,png" label="Dataset" /> + <param name="dataset" type="data" format="tiff,png" label="Dataset"> + <expand macro="validators/is_single_channel"/> + <expand macro="validators/is_single_frame"/> + <expand macro="validators/is_2d"/> + </param> <param argument="--global_energy_minimization_pruning" type="select" label="Graph pruning for global energy minimization" help="Exact graph pruning corresponds to the original algorithm, which provably yields globally optimal results. Robust graph pruning is more greedy and has a provably bounded approximation error. Depending on the data, this can be significantly faster than exact graph pruning, without degrading the segmentation or cluster splitting performance."> <option value="exact">Exact graph pruning (Kostrykin and Rohr, TPAMI 2023)</option> <option value="isbi24" selected="true">Robust graph pruning (Kostrykin and Rohr, ISBI 2024)</option>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/validators.xml Mon Mar 02 16:36:05 2026 +0000 @@ -0,0 +1,55 @@ +<macros> + + <!-- Macros for validation of inputs --> + + <xml name="validators/is_single_channel"> + <!-- + The OME-Zarr datatype in Galaxy is currently not derived from the Image datatype, and it does + hence not inherit the metadata fields like `channels`. To cope with that, we allow all datasets + except those where we *know* that they are *not* single-channel. + --> + <validator type="expression" message="Dataset is a multi-channel image" + ><![CDATA[getattr(value.metadata, "channels", None) in (None, '') or int(value.metadata.channels) < 2]]></validator> + </xml> + + <xml name="validators/is_single_frame"> + <!-- + The OME-Zarr datatype in Galaxy is currently not derived from the Image datatype, and it does + hence not inherit the metadata fields like `frames`. To cope with that, we allow all datasets + except those where we *know* that they are *not* single-frame. + --> + <validator type="expression" message="Dataset is a multi-frame image" + ><![CDATA[getattr(value.metadata, "frames", None) in (None, '') or int(value.metadata.frames) < 2]]></validator> + </xml> + + <xml name="validators/is_2d"> + <!-- + The OME-Zarr datatype in Galaxy is currently not derived from the Image datatype, and it does + hence not inherit the metadata fields like `depth`. To cope with that, we allow all datasets + except those where we *know* that they are *not* 2-D. + --> + <validator type="expression" message="Dataset is a 3-D image" + ><![CDATA[getattr(value.metadata, "depth", None) in (None, '') or int(value.metadata.depth) < 2]]></validator> + </xml> + + <xml name="validators/is_3d"> + <!-- + The OME-Zarr datatype in Galaxy is currently not derived from the Image datatype, and it does + hence not inherit the metadata fields like `depth`. To cope with that, we allow all datasets + except those where we *know* that they are *not* 3-D. + --> + <validator type="expression" message="Dataset is a 2-D image" + ><![CDATA[getattr(value.metadata, "depth", None) in (None, '') or int(value.metadata.depth) >= 2]]></validator> + </xml> + + <xml name="validators/is_binary"> + <!-- + The OME-Zarr datatype in Galaxy is currently not derived from the Image datatype, and it does + hence not inherit the metadata fields like `num_unique_values`. To cope with that, we allow all + datasets except those where we *know* that they are *not* binary. + --> + <validator type="expression" message="Dataset is not a binary image" + ><![CDATA[getattr(value.metadata, "num_unique_values", None) in (None, '') or int(value.metadata.num_unique_values) <= 2]]></validator> + </xml> + +</macros>
