diff --git a/doc/examples/applications/plot_rank_filters.py b/doc/examples/applications/plot_rank_filters.py index c182671d..31284226 100644 --- a/doc/examples/applications/plot_rank_filters.py +++ b/doc/examples/applications/plot_rank_filters.py @@ -361,7 +361,7 @@ The example compares the local threshold with the global threshold Local thresholding is much slower than global one. There exists a function for global Otsu thresholding: `skimage.filter.threshold_otsu`. -.. [1] http://en.wikipedia.org/wiki/Otsu's_method +.. [4] http://en.wikipedia.org/wiki/Otsu's_method """ diff --git a/doc/examples/plot_swirl.py b/doc/examples/plot_swirl.py index f05246b0..98226a20 100644 --- a/doc/examples/plot_swirl.py +++ b/doc/examples/plot_swirl.py @@ -42,9 +42,9 @@ mapping for the swirl transformation first computes, relative to a center .. math:: - \theta = \arctan(y/x) + \\theta = \\arctan(y/x) - \rho = \sqrt{(x - x_0)^2 + (y - y_0)^2}, + \\rho = \sqrt{(x - x_0)^2 + (y - y_0)^2}, and then transforms them according to @@ -56,12 +56,12 @@ and then transforms them according to s = \mathtt{strength} - \theta' = \phi + s \, e^{-\rho / r + \theta} + \\theta' = \phi + s \, e^{-\\rho / r + \\theta} where ``strength`` is a parameter for the amount of swirl, ``radius`` indicates the swirl extent in pixels, and ``rotation`` adds a rotation angle. The transformation of ``radius`` into :math:`r` is to ensure that the -transformation decays to :math:`\approx 1/1000^{\mathsf{th}}` within the +transformation decays to :math:`\\approx 1/1000^{\mathsf{th}}` within the specified radius. """ diff --git a/doc/source/install.txt b/doc/source/install.txt index 7c886549..5e57a540 100644 --- a/doc/source/install.txt +++ b/doc/source/install.txt @@ -6,8 +6,9 @@ Pre-built installation are kindly provided by Christoph Gohlke. The latest stable release is also included as part of the `Enthought Python -Distribution (EPD) `__ and `Python(x,y) -`__. +Distribution (EPD) `__, `Python(x,y) +`__ and +`Anaconda `__. On systems that support setuptools, the package can be installed from the `Python packaging index `__ using @@ -28,34 +29,26 @@ Installation from source Obtain the source from the git-repository at `http://github.com/scikit-image/scikit-image -`_. - -by running - -:: +`_ by running:: git clone http://github.com/scikit-image/scikit-image.git -in a terminal (You will need to have git installed on your machine). +in a terminal (you will need to have git installed on your machine). If you do not have git installed, you can also download a zipball from `https://github.com/scikit-image/scikit-image/zipball/master `_. -The SciKit can be installed globally using - -:: +The SciKit can be installed globally using:: python setup.py install -or locally using - -:: +or locally using:: python setup.py install --prefix=${HOME} If you prefer, you can use it without installing, by simply adding -this path to your PYTHONPATH variable and compiling extensions +this path to your ``PYTHONPATH`` variable and compiling extensions in-place:: python setup.py build_ext -i diff --git a/doc/source/themes/scikit-image/static/css/custom.css b/doc/source/themes/scikit-image/static/css/custom.css index 85a174df..18ee7a34 100644 --- a/doc/source/themes/scikit-image/static/css/custom.css +++ b/doc/source/themes/scikit-image/static/css/custom.css @@ -41,6 +41,12 @@ h6 { font-size: 13px; line-height: 15px; } +blockquote { + border-left: 0; +} +dt { + font-weight: normal; +} .logo { float: left; @@ -222,3 +228,8 @@ p.admonition-title { width: 200px; text-align: center !important; } + +/* misc */ +div.math { + text-align: center; +} diff --git a/doc/source/user_guide/getting_help.txt b/doc/source/user_guide/getting_help.txt index ea444856..7d56fea4 100644 --- a/doc/source/user_guide/getting_help.txt +++ b/doc/source/user_guide/getting_help.txt @@ -24,7 +24,7 @@ Contributing examples to the gallery can be done on github (see Search field ------------ -The ``quick search`` field located in the sidebar of the html +The ``quick search`` field located in the navigation bar of the html documentation can be used to search for specific keywords (segmentation, rescaling, denoising, etc.). diff --git a/skimage/_shared/utils.py b/skimage/_shared/utils.py index acdf9c16..aad9220d 100644 --- a/skimage/_shared/utils.py +++ b/skimage/_shared/utils.py @@ -27,9 +27,9 @@ class deprecated(object): alt_msg = '' if self.alt_func is not None: - alt_msg = ' Use `%s` instead.' % self.alt_func + alt_msg = ' Use ``%s`` instead.' % self.alt_func - msg = 'Call to deprecated function `%s`.' % func.__name__ + msg = 'Call to deprecated function ``%s``.' % func.__name__ msg += alt_msg @functools.wraps(func) @@ -48,6 +48,6 @@ class deprecated(object): if wrapped.__doc__ is None: wrapped.__doc__ = doc else: - wrapped.__doc__ = doc + '\n\n' + wrapped.__doc__ + wrapped.__doc__ = doc + '\n\n ' + wrapped.__doc__ return wrapped diff --git a/skimage/filter/__init__.py b/skimage/filter/__init__.py index ef8460a5..1e13a87e 100644 --- a/skimage/filter/__init__.py +++ b/skimage/filter/__init__.py @@ -9,6 +9,7 @@ from ._denoise_cy import denoise_bilateral, denoise_tv_bregman from ._rank_order import rank_order from ._gabor import gabor_kernel, gabor_filter from .thresholding import threshold_otsu, threshold_adaptive +from . import rank __all__ = ['inverse', @@ -36,4 +37,5 @@ __all__ = ['inverse', 'gabor_kernel', 'gabor_filter', 'threshold_otsu', - 'threshold_adaptive'] + 'threshold_adaptive', + 'rank'] diff --git a/skimage/filter/thresholding.py b/skimage/filter/thresholding.py index 77f244fc..40e62d12 100644 --- a/skimage/filter/thresholding.py +++ b/skimage/filter/thresholding.py @@ -9,10 +9,10 @@ def threshold_adaptive(image, block_size, method='gaussian', offset=0, mode='reflect', param=None): """Applies an adaptive threshold to an array. - Also known as local or dynamic thresholding where the threshold value is the - weighted mean for the local neighborhood of a pixel subtracted by a - constant. Alternatively the threshold can be determined dynamically by a - a given function using the 'generic' method. + Also known as local or dynamic thresholding where the threshold value is + the weighted mean for the local neighborhood of a pixel subtracted by a + constant. Alternatively the threshold can be determined dynamically by a a + given function using the 'generic' method. Parameters ---------- @@ -26,10 +26,10 @@ def threshold_adaptive(image, block_size, method='gaussian', offset=0, weighted mean image. * 'generic': use custom function (see `param` parameter) - * 'gaussian': apply gaussian filter (see `param` parameter for custom + * 'gaussian': apply gaussian filter (see `param` parameter for custom\ sigma value) * 'mean': apply arithmetic mean filter - * 'median' apply median rank filter + * 'median': apply median rank filter By default the 'gaussian' method is used. offset : float, optional @@ -42,8 +42,8 @@ def threshold_adaptive(image, block_size, method='gaussian', offset=0, param : {int, function}, optional Either specify sigma for 'gaussian' method or function object for 'generic' method. This functions takes the flat array of local - neighbourhood as a single argument and returns the calculated threshold - for the centre pixel. + neighbourhood as a single argument and returns the calculated + threshold for the centre pixel. Returns ------- @@ -52,8 +52,7 @@ def threshold_adaptive(image, block_size, method='gaussian', offset=0, References ---------- - http://docs.opencv.org/modules/imgproc/doc/miscellaneous_transformations - .html?highlight=threshold#adaptivethreshold + .. [1] http://docs.opencv.org/modules/imgproc/doc/miscellaneous_transformations.html?highlight=threshold#adaptivethreshold Examples -------- diff --git a/skimage/measure/fit.py b/skimage/measure/fit.py index 87febf70..66502ffa 100644 --- a/skimage/measure/fit.py +++ b/skimage/measure/fit.py @@ -559,7 +559,7 @@ def ransac(data, model_class, min_samples, residual_threshold, >>> ransac_model, inliers = ransac(data, EllipseModel, 5, 3, max_trials=50) >>> # ransac_model._params, inliers - Should give the correct result estimated without the faulty data: + Should give the correct result estimated without the faulty data:: [ 20.12762373, 29.73563061, 4.81499637, 10.4743584, 0.05217117] [ 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,