Skip to content

FSL slice #2585

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
May 21, 2018
Merged

FSL slice #2585

merged 4 commits into from
May 21, 2018

Conversation

salma1601
Copy link
Contributor

added interface for fslslice

@@ -262,6 +262,70 @@ def _format_arg(self, name, trait_spec, value):
return super(Smooth, self)._format_arg(name, trait_spec, value)


class SliceInputSpec(FSLCommandInputSpec):
in_file = File(exists=True, argstr="%s", position=0, mandatory=True,
desc="input filename")
Copy link
Member

Choose a reason for hiding this comment

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

Since this places outputs in the same directory as in_file (unless out_base_name is defined), you should add copyfile=False to this trait.


outbase = in_base + '_slice*'
outputs['out_files'] = sorted(glob(os.path.join(out_dir,
outbase + ext)))
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't account for if out_base_name is an absolute path. You can simplify this a bit, too, using fname_presuffix:

suffix = '_slice_*' + ext
if isdefined(self.inputs.out_base_name):
    fname_template = os.abspath(self.inputs.out_base_name + suffix)
else:
    fname_template = fname_presuffix(self.inputs.in_file, suffix=suffix, use_ext=False)

outputs['out_file'] = sorted(glob(fname_template))

@effigies effigies added this to the 1.0.4 milestone May 18, 2018
@codecov-io
Copy link

codecov-io commented May 18, 2018

Codecov Report

Merging #2585 into master will decrease coverage by <.01%.
The diff coverage is 45.45%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2585      +/-   ##
==========================================
- Coverage   67.55%   67.55%   -0.01%     
==========================================
  Files         335      335              
  Lines       42589    42611      +22     
  Branches     5269     5271       +2     
==========================================
+ Hits        28772    28784      +12     
- Misses      13144    13154      +10     
  Partials      673      673
Flag Coverage Δ
#smoketests 50.71% <45.45%> (-0.01%) ⬇️
#unittests 65.01% <45.45%> (+0.02%) ⬆️
Impacted Files Coverage Δ
nipype/interfaces/fsl/__init__.py 100% <ø> (ø) ⬆️
nipype/interfaces/fsl/utils.py 70.02% <45.45%> (-0.6%) ⬇️
nipype/utils/profiler.py 43.1% <0%> (-1.15%) ⬇️
nipype/pipeline/plugins/multiproc.py 82.14% <0%> (+2.38%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 53e0662...aef05c4. Read the comment docs.

@effigies effigies merged commit eb4d8b4 into nipy:master May 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants