Mercurial > repos > imgteam > 2d_feature_extraction
comparison validators.xml @ 5:5530132d500e draft
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/2d_feature_extraction/ commit bb2d58ed37d8eb09583b86e3cdd9f5d1b56c42a0
| author | imgteam |
|---|---|
| date | Sun, 04 Jan 2026 20:56:17 +0000 |
| parents | |
| children | 048545339ced |
comparison
equal
deleted
inserted
replaced
| 4:a4bc9dfde846 | 5:5530132d500e |
|---|---|
| 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> |
