Skip to content

2198 Add CenterScaleCrop transform#2207

Merged
Nic-Ma merged 6 commits intoProject-MONAI:devfrom
Nic-Ma:2198-scalecentercrop
May 17, 2021
Merged

2198 Add CenterScaleCrop transform#2207
Nic-Ma merged 6 commits intoProject-MONAI:devfrom
Nic-Ma:2198-scalecentercrop

Conversation

@Nic-Ma
Copy link
Copy Markdown
Contributor

@Nic-Ma Nic-Ma commented May 17, 2021

Fixes #2198 .

Description

This PR added the CenterScaleCrop transform according to @rijobro 's feature request.

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.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

@Nic-Ma
Copy link
Copy Markdown
Contributor Author

Nic-Ma commented May 17, 2021

/black

@Nic-Ma Nic-Ma requested review from ericspod, rijobro and wyli May 17, 2021 14:43
Copy link
Copy Markdown
Contributor

@rijobro rijobro left a comment

Choose a reason for hiding this comment

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

thanks!

Signed-off-by: Nic Ma <[email protected]>
@Nic-Ma Nic-Ma enabled auto-merge (squash) May 17, 2021 15:30
@Nic-Ma Nic-Ma merged commit ef66345 into Project-MONAI:dev May 17, 2021
@jpcenteno80
Copy link
Copy Markdown

I thought this transform used to have the inverse method implemented. I am testing code from a couple of months ago with this version MONAI version: 0.5.3+116.gb151b8e and I run into the following error:

  File "/home/jpcenteno/miniconda3/envs/test_pkgs/lib/python3.9/site-packages/monai/transforms/inverse.py", line 121, in inverse
    raise NotImplementedError(f"Subclass {self.__class__.__name__} must implement this method.")
NotImplementedError: Subclass CenterScaleCropd must implement this method.

@Nic-Ma
Copy link
Copy Markdown
Contributor Author

Nic-Ma commented Jun 16, 2021

Thanks for your report. Let me take a look.

@jpcenteno80
Copy link
Copy Markdown

Thanks. I added some sample code that fixed the issue under this discussion: #2380

@Nic-Ma Nic-Ma deleted the 2198-scalecentercrop branch July 2, 2021 23:36
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.

Add ScaleCenterCrop transform

4 participants