Mercurial > repos > imgteam > binary2labelimage
annotate 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 |
| rev | line source |
|---|---|
|
4
8f0dd9a58ec3
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/binary2labelimage/ commit f5a4de7535e433e3b0e96e0694e481b6643a54f8
imgteam
parents:
diff
changeset
|
1 <macros> |
|
8f0dd9a58ec3
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/binary2labelimage/ commit f5a4de7535e433e3b0e96e0694e481b6643a54f8
imgteam
parents:
diff
changeset
|
2 |
|
8f0dd9a58ec3
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 --> |
|
8f0dd9a58ec3
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/binary2labelimage/ commit f5a4de7535e433e3b0e96e0694e481b6643a54f8
imgteam
parents:
diff
changeset
|
4 |
|
8f0dd9a58ec3
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"> |
|
8f0dd9a58ec3
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/binary2labelimage/ commit f5a4de7535e433e3b0e96e0694e481b6643a54f8
imgteam
parents:
diff
changeset
|
6 <!-- |
|
8f0dd9a58ec3
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 |
|
8f0dd9a58ec3
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 |
|
8f0dd9a58ec3
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. |
|
8f0dd9a58ec3
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/binary2labelimage/ commit f5a4de7535e433e3b0e96e0694e481b6643a54f8
imgteam
parents:
diff
changeset
|
10 --> |
|
8f0dd9a58ec3
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" |
|
8f0dd9a58ec3
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> |
|
8f0dd9a58ec3
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/binary2labelimage/ commit f5a4de7535e433e3b0e96e0694e481b6643a54f8
imgteam
parents:
diff
changeset
|
13 </xml> |
|
8f0dd9a58ec3
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/binary2labelimage/ commit f5a4de7535e433e3b0e96e0694e481b6643a54f8
imgteam
parents:
diff
changeset
|
14 |
|
8f0dd9a58ec3
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"> |
|
8f0dd9a58ec3
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/binary2labelimage/ commit f5a4de7535e433e3b0e96e0694e481b6643a54f8
imgteam
parents:
diff
changeset
|
16 <!-- |
|
8f0dd9a58ec3
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 |
|
8f0dd9a58ec3
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 |
|
8f0dd9a58ec3
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. |
|
8f0dd9a58ec3
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/binary2labelimage/ commit f5a4de7535e433e3b0e96e0694e481b6643a54f8
imgteam
parents:
diff
changeset
|
20 --> |
|
8f0dd9a58ec3
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" |
|
8f0dd9a58ec3
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> |
|
8f0dd9a58ec3
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/binary2labelimage/ commit f5a4de7535e433e3b0e96e0694e481b6643a54f8
imgteam
parents:
diff
changeset
|
23 </xml> |
|
8f0dd9a58ec3
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/binary2labelimage/ commit f5a4de7535e433e3b0e96e0694e481b6643a54f8
imgteam
parents:
diff
changeset
|
24 |
|
8f0dd9a58ec3
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"> |
|
8f0dd9a58ec3
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/binary2labelimage/ commit f5a4de7535e433e3b0e96e0694e481b6643a54f8
imgteam
parents:
diff
changeset
|
26 <!-- |
|
8f0dd9a58ec3
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 |
|
8f0dd9a58ec3
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 |
|
8f0dd9a58ec3
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. |
|
8f0dd9a58ec3
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/binary2labelimage/ commit f5a4de7535e433e3b0e96e0694e481b6643a54f8
imgteam
parents:
diff
changeset
|
30 --> |
|
8f0dd9a58ec3
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" |
|
8f0dd9a58ec3
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> |
|
8f0dd9a58ec3
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/binary2labelimage/ commit f5a4de7535e433e3b0e96e0694e481b6643a54f8
imgteam
parents:
diff
changeset
|
33 </xml> |
|
8f0dd9a58ec3
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/binary2labelimage/ commit f5a4de7535e433e3b0e96e0694e481b6643a54f8
imgteam
parents:
diff
changeset
|
34 |
|
8f0dd9a58ec3
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"> |
|
8f0dd9a58ec3
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/binary2labelimage/ commit f5a4de7535e433e3b0e96e0694e481b6643a54f8
imgteam
parents:
diff
changeset
|
36 <!-- |
|
8f0dd9a58ec3
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 |
|
8f0dd9a58ec3
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 |
|
8f0dd9a58ec3
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. |
|
8f0dd9a58ec3
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/binary2labelimage/ commit f5a4de7535e433e3b0e96e0694e481b6643a54f8
imgteam
parents:
diff
changeset
|
40 --> |
|
8f0dd9a58ec3
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" |
|
8f0dd9a58ec3
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> |
|
8f0dd9a58ec3
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/binary2labelimage/ commit f5a4de7535e433e3b0e96e0694e481b6643a54f8
imgteam
parents:
diff
changeset
|
43 </xml> |
|
8f0dd9a58ec3
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/binary2labelimage/ commit f5a4de7535e433e3b0e96e0694e481b6643a54f8
imgteam
parents:
diff
changeset
|
44 |
|
8f0dd9a58ec3
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/binary2labelimage/ commit f5a4de7535e433e3b0e96e0694e481b6643a54f8
imgteam
parents:
diff
changeset
|
45 </macros> |
