-
Notifications
You must be signed in to change notification settings - Fork 532
ENH: Add interface for fslorient #2955
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
Conversation
Pasted it above 'Reorient2Std'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution, please consider the suggested improvements.
out_file = File(desc = "out file", exists = True) | ||
|
||
|
||
class FslOrient(FSLCommand): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a minimal usage example analogous to that seen in other interfaces in this module:
nipype/nipype/interfaces/fsl/utils.py
Line 220 in e722d61
Examples |
|
||
class FslOrientInputSpec(FSLCommandInputSpec): | ||
in_file = File(exists=True, desc='input file', argstr='%s', position=2, mandatory=True) | ||
main_option = traits.Str(desc='main option', argstr='-%s', position=0, mandatory=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this command takes a specific (and historically very stable) set of main options, it would be best to enumerate them. The current interface attempt available in SAMRI demonstrates how.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @felixsc1, I wonder if you have some time to address @TheChymera's suggestions? I've also made a couple.
@@ -1700,7 +1700,28 @@ def _gen_filename(self, name): | |||
return self._list_outputs()['out_file'] | |||
return None | |||
|
|||
|
|||
class FslOrientInputSpec(FSLCommandInputSpec): | |||
in_file = File(exists=True, desc='input file', argstr='%s', position=2, mandatory=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest adding copyfile=True
, since this tool modifies the input file. This will only have an effect in workflows/nodes. (See https://nipype.readthedocs.io/en/latest/devel/interface_specs.html)
in_file = File(exists=True, desc='input file', argstr='%s', position=2, mandatory=True) | |
in_file = File(exists=True, | |
copyfile=True, | |
desc='input file', | |
argstr='%s', | |
position=2, | |
mandatory=True) |
def _list_outputs(self): | ||
outputs = self.output_spec().get() | ||
outputs['out_file'] = os.path.abspath(self.inputs.in_file) | ||
return outputs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These three lines are over-indented.
Hi @felixsc1, we're aiming for a release in the next week or so, if you'd like to try to get this in by then. Please let us know if you need any help. |
Hi @felixsc1, sorry to do this to you, but we just merged some pretty huge changes. Could you re-apply these changes on the latest Please let me know if you need any help or clarifications. |
This pull request is "orphaned," which means it has been deemed to be abandoned by its original author. Orphaned pull requests have not been rejected, and we hope that if a user sees one that will meet their needs with a little work, that they will fork it and open a new pull request (or, in the case of the original author, reopen the original PR). We ask that all adopted PRs be updated to merge or rebase the current master. If you would like to adopt a PR and need help getting started, any of a number of contributors will be happy to help. |
Summary
Simple interface for fslorient.
Input arguments:
Acknowledgment