Skip to content

more tests about the transforms with MetaTensor#4521

Merged
wyli merged 10 commits intoProject-MONAI:feature/MetaTensorfrom
wyli:metetensor-enh
Jun 17, 2022
Merged

more tests about the transforms with MetaTensor#4521
wyli merged 10 commits intoProject-MONAI:feature/MetaTensorfrom
wyli:metetensor-enh

Conversation

@wyli
Copy link
Copy Markdown
Contributor

@wyli wyli commented Jun 16, 2022

Description

  • adding tests using itk-python resampling as the reference (tests/test_meta_affine.py).
  • reviewed metatensor compatibility in all transforms
  • updated integration tests
  • added a pixdim property to metatensor

Status

Ready

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • Integration tests passed locally by running ./runtests.sh -f -u --net --coverage.
  • Quick tests passed locally by running ./runtests.sh --quick --unittests --disttests.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

wyli added 2 commits June 16, 2022 12:32
Signed-off-by: Wenqi Li <[email protected]>
Signed-off-by: Wenqi Li <[email protected]>
@wyli wyli requested a review from rijobro June 16, 2022 16:59
Signed-off-by: Wenqi Li <[email protected]>
@wyli wyli force-pushed the metetensor-enh branch from ebd3b56 to 37ec70c Compare June 16, 2022 19:21
@wyli
Copy link
Copy Markdown
Contributor Author

wyli commented Jun 16, 2022

/integration-test

@wyli wyli changed the title more tests about the linear transforms MetaTensor more tests about the transforms with MetaTensor Jun 16, 2022
@wyli wyli marked this pull request as ready for review June 16, 2022 22:36
@wyli
Copy link
Copy Markdown
Contributor Author

wyli commented Jun 17, 2022

/build

@wyli
Copy link
Copy Markdown
Contributor Author

wyli commented Jun 17, 2022

this is mostly test case changes, integration/unit tests all work fine.
https://github.com/Project-MONAI/MONAI/actions/runs/2513728775
https://github.com/Project-MONAI/MONAI/actions/runs/2511887659

only notable code change is MetaTensor.pxidim property which is computed from the affine. it's tested against itk:

assert_allclose(output.pixdim, np.asarray(ref_2.GetSpacing()), type_test=False)

I'm merging this PR.

@wyli wyli merged commit e1edc99 into Project-MONAI:feature/MetaTensor Jun 17, 2022
@wyli wyli deleted the metetensor-enh branch June 17, 2022 06:26
@rijobro
Copy link
Copy Markdown
Contributor

rijobro commented Jun 17, 2022

Thanks, this is great. I'm glad that spacing is computed on the fly as opposed to being stored.

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.

2 participants