Skip to content

AFNI's 3dmask_tool does not accept multiple mask files #2874

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hstojic opened this issue Feb 5, 2019 · 2 comments · Fixed by #2892
Closed

AFNI's 3dmask_tool does not accept multiple mask files #2874

hstojic opened this issue Feb 5, 2019 · 2 comments · Fixed by #2892
Milestone

Comments

@hstojic
Copy link
Contributor

hstojic commented Feb 5, 2019

Summary

As far as I can see AFNI's 3dmask_tool allows multiple masks as input, while it is not possible to input a list as in_file argument?

See here for details on the tool.

Error:

Traceback (most recent call last):
  File "/home/hstojic/.pyenv/nipy/local/lib/python2.7/site-packages/nipype/pipeline/plugins/linear.py", line 44, in run
    node.run(updatehash=updatehash)
  File "/home/hstojic/.pyenv/nipy/local/lib/python2.7/site-packages/nipype/pipeline/engine/nodes.py", line 408, in run
    cached, updated = self.is_cached()
  File "/home/hstojic/.pyenv/nipy/local/lib/python2.7/site-packages/nipype/pipeline/engine/nodes.py", line 294, in is_cached
    hashed_inputs, hashvalue = self._get_hashval()
  File "/home/hstojic/.pyenv/nipy/local/lib/python2.7/site-packages/nipype/pipeline/engine/nodes.py", line 488, in _get_hashval
    self._get_inputs()
  File "/home/hstojic/.pyenv/nipy/local/lib/python2.7/site-packages/nipype/pipeline/engine/nodes.py", line 531, in _get_inputs
    self.set_input(key, deepcopy(output_value))
  File "/home/hstojic/.pyenv/nipy/local/lib/python2.7/site-packages/nipype/pipeline/engine/nodes.py", line 276, in set_input
    setattr(self.inputs, parameter, deepcopy(val))
  File "/home/hstojic/.pyenv/nipy/local/lib/python2.7/site-packages/nipype/interfaces/base/traits_extension.py", line 103, in validate
    validated_value = super(File, self).validate(object, name, value)
  File "/home/hstojic/.pyenv/nipy/local/lib/python2.7/site-packages/traits/trait_types.py", line 411, in validate
    self.error( object, name, value )
  File "/home/hstojic/.pyenv/nipy/local/lib/python2.7/site-packages/traits/trait_handlers.py", line 172, in error
    value )
TraitError: The 'in_file' trait of a MaskToolInputSpec instance must be an existing file name, but a value of ['mask_1',...,'mask_n'] <type 'list'> was specified.

Execution environment

  • My python environment outside container
@effigies
Copy link
Member

effigies commented Feb 5, 2019

You can probably fix this with an InputMultiObject, e.g.,

from ..base import InputMultiObject  # nipype.interfaces.base, to be clear

...

    in_file = InputMultiObject(File(exists=True), ...)

@hstojic
Copy link
Contributor Author

hstojic commented Feb 5, 2019

Yes, that's what I thought of trying, but wanted to check first in case I missed something.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants