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

Standardize Axes in Random Transforms. Add Random Axis to RandomMotion #1185

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

blakedewey
Copy link
Contributor

Fixes #81

Description

This pull request standardizes the use of axes in random transforms. It also adds random axes options in the RandomMotion transform. Includes the following changes:

  • Update to_tuple to see strings as singular values (this also required adding number of changes to checks for strings in areas where numbers are necessary). Tests all pass.
  • Add parse_axes and ensure_axes_indices to base Transform class. Standardizes the use of axes in all transforms. Capable of accepting integer and specific string axis values. This is now used in RandomFlip, RandomMotion, RandomGhosting, RandomAnisotropy. Tests were added to check these additional axis values.
  • Added a random axis parameter to RandomMotion. This now works properly on 2D images and can apply motion to any axis of 3D images. Also removed redundant change between matrix and transform.

Checklist

  • I have read the CONTRIBUTING docs and have a developer setup (especially important are pre-commitand pytest)
  • Non-breaking change (would not break existing functionality)
  • Breaking change (would cause existing functionality to change)
  • Tests added or modified to cover the changes
  • Integration tests passed locally by running pytest
  • In-line docstrings updated
  • Documentation updated, tested running make html inside the docs/ folder
  • This pull request is ready to be reviewed

@blakedewey
Copy link
Contributor Author

All checks pass now.

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.

Randomize k-space filling axis in RandomMotion
1 participant