Skip to content

Commit 1342d62

Browse files
authored
Merge pull request #3364 from ChristianHinge/fix/ants_mask_file
[FIX] Changes the type of ConvertScalarImageToRGBInputSpec.mask_file from File to traits.Str
2 parents 201a13f + 921f792 commit 1342d62

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

nipype/interfaces/ants/tests/test_auto_ConvertScalarImageToRGB.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ def test_ConvertScalarImageToRGB_inputs():
3535
),
3636
mask_image=dict(
3737
argstr="%s",
38-
extensions=None,
3938
position=3,
4039
usedefault=True,
4140
),

nipype/interfaces/ants/visualization.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,14 @@ class ConvertScalarImageToRGBInputSpec(ANTSCommandInputSpec):
2828
output_image = traits.Str(
2929
"rgb.nii.gz", argstr="%s", usedefault=True, desc="rgb output image", position=2
3030
)
31-
mask_image = File(
32-
"none", argstr="%s", exists=True, desc="mask image", position=3, usedefault=True
31+
mask_image = traits.Either(
32+
"none",
33+
traits.File(exists=True),
34+
argstr="%s",
35+
desc="mask image",
36+
position=3,
37+
default="none",
38+
usedefault=True,
3339
)
3440
colormap = traits.Enum(
3541
"grey",

0 commit comments

Comments
 (0)