Skip to content

Add examples to docstring for structuring elements to visualize the shape #4431

Closed

Description

@sciunto

Description

Add examples to show for each of these functions:

  • skimage.morphology.square(width[, dtype])
  • skimage.morphology.rectangle(width, height)
  • skimage.morphology.diamond(radius[, dtype])
  • skimage.morphology.disk(radius[, dtype])
  • skimage.morphology.cube(width[, dtype])
  • skimage.morphology.octahedron(radius[, dtype])
  • skimage.morphology.ball(radius[, dtype])
  • skimage.morphology.octagon(m, n[, dtype])
  • skimage.morphology.star(a[, dtype])

the typical shape of the structuring element.

Cc ( @emmanuelle : another first issue idea).

Activity

  1. added
    🔰 Good first issue
    📄 type: Documentation
    on Feb 1, 2020
  2. 07harshita commented on Feb 2, 2020

    @07harshita

    Hi!
    I would love to work on this issue.

  3. emmanuelle commented on Feb 3, 2020

    @emmanuelle
    Member

    Hi @07harshita that's great to hear! Don't hesitate to submit a work in progress pull request with for example just one example in one function, if you want some early feedback to be sure that you're on the right track.

  4. b-z commented on Mar 26, 2020

    @b-z
    Contributor

    Hello :)
    I created a PR, which has an example code for visualizing the above functions.
    I didn't use docstring, because some results can be very unintuitive if using an array to show the results, such as:

    >>> ball(1)
    array([[[0, 0, 0],
            [0, 1, 0],
            [0, 0, 0]],
    
           [[0, 1, 0],
            [1, 1, 1],
            [0, 1, 0]],
    
           [[0, 0, 0],
            [0, 1, 0],
            [0, 0, 0]]], dtype=uint8)

    And it's better to use a figure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    🔰 Good first issue📄 type: Documentation

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions