Skip to content

Commit 08d6d8c

Browse files
committed
Employ validators
1 parent 8222e8a commit 08d6d8c

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

tools/colorize_labels/colorize_labels.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<macros>
44
<import>creators.xml</import>
55
<import>tests.xml</import>
6+
<import>validators.xml</import>
67
<token name="@TOOL_VERSION@">3.6.1</token>
78
<token name="@VERSION_SUFFIX@">0</token>
89
</macros>
@@ -37,7 +38,11 @@
3738
]]>
3839
</command>
3940
<inputs>
40-
<param name="input" type="data" format="tiff,png" label="Input image (label map)" />
41+
<param name="input" type="data" format="tiff,png" label="Input image (label map)">
42+
<expand macro="validators/is_single_channel"/>
43+
<expand macro="validators/is_single_frame"/>
44+
<expand macro="validators/is_2d"/>
45+
</param>
4146
<param name="radius" type="integer" min="1" value="10" label="Radius of the neighborhood" help="Defines the neighborhood (in pixels) where labels are considered to be adjacent." />
4247
<param name="bg_label" type="integer" value="0" label="Background label" />
4348
<param name="bg_color" type="color" value="#000000" label="Background color"/>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../macros/validators.xml

0 commit comments

Comments
 (0)