Nipype Interfaces

Hello,

Does Nipype have a ROBEX interface? I’ve been looking around but haven’t found anything to suggest that it does.

Thanks,
Dan

There isn’t currently a ROBEX interface, but you can submit a feature request here. Open up a new issue and make the request.

Additionally, nipype is a very welcoming open community (they’ve helped me make some contributions, including an interface), so if you’re looking for an opportunity to dive in and make an interface, this would be a great contribution, see here for some reading on making an interface.

Here is what I’m using, make sure that the runROBEX.sh script is in a folder in your PATH environment variable

from nipype.interfaces.base import (
    TraitedSpec,
    CommandLineInputSpec,
    CommandLine,
    File,
    traits
)

class RobexInputSpec(CommandLineInputSpec):
    in_file = File(desc = "Input volume", exists = True,
         mandatory = True, position = 0, argstr="%s")
    out_file = File(desc = "Output volume", position = 1, argstr="%s", name_source=['in_file'],
                        hash_files=False, name_template='%s_brain', keep_extension=True)
    out_mask = File(desc = "Output mask", position = 2, argstr="%s", name_source=['in_file'],
                        hash_files=False, name_template='%s_brainmask', keep_extension=True)
    seed = traits.Int(desc = "seed for random number generator", position = 3, argstr = "%i")

class RobexOutputSpec(TraitedSpec):
    out_file = File(desc = "Output volume", exists = True)
    out_mask = File(desc = "Output mask", exists = True)

class RobexTask(CommandLine):
    input_spec = RobexInputSpec
    output_spec = RobexOutputSpec
    _cmd = 'runROBEX.sh'

Looks great - would you like to submit it as a pull request (contribution) to nipype? Contribution guide can be found here: https://github.com/nipy/nipype/blob/master/CONTRIBUTING.md