Skip to content

Multichannel support for denoise_tv_bregman (#4427) - #4446

Merged
hmaarrfk merged 12 commits into
scikit-image:masterfrom
erjel:denoise_tv_bregman_multidim
Feb 17, 2020
Merged

hmaarrfk merged 12 commits into
scikit-image:masterfrom
erjel:denoise_tv_bregman_multidim

Conversation

@erjel

@erjel erjel commented Feb 15, 2020

Copy link
Copy Markdown
Contributor

Description

Proposal for closing issue #4427

Added multichannel parameter to denoise_tv_bregman function.

Checklist

For reviewers

  • Check that the PR title is short, concise, and will make sense 1 year
    later.
  • Check that new functions are imported in corresponding __init__.py.
  • Check that new features, API changes, and deprecations are mentioned in
    doc/release/release_dev.rst.
  • Consider backporting the PR with @meeseeksdev backport to v0.14.x

Compare issue #4427 in upstream

* Implemented unittest

* Refactored code
@pep8speaks

pep8speaks commented Feb 15, 2020 •

Copy link
Copy Markdown

Hello @erjel! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 298:80: E501 line too long (86 > 79 characters)
Line 299:61: E226 missing whitespace around arithmetic operator

Comment last updated at 2020-02-17 20:40:44 UTC

Comment thread skimage/restoration/_denoise.py Resolved
Comment thread skimage/restoration/_denoise.py Resolved
Comment thread skimage/restoration/_denoise.py Resolved
Comment thread skimage/restoration/_denoise.py Resolved
Comment thread skimage/restoration/_denoise.py Resolved
Comment thread skimage/restoration/_denoise.py Resolved
Comment thread skimage/restoration/_denoise.py Resolved
Comment thread skimage/restoration/_denoise.py Resolved
Comment thread skimage/restoration/_denoise.py Resolved
Allocate channel output array prior to loop.

@hmaarrfk hmaarrfk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approved pending the last comment.

Comment thread skimage/restoration/_denoise.py Resolved
Comment thread skimage/restoration/_denoise.py Resolved
Only allocate `channel_out` if `multichannel` is `True`
@hmaarrfk

Copy link
Copy Markdown
Member

Sorry ahjnnes. I was just trying to add a label.

denoised0 = restoration.denoise_tv_bregman(img_astro[..., 0], weight=60.0)
denoised = restoration.denoise_tv_bregman(img_astro, weight=60.0,
multichannel=True)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

May be can you check that assert_equal(denoised0, denoised[..., 0])?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sure. Thank you for pointing this out. I must have missed it.

@hmaarrfk
hmaarrfk merged commit 7aa5958 into scikit-image:master Feb 17, 2020
@alexdesiqueira

Copy link
Copy Markdown
Member

Thank you for your work, @erjel! We appreciate it. :)

@emmanuelle emmanuelle mentioned this pull request Feb 20, 2020
3 of 9 tasks
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.

6 participants