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