Skip to content
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

ENH: Add ITK-LTA conversion test #66

Merged
merged 3 commits into from
Mar 19, 2020

Conversation

oesteban
Copy link
Collaborator

@oesteban oesteban commented Mar 19, 2020

Summary

This PR adds a few tests, and also addresses an uncovered cause of #64.

This PR assumes that the matrix found in LTA transforms is given in mode-points instead of mode-images (in BIDS-Derivatives terms).

Further investigation of this would be advised, this is just the empirical result of using fMRIPrep-generated LTAs (and ITK conversions) for the new tests.

TODO

I have added an FSL affine generated from an LTA (bbregister) - Since we don't have references for it, I couldn't add a test this time.

@pull-assistant
Copy link

pull-assistant bot commented Mar 19, 2020

Score: 0.99

Best reviewed: commit by commit


Optimal code review plan

     ENH: Add ITK-LTA conversion test

     fix: seems like LTA affines are defined inversed

     enh: add another (VOX2VOX) example from bbregister

Powered by Pull Assistant. Last update b49e9f2 ... 772a791. Read the comment docs.

@pep8speaks
Copy link

pep8speaks commented Mar 19, 2020

Hello @oesteban! Thanks for updating this PR.

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2020-03-19 15:22:14 UTC

@codecov-io
Copy link

codecov-io commented Mar 19, 2020

Codecov Report

Merging #66 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #66   +/-   ##
=======================================
  Coverage   98.63%   98.63%           
=======================================
  Files          11       11           
  Lines         950      951    +1     
  Branches      129      129           
=======================================
+ Hits          937      938    +1     
  Misses          7        7           
  Partials        6        6           
Flag Coverage Δ
#unittests 98.63% <100.00%> (+<0.01%) ⬆️
Impacted Files Coverage Δ
nitransforms/io/lta.py 99.32% <100.00%> (ø)
nitransforms/linear.py 96.07% <100.00%> (+0.02%) ⬆️

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 2180e54...772a791. Read the comment docs.

@oesteban oesteban marked this pull request as ready for review March 19, 2020 06:21
@oesteban oesteban requested review from effigies and mgxd March 19, 2020 06:33
In other words, the ``src volume`` is the moving image and the
``dest volume`` is the reference image. However, the matrix written in
the file seems to map coordinates from ``src`` to ``dest`` (i.e., it is
the right one to move the data from ``dest`` to ``src``.
@oesteban
Copy link
Collaborator Author

@effigies @mgxd I have edited the PR's description and some of the commits, to cover more comprehensively that I believe the LTA matrices are mode-points.

@@ -1,30 +1,28 @@
# transform file /home/oesteban/tmp/fmriprep-ds005/fprep-work/fmriprep_wf/single_subject_01_wf/anat_preproc_wf/surface_recon_wf/fsnative2t1w_xfm/T1_robustreg.lta
# created by oesteban on Sat Mar 14 19:28:37 2020

Copy link
Member

Choose a reason for hiding this comment

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

Does this new file fail prior to #65?

Copy link
Collaborator Author

@oesteban oesteban Mar 19, 2020

Choose a reason for hiding this comment

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

Yes, I have updated both because I had messed up when filing #64. The attached ITK file (in that issue) I believe is the inverse.

To be sure, I searched again for both (LTA, ITK) from the robust register node and subsequent nodes and replaced them.

@oesteban oesteban added this to the 20.0.0rc1 milestone Mar 19, 2020
@oesteban oesteban merged commit 7a99841 into nipy:master Mar 19, 2020
@oesteban oesteban deleted the test/lta-itk-conversion branch March 19, 2020 22:34
oesteban added a commit to oesteban/nitransforms that referenced this pull request Mar 28, 2020
This PR starts the implementation of "collapsing" series of transforms,
for the linear case.

It is tested on real data added in the context of nipy#66, nipy#74 and nipy#75.
For the moment does not cover unintended use-cases such as collapsing
transform sequences containing one or more nonlinear transforms.

Resolves: nipy#88
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.

4 participants