Default structuring element (selem)

Functions based on erosion or dilation no longer require the user to specify a structuring element. The default structuring element is a cross-shape (connectivity=1). The number of dimensions in the image determines the dimentionality of the "hyper-cross" structuring element (ready for N-dimensional images).

Tests have been added to compare the results of the function called with an explicit structuring element with the function called without specifying the "selem".
I put a bunch of newlines at the end and it's still not displaying them
when I view the file on github. Is this a dos2unix problem with newline
characters?

I'm not going to spend any more time on it. Frustrated.

Nelson
On Jul 11, 2014 10:16 PM, "Juan Nunez-Iglesias" <notifications@github.com>
wrote:

> In skimage/morphology/selem.py:
>
> > +    default structuring element (selem) if no selem was specified.
> > +
> > +    Parameters
> > +    ----------
> > +    ndim : int
> > +        Number of dimensions of the image.
> > +
> > +    Returns
> > +    -------
> > +    selem : ndarray
> > +        The structuring element where elements of the neighborhood
> > +        are 1 and 0 otherwise.
> > +
> > +    """
> > +    return ndimage.morphology.generate_binary_structure(ndim, 1)
> > +
>
> Haha weird, it's still doing it because you added four spaces...!
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/scikit-image/scikit-image/pull/1058/files#r14851241>.
>