Merged
Show file tree
Hide file tree
Changes from 3 commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Failed to load files.
Original file line numberDiff line numberDiff line change
Expand Up@@ -224,13 +224,14 @@ class Generate5ttInputSpec(MRTrix3BaseInputSpec):
"fsl",
"gif",
"freesurfer",
"hsvs",
argstr="%s",
position=-3,
mandatory=True,
desc="tissue segmentation algorithm",
)
in_file = File(
exists=True, argstr="%s", mandatory=True, position=-2, desc="input image"
exists=False, argstr="%s", mandatory=True, position=-2, desc="input image"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it seems like you need either a file or a directory, not a missing file.

in_file = traits.Either(
    File(exists=True),
    Directory(exists=True),
    argstr="%s", mandatory=True, position=-2, desc="input image / directory"
)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I added this solution now. :)

)
out_file = File(argstr="%s", mandatory=True, position=-1, desc="output image")

Expand DownExpand Up@@ -822,7 +823,7 @@ class MRTransformInputSpec(MRTrix3BaseInputSpec):
)
invert = traits.Bool(
argstr="-inverse",
position=1,
position=2,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means -invert will appear after all of the things with position=1. Does it need to come last, before in_files/out_file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the position change for now, but I just added this previously because if I wanted to use -inverse with some other parameter and they both had 'position=1' then only one would show up on the command. But it can also be fixed by just using inputs.args string.

desc="Invert the specified transform before using it",
)
linear_transform = File(
Expand Down