Skip to content

Conversation

@Nic-Ma
Copy link
Contributor

@Nic-Ma Nic-Ma commented Aug 10, 2021

Fixes #2691 .

Description

This PR implemented the HistogramIntensity transform referring to other existing examples.

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
Contributor Author

Nic-Ma commented Aug 10, 2021

/black

@Nic-Ma Nic-Ma requested review from ericspod, rijobro and wyli August 10, 2021 07:28
@wyli
Copy link
Contributor

wyli commented Aug 10, 2021

thanks for the quick PR, could you help go through this example (https://scikit-image.org/docs/dev/auto_examples/color_exposure/plot_equalize.html) and extract equalize_hist and equalize_adapthist?

@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Aug 11, 2021

Hi @wyli ,

Thanks for your review.
I updated the PR to provide the equalize_hist API.
But for the equalize_adapthist, I feel the implementation is much more complicated:
https://github.com/scikit-image/scikit-image/blob/v0.18.2/skimage/exposure/_adapthist.py#L98
I am not sure whether we must support it?
If yes, implement it with numpy referring to scikit-image or just use scikit-image as optional lib?

Thanks.

@madil90
Copy link
Contributor

madil90 commented Aug 11, 2021

/build

@wyli
Copy link
Contributor

wyli commented Aug 11, 2021

sure I think we can leave equalize_adapthist for another PR. would be great to prefer scikit-image's histogram (if it's installed by the user) https://github.com/scikit-image/scikit-image/blob/main/skimage/exposure/exposure.py#L181 and add a mask option, what do you think?

@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Aug 11, 2021

Hi @wyli ,

Sure, I updated the PR according to your comments.
Could you please help review it again?

Thanks in advance.

@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Aug 11, 2021

/black

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!

@wyli wyli merged commit f9bc713 into Project-MONAI:dev Aug 11, 2021
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.

histogram equalisation transform?

3 participants