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: Read (and apply) ITK/ANTs' composite HDF5 transforms #79

Merged
merged 5 commits into from
Mar 26, 2020

Conversation

oesteban
Copy link
Collaborator

Uses h5py to browse the transforms group, and concatenates them in a list
ready for nitransforms' wrapping into a TransformsChain.

The writer is not included in this PR.

The implementation takes into account the misspelling of "Tranforms" present
in transforms generated with older versions of ITK.

This implementation only accepts the composite transforms generated by ANTs.

Closes #4

…nsforms

Uses ``h5py`` to browse the transforms group, and concatenates them in a list
ready for nitransforms' wrapping into a ``TransformsChain``.

The writer is not included in this PR.

The implementation takes into account the misspelling of "Tranforms" present
in transforms generated with older versions of ITK.

This implementation only accepts the composite transforms generated by ANTs.

Resolves: nipy#4
@oesteban oesteban added the enhancement New feature or request label Mar 25, 2020
@oesteban oesteban added this to the 20.0.0rc1 milestone Mar 25, 2020
@pull-assistant
Copy link

pull-assistant bot commented Mar 25, 2020

@codecov-io
Copy link

codecov-io commented Mar 25, 2020

Codecov Report

Merging #79 into master will increase coverage by 0.06%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #79      +/-   ##
==========================================
+ Coverage   98.89%   98.95%   +0.06%     
==========================================
  Files          11       12       +1     
  Lines         992     1050      +58     
  Branches      129      135       +6     
==========================================
+ Hits          981     1039      +58     
  Misses          6        6              
  Partials        5        5              
Flag Coverage Δ
#unittests 98.95% <100.00%> (+0.06%) ⬆️
Impacted Files Coverage Δ
nitransforms/base.py 99.32% <100.00%> (-0.15%) ⬇️
nitransforms/io/itk.py 100.00% <100.00%> (ø)
nitransforms/manip.py 100.00% <100.00%> (ø)

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 439354a...3185b1d. Read the comment docs.

@pep8speaks
Copy link

pep8speaks commented Mar 25, 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-26 04:34:25 UTC

This was necessary to integrate one test equivalent to resampling with
``antsApplyTransforms``, but via nitransforms.
@oesteban oesteban marked this pull request as ready for review March 26, 2020 00:32
@oesteban oesteban changed the title ENH: draft implementation of ITK/ANTs' composite HDF5 transforms ENH: Read (and apply) ITK/ANTs' composite HDF5 transforms Mar 26, 2020
@oesteban oesteban requested a review from mgxd March 26, 2020 01:30
Copy link
Member

@mgxd mgxd left a comment

Choose a reason for hiding this comment

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

lgtm, tiny comment

nitransforms/tests/test_manip.py Outdated Show resolved Hide resolved
Co-Authored-By: Mathias Goncalves <goncalves.mathias@gmail.com>
@oesteban oesteban merged commit 838d385 into nipy:master Mar 26, 2020
@oesteban oesteban deleted the enh/4-read-itk-h5 branch March 26, 2020 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Read in ITK's h5 transforms
4 participants