-
Notifications
You must be signed in to change notification settings - Fork 533
Ants brain extraction interface #1231
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
please rebase/merge master - we have fixed the CircleCI tests |
d7c76da
to
8e5f0c4
Compare
Sorry for the delay. I rebased... |
tests still failing after rebase :S |
>>> brainextraction.inputs.brain_template = 'study_template.nii.gz' | ||
>>> brainextraction.inputs.brain_probability_mask ='ProbabilityMaskOfStudyTemplate.nii.gz' | ||
>>> brainextraction.cmdline | ||
'antsBrainExtraction.sh -a T1.nii.gz -m ProbabilityMaskOfStudyTemplate.nii.gz -e study_template.nii.gz -d 3 -s nii.gz -o highres001_ |
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.
You are missing a quotation mark at the end. This makes one of the tests to fail: https://travis-ci.org/nipy/nipype/jobs/87317019#L4110
output_spec = antsBrainExtractionOutputSpec | ||
_cmd = 'antsBrainExtraction.sh' | ||
|
||
def _format_arg(self, opt, spec, val): |
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.
There shouldn't be any need to overload format_args
for these inputs as they are pretty straight forward. I would recommend removing this for code clarity.
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.
you are right. got rid of the unnecessary overload!
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.
still seeing the overloaded _format_arg
.
I think all is fine now. |
def _format_arg(self, opt, spec, val): | ||
return super(ANTSCommand, self)._format_arg(opt, spec, val) | ||
|
||
def _run_interface(self, runtime, correct_return_codes=[0]): |
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.
this function is also not necessary
good to go? |
'(default = 1)')) | ||
keep_temporary_files = traits.Int(argstr='-k %d', | ||
desc='Keep brain extraction/segmentation warps, etc (default = 0).') | ||
use_floatingpoint_precision = traits.Enum(0, 1, argstr='-q %d', |
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.
@hjmjohnson - do all ants commands now have this option, if so should this be moved to the base class?
@satra all of ANTs does not have this command. It is being implemented one program at a time. :( Sorry. |
@hjmjohnson is this true for the |
This depends on what you consider an "ANTs" program. There is no formal mechanism for tools build as part of the ANTs package to maintain a consistent interface. There is an attempt to keep similar items consistent (via copy-n-paste coding) across tools, but it is not rigorously enforced. I honestly do not know how uniform the --verbose option is across tools, that would require a review of the ANTs code base. |
Should we merge this as is then? |
Ants brain extraction interface
Here is a wrapper for the ants brain extraction script , #1230. Hope it will be useful to others as well. I provide test and also made a very small modification to antsCorticalThicknessoutputSpec not following the capital O in Output convention.