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

Smooth field #3252

Merged
merged 12 commits into from
Nov 19, 2021
Merged

Smooth field #3252

merged 12 commits into from
Nov 19, 2021

Conversation

ericspod
Copy link
Member

@ericspod ericspod commented Nov 3, 2021

Description

This adds a few transforms that use a smooth field to adjust contrast and intensity over regions of an input image rather than for the whole image. This is useful for simulating different acquisition qualities in MR images. This isn't finished yet with more and better tests needed and @rijobro to look over to see what needs to be changed to be more compatible with the push for Pytorch+Numpy hybrid transforms.

This adds a new transform directory for these, perhaps others should be added for MR-specific transforms and other groupings to reduce the size of the array.py/dictionary.py files that currently exist.

Status

Work in progress

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.

Sorry, something went wrong.

Signed-off-by: Eric Kerfoot <eric.kerfoot@kcl.ac.uk>
Signed-off-by: Eric Kerfoot <eric.kerfoot@kcl.ac.uk>
@ericspod ericspod requested a review from rijobro November 3, 2021 15:41
@ericspod
Copy link
Member Author

ericspod commented Nov 3, 2021

/black

Signed-off-by: Eric Kerfoot <eric.kerfoot@kcl.ac.uk>
@Nic-Ma
Copy link
Contributor

Nic-Ma commented Nov 3, 2021

Please note to add an example image in the doc: https://github.com/Project-MONAI/DocImages
CC @rijobro as Richard is an expert on it.

Thanks.

Signed-off-by: Eric Kerfoot <eric.kerfoot@kcl.ac.uk>
@ericspod
Copy link
Member Author

ericspod commented Nov 3, 2021

Thanks, I was going to ask about the image docs.

Copy link
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.

Looks good once some of the suggested changes are incorporated. As you say, more tests needed, too.

@rijobro
Copy link
Contributor

rijobro commented Nov 19, 2021

Thanks, I was going to ask about the image docs.

For the image docs, you need to:

  1. clone https://github.com/Project-MONAI/DocImages
  2. set the environment variable MONAI_DOC_IMAGES to point to this folder
  3. for each of your new transforms to be visualised, add to the bottom of this file: https://github.com/Project-MONAI/MONAI/blob/dev/monai/transforms/utils_create_transform_ims.py, and then run the file
  4. files will be saved to MONAI_DOC_IMAGES folder -- commit and PR from there.

ericspod and others added 4 commits November 19, 2021 12:48
Signed-off-by: Eric Kerfoot <eric.kerfoot@kcl.ac.uk>
Signed-off-by: Eric Kerfoot <eric.kerfoot@kcl.ac.uk>
Signed-off-by: Eric Kerfoot <eric.kerfoot@kcl.ac.uk>
@ericspod ericspod marked this pull request as ready for review November 19, 2021 18:19
@ericspod ericspod requested review from rijobro and wyli November 19, 2021 18:19
ericspod and others added 2 commits November 19, 2021 18:22
Signed-off-by: Eric Kerfoot <eric.kerfoot@kcl.ac.uk>
@wyli
Copy link
Contributor

wyli commented Nov 19, 2021

/build

Copy link
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, it looks good to me.

@ericspod ericspod enabled auto-merge (squash) November 19, 2021 20:06
@ericspod ericspod merged commit b01c63e into Project-MONAI:dev Nov 19, 2021
@ericspod ericspod deleted the smooth_field branch November 19, 2021 21:41
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.

None yet

4 participants