mirror of
https://github.com/wassname/scikit-image.git
synced 2026-10-05 13:10:48 +08:00
A first pass to let the gallery build using sphinx-gallery.
This commit is contained in:
1 parent
dfafc5045e
commit
ef9bcfb778
49 files changed
+45
-33
No files matched your search
+2
-2
@@ -43,7 +43,7 @@ api:
|
||||
|
||||
release_notes:
|
||||
@echo "Copying release notes"
|
||||
@tail -n +4 `ls release/*.txt | sort -k 2 -t . -n | tail -n 1` > release/_release_notes_for_docs.txt
|
||||
@tail -n +4 `ls release/*.rst | sort -k 2 -t . -n | tail -n 1` > release/_release_notes_for_docs.rst
|
||||
|
||||
html: api release_notes
|
||||
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(DEST)/html
|
||||
@@ -129,4 +129,4 @@ gitwash:
|
||||
--project-ml-url=http://groups.google.com/group/scikit-image \
|
||||
--repo-name=scikit-image \
|
||||
--github-user=scikit-image \
|
||||
--source-suffix=.txt
|
||||
--source-suffix=.rst
|
||||
@@ -5,4 +5,6 @@ General examples
|
||||
|
||||
General-purpose and introductory examples for scikit-image.
|
||||
|
||||
The `narrative documentation <../user_guide.html>`_ introduces conventions and basic image manipulations.
|
||||
The `narrative documentation <../user_guide.html>`_ introduces
|
||||
conventions and basic image manipulations.
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
from __future__ import division
|
||||
"""
|
||||
========================
|
||||
Sliding window histogram
|
||||
@@ -35,6 +34,7 @@ References
|
||||
.. [2] S.Perreault and P.Hebert. Median filtering in constant time.
|
||||
Trans. Image Processing, 16(9):2389-2394, 2007.
|
||||
"""
|
||||
from __future__ import division
|
||||
import numpy as np
|
||||
import matplotlib
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
@@ -42,14 +42,12 @@ ax3.set_title('After phase unwrapping')
|
||||
fig.colorbar(ax4.imshow(image_unwrapped - image, cmap='gray'), ax=ax4)
|
||||
ax4.set_title('Unwrapped minus original')
|
||||
|
||||
"""
|
||||
.. image:: PLOT2RST.current_figure
|
||||
|
||||
The unwrapping procedure accepts masked arrays, and can also optionally
|
||||
assume cyclic boundaries to connect edges of an image. In the example below,
|
||||
we study a simple phase ramp which has been split in two by masking
|
||||
a row of the image.
|
||||
"""
|
||||
###########################################################################
|
||||
# The unwrapping procedure accepts masked arrays, and can also optionally
|
||||
# assume cyclic boundaries to connect edges of an image. In the example below,
|
||||
# we study a simple phase ramp which has been split in two by masking
|
||||
# a row of the image.
|
||||
|
||||
# Create a simple ramp
|
||||
image = np.ones((100, 100)) * np.linspace(0, 8 * np.pi, 100).reshape((-1, 1))
|
||||
@@ -84,24 +82,22 @@ ax4.set_title('Unwrapped with wrap_around')
|
||||
|
||||
plt.show()
|
||||
|
||||
"""
|
||||
.. image:: PLOT2RST.current_figure
|
||||
|
||||
In the figures above, the masked row can be seen as a white line across
|
||||
the image. The difference between the two unwrapped images in the bottom row
|
||||
is clear: Without unwrapping (lower left), the regions above and below the
|
||||
masked boundary do not interact at all, resulting in an offset between the
|
||||
two regions of an arbitrary integer times two pi. We could just as well have
|
||||
unwrapped the regions as two separate images. With wrap around enabled for the
|
||||
vertical direction (lower right), the situation changes: Unwrapping paths are
|
||||
now allowed to pass from the bottom to the top of the image and vice versa, in
|
||||
effect providing a way to determine the offset between the two regions.
|
||||
|
||||
References
|
||||
----------
|
||||
|
||||
.. [1] Miguel Arevallilo Herraez, David R. Burton, Michael J. Lalor,
|
||||
and Munther A. Gdeisat, "Fast two-dimensional phase-unwrapping
|
||||
algorithm based on sorting by reliability following a noncontinuous
|
||||
path", Journal Applied Optics, Vol. 41, No. 35, pp. 7437, 2002
|
||||
"""
|
||||
###########################################################################
|
||||
# In the figures above, the masked row can be seen as a white line across
|
||||
# the image. The difference between the two unwrapped images in the bottom row
|
||||
# is clear: Without unwrapping (lower left), the regions above and below the
|
||||
# masked boundary do not interact at all, resulting in an offset between the
|
||||
# two regions of an arbitrary integer times two pi. We could just as well have
|
||||
# unwrapped the regions as two separate images. With wrap around enabled for the
|
||||
# vertical direction (lower right), the situation changes: Unwrapping paths are
|
||||
# now allowed to pass from the bottom to the top of the image and vice versa, in
|
||||
# effect providing a way to determine the offset between the two regions.
|
||||
#
|
||||
# References
|
||||
# ----------
|
||||
#
|
||||
# .. [1] Miguel Arevallilo Herraez, David R. Burton, Michael J. Lalor,
|
||||
# and Munther A. Gdeisat, "Fast two-dimensional phase-unwrapping
|
||||
# algorithm based on sorting by reliability following a noncontinuous
|
||||
# path", Journal Applied Optics, Vol. 41, No. 35, pp. 7437, 2002
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+16
-2
@@ -31,11 +31,23 @@ extensions = ['sphinx.ext.autodoc',
|
||||
'sphinx.ext.imgmath',
|
||||
'numpydoc',
|
||||
'sphinx.ext.autosummary',
|
||||
'plot2rst',
|
||||
#'plot2rst',
|
||||
'sphinx.ext.intersphinx',
|
||||
'sphinx.ext.linkcode',
|
||||
'sphinx_gallery.gen_gallery'
|
||||
]
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Sphinx-gallery configuration
|
||||
#------------------------------------------------------------------------
|
||||
|
||||
sphinx_gallery_conf = {
|
||||
# path to your examples scripts
|
||||
'examples_dirs' : '../examples',
|
||||
# path where to save gallery generated examples
|
||||
'gallery_dirs' : 'auto_examples',
|
||||
}
|
||||
|
||||
# Determine if the matplotlib has a recent enough version of the
|
||||
# plot_directive, otherwise use the local fork.
|
||||
try:
|
||||
@@ -57,7 +69,7 @@ else:
|
||||
templates_path = ['_templates']
|
||||
|
||||
# The suffix of source filenames.
|
||||
source_suffix = '.txt'
|
||||
source_suffix = '.rst'
|
||||
|
||||
# The encoding of source files.
|
||||
#source_encoding = 'utf-8-sig'
|
||||
@@ -366,3 +378,5 @@ def linkcode_resolve(domain, info):
|
||||
else:
|
||||
return ("http://github.com/scikit-image/scikit-image/blob/"
|
||||
"v%s/skimage/%s%s" % (skimage.__version__, fn, linespec))
|
||||
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user