mirror of
https://github.com/wassname/scikit-image.git
synced 2026-06-27 18:25:32 +08:00
Fix some sphinx warnings and add to build
Fix some sphinx warnings Add documentation build to test Add documentation build to test Remove change in numpydoc Remove change in apigen Add makefile target for html and add to travis script Add a makefile target for html and add to travis script Fix more sphinx warnings
This commit is contained in:
+3
-5
@@ -123,9 +123,7 @@ Guidelines
|
||||
|
||||
* All code should have tests (see `test coverage`_ below for more details).
|
||||
* All code should be documented, to the same
|
||||
`standard
|
||||
<://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt#docstring-standard>`_
|
||||
as NumPy and SciPy.
|
||||
`standard <://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt#docstring-standard>`_ as NumPy and SciPy.
|
||||
* For new functionality, always add an example to the
|
||||
gallery.
|
||||
* No changes are ever committed without review. Ask on the
|
||||
@@ -195,8 +193,8 @@ successfully passes all tests. To do so,
|
||||
|
||||
* Go to `Travis-CI <http://travis-ci.org/>`__ and follow the Sign In link at the top
|
||||
|
||||
* Go to your `profile page <https://travis-ci.org/profile>`__ and switch on your
|
||||
scikit-image fork
|
||||
* Go to your `profile page <https://travis-ci.org/profile>`__ and switch
|
||||
on your scikit-image fork
|
||||
|
||||
It corresponds to steps one and two in
|
||||
`Travis-CI documentation <http://about.travis-ci.org/docs/user/getting-started/>`__
|
||||
|
||||
+5
-5
@@ -45,12 +45,12 @@ functionality is only available with the following installed:
|
||||
|
||||
* `Astropy <http://www.astropy.org>`__ provides FITS io capability.
|
||||
|
||||
*`SimpleITK <http://www.simpleitk.org/>`
|
||||
Optional io plugin providing a wide variety of `formats <http://www.itk.org/Wiki/ITK_File_Formats>`__.
|
||||
including specialized formats using in medical imaging.
|
||||
* `SimpleITK <http://www.simpleitk.org/>`
|
||||
Optional io plugin providing a wide variety of `formats <http://www.itk.org/Wiki/ITK_File_Formats>`__.
|
||||
including specialized formats using in medical imaging.
|
||||
|
||||
*`imread <http://pythonhosted.org/imread/>`
|
||||
Optional io plugin providing most standard `formats <http://pythonhosted.org//imread/formats.html>`__.
|
||||
* `imread <http://pythonhosted.org/imread/>`
|
||||
Optional io plugin providing most standard `formats <http://pythonhosted.org//imread/formats.html>`__.
|
||||
|
||||
|
||||
Testing requirements
|
||||
|
||||
@@ -14,3 +14,7 @@ doctest:
|
||||
|
||||
coverage:
|
||||
nosetests skimage --with-coverage --cover-package=skimage
|
||||
|
||||
html:
|
||||
pip install sphinx
|
||||
make -C docs html
|
||||
|
||||
@@ -95,6 +95,7 @@ def circle(cy, cx, radius, shape=None):
|
||||
Pixel coordinates of circle.
|
||||
May be used to directly index into an array, e.g.
|
||||
``img[rr, cc] = 1``.
|
||||
|
||||
Notes
|
||||
-----
|
||||
This function is a wrapper for skimage.draw.ellipse()
|
||||
|
||||
@@ -200,8 +200,10 @@ def threshold_isodata(image, nbins=256, return_all=False):
|
||||
|
||||
Histogram-based threshold, known as Ridler-Calvard method or inter-means.
|
||||
Threshold values returned satisfy the following equality:
|
||||
threshold = (image[image <= threshold].mean() +
|
||||
image[image > threshold].mean()) / 2.0
|
||||
|
||||
``threshold = (image[image <= threshold].mean() +``
|
||||
``image[image > threshold].mean()) / 2.0``
|
||||
|
||||
That is, returned thresholds are intensities that separate the image into
|
||||
two groups of pixels, where the threshold intensity is midway between the
|
||||
mean intensities of these groups.
|
||||
|
||||
@@ -220,7 +220,7 @@ def rag_mean_color(image, labels, connectivity=2, mode='distance',
|
||||
labels : ndarray, shape(M, N, [..., P,])
|
||||
The labelled image. This should have one dimension less than
|
||||
`image`. If `image` has dimensions `(M, N, 3)` `labels` should have
|
||||
dimensions `(M, N)`.
|
||||
dimensions `(M, N)`.
|
||||
connectivity : int, optional
|
||||
Pixels with a squared distance less than `connectivity` from each other
|
||||
are considered adjacent. It can range from 1 to `labels.ndim`. Its
|
||||
|
||||
@@ -368,7 +368,7 @@ def label(input, neighbors=None, background=None, return_num=False,
|
||||
Two pixels are connected when they are neighbors and have the same value.
|
||||
In 2D, they can be neighbors either in a 1- or 2-connected sense.
|
||||
The value refers to the maximum number of orthogonal hops to consider a
|
||||
pixel/voxel a neighbor.
|
||||
pixel/voxel a neighbor::
|
||||
|
||||
1-connectivity 2-connectivity diagonal connection close-up
|
||||
|
||||
|
||||
@@ -65,15 +65,15 @@ def find_boundaries(label_img, connectivity=1, mode='thick', background=0):
|
||||
How to mark the boundaries:
|
||||
|
||||
- thick: any pixel not completely surrounded by pixels of the
|
||||
same label (defined by `connectivity`) is marked as a boundary.
|
||||
This results in boundaries that are 2 pixels thick.
|
||||
same label (defined by `connectivity`) is marked as a boundary.
|
||||
This results in boundaries that are 2 pixels thick.
|
||||
- inner: outline the pixels *just inside* of objects, leaving
|
||||
background pixels untouched.
|
||||
background pixels untouched.
|
||||
- outer: outline pixels in the background around object
|
||||
boundaries. When two objects touch, their boundary is also
|
||||
marked.
|
||||
boundaries. When two objects touch, their boundary is also
|
||||
marked.
|
||||
- subpixel: return a doubled image, with pixels *between* the
|
||||
original pixels marked as boundary where appropriate.
|
||||
original pixels marked as boundary where appropriate.
|
||||
background: int, optional
|
||||
For modes 'inner' and 'outer', a definition of a background
|
||||
label is required. See `mode` for descriptions of these two.
|
||||
@@ -197,7 +197,7 @@ def mark_boundaries(image, label_img, color=(1, 1, 0),
|
||||
|
||||
See Also
|
||||
--------
|
||||
``find_boundaries``.
|
||||
find_boundaries
|
||||
"""
|
||||
marked = img_as_float(image, force_copy=True)
|
||||
if marked.ndim == 2:
|
||||
|
||||
@@ -16,15 +16,15 @@ def random_noise(image, mode='gaussian', seed=None, clip=True, **kwargs):
|
||||
mode : str
|
||||
One of the following strings, selecting the type of noise to add:
|
||||
|
||||
'gaussian' Gaussian-distributed additive noise.
|
||||
'localvar' Gaussian-distributed additive noise, with specified
|
||||
local variance at each point of `image`
|
||||
'poisson' Poisson-distributed noise generated from the data.
|
||||
'salt' Replaces random pixels with 1.
|
||||
'pepper' Replaces random pixels with 0.
|
||||
's&p' Replaces random pixels with 0 or 1.
|
||||
'speckle' Multiplicative noise using out = image + n*image, where
|
||||
n is uniform noise with specified mean & variance.
|
||||
- 'gaussian' Gaussian-distributed additive noise.
|
||||
- 'localvar' Gaussian-distributed additive noise, with specified
|
||||
local variance at each point of `image`
|
||||
- 'poisson' Poisson-distributed noise generated from the data.
|
||||
- 'salt' Replaces random pixels with 1.
|
||||
- 'pepper' Replaces random pixels with 0.
|
||||
- 's&p' Replaces random pixels with 0 or 1.
|
||||
- 'speckle' Multiplicative noise using out = image + n*image, where
|
||||
n is uniform noise with specified mean & variance.
|
||||
seed : int
|
||||
If provided, this will set the random seed before generating noise,
|
||||
for valid pseudo-random comparisons.
|
||||
|
||||
@@ -5,6 +5,9 @@ section "Test.with.min.requirements"
|
||||
nosetests $TEST_ARGS skimage
|
||||
section_end "Test.with.min.requirements"
|
||||
|
||||
section "Build.docs"
|
||||
make html
|
||||
section_end "Build.docs"
|
||||
|
||||
section "Flake8.test"
|
||||
flake8 --exit-zero --exclude=test_*,six.py skimage doc/examples viewer_examples
|
||||
|
||||
Reference in New Issue
Block a user