Skip to content

New interface for fslcpgeom #1152

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

Merged
merged 4 commits into from
Jul 24, 2015
Merged

New interface for fslcpgeom #1152

merged 4 commits into from
Jul 24, 2015

Conversation

mick-d
Copy link
Contributor

@mick-d mick-d commented Jul 22, 2015

No description provided.

@mick-d
Copy link
Contributor Author

mick-d commented Jul 22, 2015

@satra I had to spend quite some time cleaning everything up as I coulnd't get rid of all the test files. Everything is good now.

To ensure that no input files are overwritten (more precisely dest_file) I had to copy dest_file locally (to the cwd) and then modify it there. I am not sure this the most elegant implementation so don't hesitate to let me know if there is a better solution. In any case I tested it and it works fine.

class CopyGeomInputSpec(FSLCommandInputSpec):
in_file = File(exists=True, mandatory=True, argstr="%s", position=0,
desc="source image")
dest_file = File(exists=True, mandatory=True, argstr="%s", position=1,
Copy link
Member

Choose a reason for hiding this comment

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

you could add another two pieces of metadata to this:
output_name='out_file', name_template='%s_newhd'

and then remove all three functions (run_interface, gen_filename, list_outputs) from interface

Copy link
Member

Choose a reason for hiding this comment

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

oops. this may not work for this scenario where dest_file is an existing 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 see. So the current implementation is ok?

@mick-d
Copy link
Contributor Author

mick-d commented Jul 24, 2015

@satra Done

satra added a commit that referenced this pull request Jul 24, 2015
New interface for fslcpgeom
@satra satra merged commit b77b4bc into nipy:master Jul 24, 2015
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 this pull request may close these issues.

2 participants