Skip to content

enh: allow uses_qform in FLIRT, ApplyXFM interfaces #1875

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 17 commits into from
Mar 18, 2017

Conversation

mgxd
Copy link
Member

@mgxd mgxd commented Mar 9, 2017

Addresses #1317 - allows use of apply_xfm with either in_matrix_file or uses_qform args

@mgxd mgxd changed the title Fix/flirt xfm enh: allow uses_qform in FLIRT, ApplyXFM interfaces Mar 9, 2017
@codecov-io
Copy link

codecov-io commented Mar 10, 2017

Codecov Report

Merging #1875 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #1875      +/-   ##
==========================================
+ Coverage   73.11%   73.11%   +<.01%     
==========================================
  Files        1061     1060       -1     
  Lines       53375    53373       -2     
==========================================
- Hits        39025    39024       -1     
+ Misses      14350    14349       -1
Flag Coverage Δ
#unittests 73.11% <100%> (ø)
Impacted Files Coverage Δ
nipype/interfaces/fsl/tests/test_auto_FLIRT.py 92.85% <ø> (ø)
nipype/interfaces/fsl/tests/test_auto_ApplyXFM.py 92.85% <ø> (ø)
nipype/interfaces/fsl/tests/test_preprocess.py 100% <100%> (ø)
nipype/interfaces/fsl/preprocess.py 77.47% <100%> (+0.09%)

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 dd1ed4f...f266c83. Read the comment docs.

@@ -561,13 +562,18 @@ def _parse_inputs(self, skip=None):
if isdefined(self.inputs.save_log) and self.inputs.save_log:
if not isdefined(self.inputs.verbose) or self.inputs.verbose == 0:
self.inputs.verbose = 1
if isdefined(self.inputs.apply_xfm) and self.inputs.apply_xfm:
if not self.inputs.in_matrix_file and not self.inputs.uses_qform:
Copy link
Member

Choose a reason for hiding this comment

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

shouldn't this be if not isdefined(self.inputs.in_matrix_file) and not (isdefined(self.inputs.uses_qform) and not self.inputs.uses_qform)

Copy link
Member Author

Choose a reason for hiding this comment

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

is isdefined necessary in this case? I added a test for both cases of using apply_xfm

Copy link
Member

Choose a reason for hiding this comment

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

what if someone sets them to Undefined

In [1]: from traits.api import Undefined

In [2]: not Undefined
Out[2]: False

Copy link
Member

@satra satra Mar 17, 2017

Choose a reason for hiding this comment

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

however the check with not appears to work now

Copy link
Member

Choose a reason for hiding this comment

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

In [20]: foo.inputs.wmnorms = Undefined

In [21]: not foo.inputs.wmnorms
Out[21]: True

haven't figured out why yet

Copy link
Member Author

Choose a reason for hiding this comment

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

@satra should this be changed?

@satra satra merged commit 50a8ec6 into nipy:master Mar 18, 2017
@mgxd mgxd deleted the fix/flirt_xfm branch March 24, 2017 20:25
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.

3 participants