Skip to content

Invert patch-based transforms#2230

Merged
wyli merged 4 commits intoProject-MONAI:devfrom
rijobro:inverse_RandCropByPosNegLabeld
Jun 2, 2021
Merged

Invert patch-based transforms#2230
wyli merged 4 commits intoProject-MONAI:devfrom
rijobro:inverse_RandCropByPosNegLabeld

Conversation

@rijobro
Copy link
Copy Markdown
Contributor

@rijobro rijobro commented May 21, 2021

Adds inverse for:

  • RandSpatialCropSamplesd
  • RandWeightedCropd
  • RandCropByPosNegLabeld

Fixes #1901.
cc @diazandr3s.

Status

Ready

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • 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.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

@rijobro rijobro requested review from Nic-Ma and wyli and removed request for Nic-Ma May 21, 2021 16:12
@rijobro rijobro changed the title add inverse for RandCropByPosNegLabeld Invert patch-based transforms May 21, 2021
Copy link
Copy Markdown
Contributor

@wyli wyli left a comment

Choose a reason for hiding this comment

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

thanks!

@rijobro
Copy link
Copy Markdown
Contributor Author

rijobro commented May 27, 2021

@Nic-Ma do you think this will this cause any problems with your current workflows?

Signed-off-by: Richard Brown <[email protected]>
@rijobro rijobro force-pushed the inverse_RandCropByPosNegLabeld branch from fd2f0c6 to 8af39a8 Compare May 27, 2021 09:11
Copy link
Copy Markdown
Contributor

@Nic-Ma Nic-Ma left a comment

Choose a reason for hiding this comment

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

Looks good to me.
Could you please help add a comment or doc-string to highlight that: we can't automatically batch-invert the entire transform chain if contains patch-based transform, because the output will be a list?

Thanks.

@wyli wyli enabled auto-merge (squash) June 2, 2021 14:46
@wyli wyli merged commit d4d1733 into Project-MONAI:dev Jun 2, 2021
@rijobro rijobro deleted the inverse_RandCropByPosNegLabeld branch June 3, 2021 12:05
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.

Invert patch-based transforms

3 participants