comparison validators.xml @ 4:8f0dd9a58ec3 draft default tip

planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/binary2labelimage/ commit f5a4de7535e433e3b0e96e0694e481b6643a54f8
author imgteam
date Sat, 03 Jan 2026 14:14:05 +0000
parents
children
comparison
equal deleted inserted replaced
3:a041e4e9d449 4:8f0dd9a58ec3
1 <macros>
2
3 <!-- Macros for validation of inputs -->
4
5 <xml name="validators/is_single_channel">
6 <!--
7 The OME-Zarr datatype in Galaxy is currently not derived from the Image datatype, and it does
8 hence not inherit the metadata fields like `channels`. To cope with that, we allow all datasets
9 except those where we *know* that they are *not* single-channel.
10 -->
11 <validator type="expression" message="Dataset is a multi-channel image"
12 ><![CDATA[getattr(value.metadata, "channels", None) in (None, '') or int(value.metadata.channels) < 2]]></validator>
13 </xml>
14
15 <xml name="validators/is_single_frame">
16 <!--
17 The OME-Zarr datatype in Galaxy is currently not derived from the Image datatype, and it does
18 hence not inherit the metadata fields like `frames`. To cope with that, we allow all datasets
19 except those where we *know* that they are *not* single-frame.
20 -->
21 <validator type="expression" message="Dataset is a multi-frame image"
22 ><![CDATA[getattr(value.metadata, "frames", None) in (None, '') or int(value.metadata.frames) < 2]]></validator>
23 </xml>
24
25 <xml name="validators/is_2d">
26 <!--
27 The OME-Zarr datatype in Galaxy is currently not derived from the Image datatype, and it does
28 hence not inherit the metadata fields like `depth`. To cope with that, we allow all datasets
29 except those where we *know* that they are *not* 2-D.
30 -->
31 <validator type="expression" message="Dataset is a 3-D image"
32 ><![CDATA[getattr(value.metadata, "depth", None) in (None, '') or int(value.metadata.depth) < 2]]></validator>
33 </xml>
34
35 <xml name="validators/is_binary">
36 <!--
37 The OME-Zarr datatype in Galaxy is currently not derived from the Image datatype, and it does
38 hence not inherit the metadata fields like `num_unique_values`. To cope with that, we allow all
39 datasets except those where we *know* that they are *not* binary.
40 -->
41 <validator type="expression" message="Dataset is not a binary image"
42 ><![CDATA[getattr(value.metadata, "num_unique_values", None) in (None, '') or int(value.metadata.num_unique_values) <= 2]]></validator>
43 </xml>
44
45 </macros>