Skip to content

Multichannel support for denoise_tv_bregman (#4427)#4446

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

Multichannel support for denoise_tv_bregman (#4427)#4446
hmaarrfk merged 12 commits intoscikit-image:masterfrom
erjel:denoise_tv_bregman_multidim

Conversation

@erjel
Copy link
Copy Markdown
Contributor

@erjel erjel commented Feb 15, 2020

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

pep8speaks commented Feb 15, 2020

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

erjel and others added 4 commits February 15, 2020 21:01
Co-Authored-By: Mark Harfouche <mark.harfouche@gmail.com>
Co-Authored-By: Mark Harfouche <mark.harfouche@gmail.com>
Co-Authored-By: Mark Harfouche <mark.harfouche@gmail.com>
Allocate channel output array prior to loop.
Copy link
Copy Markdown
Member

@hmaarrfk hmaarrfk left a comment

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.

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. :)

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