Merge branch 'v0.7.2-prep' into v0.7.x

Conflicts:
	bento.info
	setup.py
This commit is contained in:
Stefan van der Walt
2012-10-13 23:44:57 -07:00
85 changed files with 879 additions and 1386 deletions
+1 -1
View File
@@ -107,7 +107,7 @@
- Johannes Schönberger
Drawing functions, adaptive thresholding, regionprops, geometric
transformations, LBPs, polygon approximations, and more.
transformations, LBPs, polygon approximations, web layout, and more.
- Pavel Campr
Fixes and tests for Histograms of Oriented Gradients.
+4 -4
View File
@@ -4,8 +4,8 @@ Development process
:doc:`Read this overview <gitwash/index>` of how to use Git with
``skimage``. Here's the long and short of it:
* Go to `https://github.com/scikits-image/scikits-image
<http://github.com/scikits-image/scikits-image>`_ and follow the
* Go to `https://github.com/scikit-image/scikit-image
<http://github.com/scikit-image/scikit-image>`_ and follow the
instructions on making your own fork.
* Create a new branch for the feature you want to work on. Since the
branch name will appear in the merge message, use a sensible name
@@ -42,7 +42,7 @@ Guidelines
* Follow the `Python PEPs <http://www.python.org/dev/peps/pep-0008/>`_
where possible.
* No major changes should be committed without review. Ask on the
`mailing list <http://groups.google.com/group/scikits-image>`_ if
`mailing list <http://groups.google.com/group/scikit-image>`_ if
you get no response to your pull request.
* Examples in the gallery should have a maximum figure width of 8 inches.
@@ -99,4 +99,4 @@ detailing the test coverage::
Bugs
````
Please `report bugs on Github <https://github.com/scikits-image/scikits-image/issues>`_.
Please `report bugs on Github <https://github.com/scikit-image/scikit-image/issues>`_.
+1 -1
View File
@@ -1,7 +1,7 @@
Unless otherwise specified by LICENSE.txt files in individual
directories, all code is
Copyright (C) 2011, the scikits-image team
Copyright (C) 2011, the scikit-image team
All rights reserved.
Redistribution and use in source and binary forms, with or without
+2 -2
View File
@@ -3,11 +3,11 @@ Image Processing SciKit
Source
------
https://github.com/scikits-image/scikits-image
https://github.com/scikit-image/scikit-image
Mailing List
------------
http://groups.google.com/group/scikits-image
http://groups.google.com/group/scikit-image
Installation from source
------------------------
+31 -13
View File
@@ -2,34 +2,52 @@ How to make a new release of ``skimage``
========================================
- Update release notes.
- Update the version number in setup.py and bento.info and commit
- To show a list contributors, run ``doc/release/contributors.sh <commit>``,
where ``<commit>`` is the first commit since the previous release.
- Update the version number in ``setup.py`` and ``bento.info`` and commit
- Update the docs:
- Edit ``doc/source/themes/agogo/static/docversions.js`` and commit
- Build a clean version of the docs. Run "make" in the root dir, then
``rm build -rf; make html`` in the docs. Make sure the random.js
- Build a clean version of the docs. Run ``make`` in the root dir, then
``rm build -rf; make html`` in the docs.
- Run ``make html`` again to copy the newly generated ``random.js`` into
place. Double check ``random.js``, otherwise the skimage.org front
page gets broken!
- Push upstream using "make gh-pages"
- Build using ``make gh-pages``.
- Push upstream: ``git push`` in ``doc/gh-pages``.
- Add the version number as a tag in git::
git tag v0.6
git tag v0.X.0
- Push the new meta-data to github::
git push --tags origin master
git push --tags origin master
- Publish on PyPi:
- Publish on PyPi::
python setup.py register
python setup.py sdist upload
python setup.py register
python setup.py sdist upload
- Increase the version number in the setup.py file to ``0.Xdev``.
- Increase the version number
- In ``setup.py``, set to ``0.Xdev``.
- In ``bento.info``, set to ``0.X.dev0``.
- Update the web frontpage:
The webpage is kept in a separate repo: scikits-image-web
- ``_templates/sidebar_versions.html``
- ``index.rst``
The webpage is kept in a separate repo: scikit-image-web
- Sync your branch with the remote repo: ``git pull``.
If you try to ``make gh-pages`` when your branch is out of sync, it
creates headaches.
- Update stable and development version numbers in
``_templates/sidebar_versions.html``.
- Add release date to ``index.rst`` under "Announcements".
- Build using ``make gh-pages``.
- Push upstream: ``git push`` in ``gh-pages``.
- Post release notes on mailing lists, blog, G+, etc.
+2 -110
View File
@@ -16,122 +16,14 @@ How to contribute to ``skimage``
Developing Open Source is great fun! Join us on the `skimage mailing
list <http://groups.google.com/group/scikits-image>`_ and tell us which of the
list <http://groups.google.com/group/scikit-image>`_ and tell us which of the
following challenges you'd like to solve.
* Mentoring is available for those new to scientific programming in Python.
* The technical detail of the `development process`_ is given below.
* :doc:`How to use GitHub <gitwash/index>` when developing skimage
* If you're looking something to implement, you can find a list of `requested features on github <https://github.com/scikit-image/scikit-image/wiki/Requested-features>`__. In addition, you can browse the `open issues on github <https://github.com/scikit-image/scikit-image/issues?state=open>`__.
.. contents::
:local:
Tasks
-----
.. :doc:`gsoc2011`
.. :doc:`coverage_table`
Implement Algorithms
````````````````````
- Graph cut segmentation
- `Image colorization <http://www.cs.huji.ac.il/~yweiss/Colorization/>`__
- Fast 2D convex hull (consider using CellProfiler version)
`Algorithm overview <http://www.tcs.fudan.edu.cn/rudolf/Courses/Algorithms/Alg_cs_07w/Webprojects/Zhaobo_hull/index.html#section26>`__.
`One free implementation
<http://cm.bell-labs.com/cm/cs/who/clarkson/2dch.c>`_.
[Compare against current implementation]
- Convex hulls of objects in a labels matrix (simply adapt current convex hull
image code--this one's low hanging fruit). Generalise this solution to also
skeletonize objects in a labels matrix.
- Add binary features (BRIEF, BRISK, FREAK)
- Add `STAR features <http://pr.willowgarage.com/wiki/Star_Detector>`__
- `Blurring kernel estimation <http://bit.ly/Nril3u>`__
Drawing (directly on an ndarray)
````````````````````````````````
- Wu's algorithm for circles
- Text rendering
- Add anti-aliasing
Infrastructure
--------------
- Add @greyimage decorator to check if input is a greyscale image
- :strike:`Implement a new backend system so that we may start including
PyOpenCL-based algorithms`
Adapt existing code for use
```````````````````````````
These snippets and packages have already been written. Some need to be
modified to work as part of the scikit, others may be lacking in documentation
or tests.
* :strike:`Connected components`
* Nadav's bilateral filtering (first compare against CellProfiler's
code, based on http://groups.csail.mit.edu/graphics/bilagrid/bilagrid_web.pdf)
Also see https://github.com/stefanv/scikits-image/tree/bilateral
* 2D image warping via thin-plate splines [ask Zach Pincus]
Merge code provided by `CellProfiler <http://www.cellprofiler.org>`_ team
`````````````````````````````````````````````````````````````````````````
* Roberts filter - convolution with diagonal and anti-diagonal
kernels to detect edges
* Minimum enclosing circles of objects in a labels matrix
* spur removal, thinning, thickening, and other morphological operations on
binary images, framework for creating arbitrary morphological operations
using a 3x3 grid.
Their SVN repository is read-accessible at
- https://svn.broadinstitute.org/CellProfiler/trunk/CellProfiler/cellprofiler
The files for the above algorithms are
- https://svn.broadinstitute.org/CellProfiler/trunk/CellProfiler/cellprofiler/cpmath/cpmorphology.py
- https://svn.broadinstitute.org/CellProfiler/trunk/CellProfiler/cellprofiler/cpmath/filter.py
There are test suites for the files at
- https://svn.broadinstitute.org/CellProfiler/trunk/CellProfiler/cellprofiler/cpmath/tests/test_cpmorphology.py
- https://svn.broadinstitute.org/CellProfiler/trunk/CellProfiler/cellprofiler/cpmath/tests/test_filter.py
Quoting a message from Lee Kamentsky to Stefan van der Walt sent on
5 August 2009::
We're part of the Broad Institute which is non-profit. We would be happy
to include our algorithm code in SciPy under the BSD license since that is
more appropriate for a library that might be integrated into a
commercial product whereas CellProfiler needs the more stringent
protection of GPL as an application.
In 2010, Vebjorn Ljosa officially released parts of the code under a
BSD license (:doc:`cell_profiler` | `original message
<http://groups.google.com/group/scikits-image/browse_thread/thread/c4f8fc584bfd839d>`_).
Thanks to Lee Kamentsky, Thouis Jones and Anne Carpenter and their colleagues
who contributed.
Rework linear filters
`````````````````````
* Fast, SSE2 convolution (high priority) (see prototype in pull requests)
* Should take kernel or function for parameter (currently only takes function)
* Kernel shape should be specifiable (currently defaults to image shape)
io
``
* Update ``qt_plugin.py`` and other plugins to view collections.
* Rewrite GTK backend using GObject Introspection for Py3K compatibility.
* Add DICOM plugin for `GDCM <http://sourceforge.net/apps/mediawiki/gdcm>`__.
* Add ``imread_collection`` to all ``imread`` backends
* Better video loading (move to plugin framework, add backends)
viewer
``````
* Using the visualization tools, add an FFT-domain image editor
docs
````
* Add examples to the gallery
* Write topics for the `user guide
<http://scikits-image.org/docs/dev/user_guide.html>`_
* Integrate BiBTeX plugin into Sphinx build
+5 -5
View File
@@ -1,15 +1,15 @@
Name: scikits-image
Version: 0.7.1
Name: scikit-image
Version: 0.7.2
Summary: Image processing routines for SciPy
Url: http://scikits-image.org
DownloadUrl: http://github.com/scikits-image/scikits-image
Url: http://scikit-image.org
DownloadUrl: http://github.com/scikit-image/scikit-image
Description: Image Processing SciKit
Image processing algorithms for SciPy, including IO, morphology, filtering,
warping, color manipulation, object detection, etc.
Please refer to the online documentation at
http://scikits-image.org/
http://scikit-image.org/
Maintainer: Stefan van der Walt
MaintainerEmail: stefan@sun.ac.za
License: Modified BSD
+2 -1
View File
@@ -69,7 +69,8 @@ def print_results(cy_bento, cy_setup):
print(text)
print('-' * len(text))
print # blank line; just for aesthetics
print "Bento errors:"
print "-------------"
if cy_bento:
info("The following extensions in 'bento.info' were not found:")
+9 -9
View File
@@ -77,17 +77,17 @@ qthelp:
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in build/qthelp, like this:"
@echo "# qcollectiongenerator build/qthelp/scikitsimage.qhcp"
@echo "# qcollectiongenerator build/qthelp/scikitimage.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile build/qthelp/scikitsimage.qhc"
@echo "# assistant -collectionFile build/qthelp/scikitimage.qhc"
devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(DEST)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/scikitsimage"
@echo "# ln -s build/devhelp $$HOME/.local/share/devhelp/scikitsimage"
@echo "# mkdir -p $$HOME/.local/share/devhelp/scikitimage"
@echo "# ln -s build/devhelp $$HOME/.local/share/devhelp/scikitimage"
@echo "# devhelp"
latex:
@@ -123,9 +123,9 @@ gh-pages:
python gh-pages.py
gitwash:
python tools/gitwash/gitwash_dumper.py source scikits-image \
--project-url=http://scikits-image.org \
--project-ml-url=http://groups.google.com/group/scikits-image \
--repo-name=scikits-image \
--github-user=scikits-image \
python tools/gitwash/gitwash_dumper.py source scikit-image \
--project-url=http://scikit-image.org \
--project-ml-url=http://groups.google.com/group/scikit-image \
--repo-name=scikit-image \
--github-user=scikit-image \
--source-suffix=.txt
+34 -7
View File
@@ -9,7 +9,7 @@ To generate your own examples, add this extension to the list of
example directory(ies) in `plot2rst_paths` (see below) points to a directory
with examples named `plot_*.py` and include an `index.rst` file.
This code was adapted from scikits-image, which took it from scikits-learn.
This code was adapted from scikit-image, which took it from scikit-learn.
Options
-------
@@ -27,9 +27,10 @@ plot2rst_rcparams : dict
plot2rst_default_thumb : str
Path (relative to doc root) of default thumbnail image.
plot2rst_thumb_scale : float
Scale factor for thumbnail (e.g., 0.2 to scale plot to 1/5th the
original size).
plot2rst_thumb_shape : float
Shape of thumbnail in pixels. The image is resized to fit within this shape
and the excess is filled with white pixels. This fixed size ensures that
that gallery images are displayed in a grid.
plot2rst_plot_tag : str
When this tag is found in the example file, the current plot is saved and
@@ -73,7 +74,10 @@ import numpy as np
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from matplotlib import image
from skimage import io
from skimage import transform
from skimage.util.dtype import dtype_range
LITERALINCLUDE = """
@@ -160,7 +164,7 @@ def setup(app):
('../examples', 'auto_examples'), True)
app.add_config_value('plot2rst_rcparams', {}, True)
app.add_config_value('plot2rst_default_thumb', None, True)
app.add_config_value('plot2rst_thumb_scale', 0.25, True)
app.add_config_value('plot2rst_thumb_shape', (250, 300), True)
app.add_config_value('plot2rst_plot_tag', 'PLOT2RST.current_figure', True)
app.add_config_value('plot2rst_index_name', 'index', True)
@@ -335,7 +339,8 @@ def write_example(src_name, src_dir, rst_dir, cfg):
thumb_path = thumb_dir.pjoin(src_name[:-3] + '.png')
first_image_file = image_dir.pjoin(figure_list[0].lstrip('/'))
if first_image_file.exists:
image.thumbnail(first_image_file, thumb_path, cfg.plot2rst_thumb_scale)
first_image = io.imread(first_image_file)
save_thumbnail(first_image, thumb_path, cfg.plot2rst_thumb_shape)
if not thumb_path.exists:
if cfg.plot2rst_default_thumb is None:
@@ -345,6 +350,28 @@ def write_example(src_name, src_dir, rst_dir, cfg):
shutil.copy(cfg.plot2rst_default_thumb, thumb_path)
def save_thumbnail(image, thumb_path, shape):
"""Save image as a thumbnail with the specified shape.
The image is first resized to fit within the specified shape and then
centered in an array of the specified shape before saving.
"""
rescale = min(float(w_1) / w_2 for w_1, w_2 in zip(shape, image.shape))
small_shape = (rescale * np.asarray(image.shape[:2])).astype(int)
small_image = transform.resize(image, small_shape)
if len(image.shape) == 3:
shape = shape + (image.shape[2],)
background_value = dtype_range[small_image.dtype.type][1]
thumb = background_value * np.ones(shape, dtype=small_image.dtype)
i = (shape[0] - small_shape[0]) // 2
j = (shape[1] - small_shape[1]) // 2
thumb[i:i+small_shape[0], j:j+small_shape[1]] = small_image
io.imsave(thumb_path, thumb)
def _plots_are_current(src_path, image_path):
first_image_file = Path(image_path.format(1))
needs_replot = (not first_image_file.exists or
+4 -4
View File
@@ -30,7 +30,7 @@ from subprocess import Popen, PIPE, CalledProcessError, check_call
pages_dir = 'gh-pages'
html_dir = 'build/html'
pdf_dir = 'build/latex'
pages_repo = 'git@github.com:scikits-image/docs.git'
pages_repo = 'git@github.com:scikit-image/docs.git'
#-----------------------------------------------------------------------------
# Functions
@@ -108,7 +108,7 @@ if __name__ == '__main__':
shutil.copytree(html_dir, dest)
# copy pdf file into tree
#shutil.copy(pjoin(pdf_dir, 'scikits.image.pdf'), pjoin(dest, 'scikits.image.pdf'))
try:
cd(pages_dir)
status = sh2('git status | head -1')
@@ -117,7 +117,7 @@ if __name__ == '__main__':
e = 'On %r, git branch is %r, MUST be "gh-pages"' % (pages_dir,
branch)
raise RuntimeError(e)
sh("touch .nojekyll")
sh("touch .nojekyll")
sh('git add .nojekyll')
sh('git add index.html')
sh('git add %s' % tag)
@@ -131,4 +131,4 @@ if __name__ == '__main__':
print
print 'Now verify the build in: %r' % dest
print "If everything looks good, 'git push'"
print "If everything looks good, run 'git push' inside doc/gh-pages."
+2 -2
View File
@@ -1,11 +1,11 @@
.PHONY: logo
logo: green_orange_snake.png snake_logo.svg
inkscape --export-png=scikits_image_logo.png --export-dpi=100 \
inkscape --export-png=scikit_image_logo.png --export-dpi=100 \
--export-area-drawing --export-background-opacity=1 \
snake_logo.svg
python shrink_logo.py
green_orange_snake.png:
python scikits_image_logo.py --no-plot
python scikit_image_logo.py --no-plot
+2 -2
View File
@@ -2,7 +2,7 @@ from skimage import io, transform
s = 0.7
img = io.imread('scikits_image_logo.png')
img = io.imread('scikit_image_logo.png')
h, w, c = img.shape
print "\nScaling down logo by %.1fx..." % s
@@ -13,4 +13,4 @@ img = transform.homography(img, [[s, 0, 0],
output_shape=(int(h*s), int(w*s), 4),
order=3)
io.imsave('scikits_image_logo_small.png', img)
io.imsave('scikit_image_logo_small.png', img)
+1 -1
View File
@@ -74,7 +74,7 @@
y="278.58533"
x="261.22247"
id="tspan3152"
sodipodi:role="line">scikits-image</tspan></text>
sodipodi:role="line">scikit-image</tspan></text>
<text
sodipodi:linespacing="125%"
id="text3154"

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

+2 -2
View File
@@ -74,9 +74,9 @@ if "%1" == "qthelp" (
echo.
echo.Build finished; now you can run "qcollectiongenerator" with the ^
.qhcp project file in build/qthelp, like this:
echo.^> qcollectiongenerator build\qthelp\scikitsimage.qhcp
echo.^> qcollectiongenerator build\qthelp\scikitimage.qhcp
echo.To view the help file:
echo.^> assistant -collectionFile build\qthelp\scikitsimage.ghc
echo.^> assistant -collectionFile build\qthelp\scikitimage.ghc
goto end
)
-144
View File
@@ -1,144 +0,0 @@
/* This CSS stylesheet is no longer used. Edit agogo.css instead. */
/**
* Sphinx stylesheet -- default theme
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
@import url("basic.css");
/* -- page layout ----------------------------------------------------------- */
body {
font-family: {{ theme_bodyfont }};
font-size: 100%;
background-color: {{ theme_footerbgcolor }};
color: #000;
margin: 0;
padding: 0;
}
div.document {
background-color: {{ theme_sidebarbgcolor }};
}
div.documentwrapper {
float: left;
width: 100%;
}
div.bodywrapper {
margin: 0 0 0 230px;
}
div.body {
background-color: {{ theme_bgcolor }};
color: {{ theme_textcolor }};
padding: 0 20px 30px 20px;
overflow: auto;
}
{%- if theme_rightsidebar|tobool %}
div.bodywrapper {
margin: 0 230px 0 0;
}
{%- endif %}
div.footer {
color: {{ theme_footertextcolor }};
width: 100%;
padding: 9px 0 9px 0;
text-align: center;
font-size: 75%;
}
div.footer a {
color: {{ theme_footertextcolor }};
text-decoration: underline;
}
div.related {
background-color: {{ theme_relbarbgcolor }};
line-height: 30px;
color: {{ theme_relbartextcolor }};
}
div.related a {
color: {{ theme_relbarlinkcolor }};
}
div.sphinxsidebar {
{%- if theme_stickysidebar|tobool %}
top: 30px;
margin: 0;
position: fixed;
overflow: auto;
height: 100%;
{%- endif %}
{%- if theme_rightsidebar|tobool %}
float: right;
{%- if theme_stickysidebar|tobool %}
right: 0;
{%- endif %}
{%- endif %}
}
{%- if theme_stickysidebar|tobool %}
/* this is nice, but it it leads to hidden headings when jumping
to an anchor */
/*
div.related {
position: fixed;
}
div.documentwrapper {
margin-top: 30px;
}
*/
{%- endif %}
div.sphinxsidebar h3 {
font-family: {{ theme_headfont }};
color: {{ theme_sidebartextcolor }};
font-size: 1.4em;
font-weight: normal;
margin: 0;
padding: 0;
}
div.sphinxsidebar h3 a {
color: {{ theme_sidebartextcolor }};
}
div.sphinxsidebar h4 {
font-family: {{ theme_headfont }};
color: {{ theme_sidebartextcolor }};
font-size: 1.3em;
font-weight: normal;
margin: 5px 0 0 0;
padding: 0;
}
div.sphinxsidebar p {
color: {{ theme_sidebartextcolor }};
}
div.sphinxsidebar p.topless {
margin: 5px 10px 10px 10px;
}
div.sphinxsidebar ul {
margin: 10px;
padding: 0;
color: {{ theme_sidebartextcolor }};
}
div.sphinxsidebar a {
color: {{ theme_sidebarlinkcolor }};
}
div.sphinxsidebar input {
border: 1px solid {{ theme_sidebarlinkcolor }};
font-family: sans-serif;
font-size: 1em;
}
@@ -1,8 +1,6 @@
function insert_version_links() {
var labels = ['dev', '0.7.0', '0.6', '0.5', '0.4', '0.3'];
document.write('<ul class="versions">\n');
for (i = 0; i < labels.length; i++){
open_list = '<li>'
if (typeof(DOCUMENTATION_OPTIONS) !== 'undefined') {
@@ -14,7 +12,6 @@ function insert_version_links() {
document.write(open_list);
document.write('<a href="URL">skimage VERSION</a> </li>\n'
.replace('VERSION', labels[i])
.replace('URL', 'http://scikits-image.org/docs/' + labels[i]));
.replace('URL', 'http://scikit-image.org/docs/' + labels[i]));
}
document.write('</ul>\n');
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

-6
View File
@@ -1,6 +0,0 @@
{% extends "!layout.html" %}
{% block rootrellink %}
<li><a href={{ pathto('index') }}>scikits-image home</a> &raquo;</li>
{{ super() }}
{% endblock %}
+6 -4
View File
@@ -1,8 +1,10 @@
{% if pagename != 'index' %}
{%- if display_toc %}
<h3>Contents</h3>
{{ toc }}
{%- endif %}
{%- if display_toc %}
<h4 class="sidebar-box-heading">Contents</h4>
<div class="well sidebar-box toc">
{{ toc|replace('<ul>', '<ul class="nav nav-list">') }}
</div>
{%- endif %}
{% endif %}
+5
View File
@@ -0,0 +1,5 @@
<li><a href="/">Home</a></li>
<li><a href="/download.html">Download</a></li>
<li><a href="/docs/dev/auto_examples">Gallery</a></li>
<li><a href="/docs/dev">Documentation</a></li>
<li><a href="https://github.com/scikit-image/scikit-image">Source</a></li>
+22 -12
View File
@@ -1,12 +1,22 @@
{%- block navigation %}
{% if pagename != 'index' %}
<h3>Navigation</h3>
<p>
<a href="{{ pathto(master_doc) }}">Documentation Home</a>
</p>
<p>&nbsp;</p>
{% endif %}
{%- endblock %}
<h4 class="sidebar-box-heading">{{ _('Navigation') }}</h4>
<div class="well sidebar-box">
<ul class="nav nav-list">
<li><a href="{{ pathto(master_doc) }}">Documentation Home</a></li>
</ul>
</div>
{%- if prev %}
<h4 class="sidebar-box-heading">{{ _('Previous topic') }}</h4>
<div class="well sidebar-box">
<ul class="nav nav-list">
<li><a href="{{ prev.link|e }}" title="{{ _('previous chapter') }}">{{ prev.title }}</a></li>
</ul>
</div>
{%- endif %}
{%- if next %}
<h4 class="sidebar-box-heading">{{ _('Next topic') }}</h4>
<div class="well sidebar-box">
<ul class="nav nav-list">
<li><a href="{{ next.link|e }}" title="{{ _('next chapter') }}">{{ next.title }}</a></li>
</ul>
</div>
{%- endif %}
+9 -9
View File
@@ -1,9 +1,9 @@
{%- block versions %}
<h3>Version</h3>
<script type="text/javascript">
insert_version_links();
</script>
{%- endblock %}
<h4 class="sidebar-box-heading">{{ _('Versions') }}</h4>
<div class="well sidebar-box">
<ul class="nav nav-list">
<script src="{{ pathto('_static/', 1) }}docversions.js"></script>
<script type="text/javascript">
insert_version_links();
</script>
</ul>
</div>
+1 -1
View File
@@ -4,7 +4,7 @@ CellProfiler BSD license announcement
::
From: Vebjorn Ljosa
To: scikits-image@googlegroups.com
To: scikit-image@googlegroups.com
Date: June 3, 2010
We have changed the license of some parts of CellProfiler from GNU GPL
+5 -12
View File
@@ -43,7 +43,7 @@ master_doc = 'index'
# General information about the project.
project = u'skimage'
copyright = u'2011, the scikits-image team'
copyright = u'2011, the scikit-image team'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
@@ -103,8 +103,7 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. Major themes that come with
# Sphinx are currently 'default' and 'sphinxdoc'.
html_theme = 'agogo'
html_style = 'agogo.css'
html_theme = 'scikit-image'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
@@ -121,10 +120,6 @@ html_title = 'skimage v%s docs' % version
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
html_logo = "scikits_image_logo_small.png"
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
@@ -147,9 +142,7 @@ html_static_path = ['_static']
html_sidebars = {
'**': ['navigation.html',
'localtoc.html',
'relations.html',
'versions.html',
'searchbox.html'],
'versions.html'],
}
# Additional templates that should be rendered to pages, maps page names to
@@ -183,7 +176,7 @@ html_sidebars = {
#html_file_suffix = ''
# Output file base name for HTML help builder.
htmlhelp_basename = 'scikitsimagedoc'
htmlhelp_basename = 'scikitimagedoc'
# -- Options for LaTeX output --------------------------------------------------
@@ -197,7 +190,7 @@ htmlhelp_basename = 'scikitsimagedoc'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('contents', 'scikitsimage.tex', u'The Image Scikit Documentation',
('contents', 'scikitimage.tex', u'The Image Scikit Documentation',
u'SciPy Developers', 'manual'),
]
+9 -9
View File
@@ -4,14 +4,14 @@
Development workflow
####################
You already have your own forked copy of the scikits-image_ repository, by
You already have your own forked copy of the scikit-image_ repository, by
following :ref:`forking`. You have :ref:`set-up-fork`. You have configured
git by following :ref:`configure-git`. Now you are ready for some real work.
Workflow summary
================
In what follows we'll refer to the upstream scikits-image ``master`` branch, as
In what follows we'll refer to the upstream scikit-image ``master`` branch, as
"trunk".
* Don't use your ``master`` branch for anything. Consider deleting it.
@@ -22,9 +22,9 @@ In what follows we'll refer to the upstream scikits-image ``master`` branch, as
* Name your branch for the purpose of the changes - e.g.
``bugfix-for-issue-14`` or ``refactor-database-code``.
* If you can possibly avoid it, avoid merging trunk or any other branches into
your feature branch while you are working.
your feature branch while you are working.
* If you do find yourself merging from trunk, consider :ref:`rebase-on-trunk`
* Ask on the `scikits-image mailing list`_ if you get stuck.
* Ask on the `scikit-image mailing list`_ if you get stuck.
* Ask for code review!
This way of working helps to keep work well organized, with readable history.
@@ -81,7 +81,7 @@ what the changes in the branch are for. For example ``add-ability-to-fly``, or
git checkout my-new-feature
Generally, you will want to keep your feature branches on your public github_
fork of scikits-image_. To do this, you `git push`_ this new branch up to your
fork of scikit-image_. To do this, you `git push`_ this new branch up to your
github repo. Generally (if you followed the instructions in these pages, and by
default), git will have a link to your github repo, called ``origin``. You push
up to your own repo on github with::
@@ -150,7 +150,7 @@ Ask for your changes to be reviewed or merged
When you are ready to ask for someone to review your code and consider a merge:
#. Go to the URL of your forked repo, say
``http://github.com/your-user-name/scikits-image``.
``http://github.com/your-user-name/scikit-image``.
#. Use the 'Switch Branches' dropdown menu near the top left of the page to
select the branch with your changes:
@@ -192,10 +192,10 @@ If you want to work on some stuff with other people, where you are all
committing into the same repository, or even the same branch, then just
share it via github.
First fork scikits-image into your account, as from :ref:`forking`.
First fork scikit-image into your account, as from :ref:`forking`.
Then, go to your forked repository github page, say
``http://github.com/your-user-name/scikits-image``
``http://github.com/your-user-name/scikit-image``
Click on the 'Admin' button, and add anyone else to the repo as a
collaborator:
@@ -204,7 +204,7 @@ collaborator:
Now all those people can do::
git clone git@githhub.com:your-user-name/scikits-image.git
git clone git@githhub.com:your-user-name/scikit-image.git
Remember that links starting with ``git@`` use the ssh protocol and are
read-write; links starting with ``git://`` are read-only.
+6 -6
View File
@@ -5,12 +5,12 @@
=============================
These are the instructions if you just want to follow the latest
*scikits-image* source, but you don't need to do any development for now.
*scikit-image* source, but you don't need to do any development for now.
The steps are:
* :ref:`install-git`
* get local copy of the `scikits-image github`_ git repository
* get local copy of the `scikit-image github`_ git repository
* update local copy from time to time
Get the local copy of the code
@@ -18,19 +18,19 @@ Get the local copy of the code
From the command line::
git clone git://github.com/scikits-image/scikits-image.git
git clone git://github.com/scikit-image/scikit-image.git
You now have a copy of the code tree in the new ``scikits-image`` directory.
You now have a copy of the code tree in the new ``scikit-image`` directory.
Updating the code
=================
From time to time you may want to pull down the latest code. Do this with::
cd scikits-image
cd scikit-image
git pull
The tree in ``scikits-image`` will now have the latest changes from the initial
The tree in ``scikit-image`` will now have the latest changes from the initial
repository.
.. include:: links.inc
+5 -5
View File
@@ -1,13 +1,13 @@
.. _forking:
============================================
Making your own copy (fork) of scikits-image
Making your own copy (fork) of scikit-image
============================================
You need to do this only once. The instructions here are very similar
to the instructions at http://help.github.com/forking/ |emdash| please see
that page for more detail. We're repeating some of it here just to give the
specifics for the scikits-image_ project, and to suggest some default names.
specifics for the scikit-image_ project, and to suggest some default names.
Set up and configure a github account
======================================
@@ -17,17 +17,17 @@ If you don't have a github account, go to the github page, and make one.
You then need to configure your account to allow write access |emdash| see
the ``Generating SSH keys`` help on `github help`_.
Create your own forked copy of scikits-image_
Create your own forked copy of scikit-image_
=============================================
#. Log into your github account.
#. Go to the scikits-image_ github home at `scikits-image github`_.
#. Go to the scikit-image_ github home at `scikit-image github`_.
#. Click on the *fork* button:
.. image:: forking_button.png
Now, after a short pause and some 'Hardcore forking action', you
should find yourself at the home page for your own forked copy of scikits-image_.
should find yourself at the home page for your own forked copy of scikit-image_.
.. include:: links.inc
+2 -2
View File
@@ -2,11 +2,11 @@
Introduction
==============
These pages describe a git_ and github_ workflow for the scikits-image_
These pages describe a git_ and github_ workflow for the scikit-image_
project.
There are several different workflows here, for different ways of
working with *scikits-image*.
working with *scikit-image*.
This is not a comprehensive git reference, it's just a workflow for our
own project. It's tailored to the github hosting service. You may well
+1 -1
View File
@@ -1,6 +1,6 @@
.. _using-git:
Working with *scikits-image* source code
Working with *scikit-image* source code
========================================
Contents:
+2 -2
View File
@@ -16,7 +16,7 @@ access to the upstream repo. Being a maintainer, you've got read-write access.
It's good to have your upstream remote have a scary name, to remind you that
it's a read-write remote::
git remote add upstream-rw git@github.com:scikits-image/scikits-image.git
git remote add upstream-rw git@github.com:scikit-image/scikit-image.git
git fetch upstream-rw
*******************
@@ -29,7 +29,7 @@ Let's say you have some changes that need to go into trunk
The changes are in some branch that you are currently on. For example, you are
looking at someone's changes like this::
git remote add someone git://github.com/someone/scikits-image.git
git remote add someone git://github.com/someone/scikit-image.git
git fetch someone
git branch cool-feature --track someone/cool-feature
git checkout cool-feature
+10 -10
View File
@@ -3,7 +3,7 @@
================
You've discovered a bug or something else you want to change
in scikits-image_ .. |emdash| excellent!
in scikit-image_ .. |emdash| excellent!
You've worked out a way to fix it |emdash| even better!
@@ -29,9 +29,9 @@ Overview
git config --global user.email you@yourdomain.example.com
git config --global user.name "Your Name Comes Here"
# get the repository if you don't have it
git clone git://github.com/scikits-image/scikits-image.git
git clone git://github.com/scikit-image/scikit-image.git
# make a branch for your patching
cd scikits-image
cd scikit-image
git branch the-fix-im-thinking-of
git checkout the-fix-im-thinking-of
# hack, hack, hack
@@ -44,7 +44,7 @@ Overview
# make the patch files
git format-patch -M -C master
Then, send the generated patch files to the `scikits-image
Then, send the generated patch files to the `scikit-image
mailing list`_ |emdash| where we will thank you warmly.
In detail
@@ -57,10 +57,10 @@ In detail
git config --global user.name "Your Name Comes Here"
#. If you don't already have one, clone a copy of the
scikits-image_ repository::
scikit-image_ repository::
git clone git://github.com/scikits-image/scikits-image.git
cd scikits-image
git clone git://github.com/scikit-image/scikit-image.git
cd scikit-image
#. Make a 'feature branch'. This will be where you work on
your bug fix. It's nice and safe and leaves you with
@@ -100,7 +100,7 @@ In detail
0001-BF-added-tests-for-Funny-bug.patch
0002-BF-added-fix-for-Funny-bug.patch
Send these files to the `scikits-image mailing list`_.
Send these files to the `scikit-image mailing list`_.
When you are done, to switch back to the main copy of the
code, just return to the ``master`` branch::
@@ -115,7 +115,7 @@ more feature branches, you will probably want to switch to
development mode. You can do this with the repository you
have.
Fork the scikits-image_ repository on github |emdash| :ref:`forking`.
Fork the scikit-image_ repository on github |emdash| :ref:`forking`.
Then::
# checkout and refresh master branch from main repo
@@ -124,7 +124,7 @@ Then::
# rename pointer to main repository to 'upstream'
git remote rename origin upstream
# point your repo to default read / write to your fork on github
git remote add origin git@github.com:your-user-name/scikits-image.git
git remote add origin git@github.com:your-user-name/scikit-image.git
# push up any branches you've made and want to keep
git push origin the-fix-im-thinking-of
+13 -13
View File
@@ -11,9 +11,9 @@ Overview
::
git clone git@github.com:your-user-name/scikits-image.git
cd scikits-image
git remote add upstream git://github.com/scikits-image/scikits-image.git
git clone git@github.com:your-user-name/scikit-image.git
cd scikit-image
git remote add upstream git://github.com/scikit-image/scikit-image.git
In detail
=========
@@ -22,8 +22,8 @@ Clone your fork
---------------
#. Clone your fork to the local computer with ``git clone
git@github.com:your-user-name/scikits-image.git``
#. Investigate. Change directory to your new repo: ``cd scikits-image``. Then
git@github.com:your-user-name/scikit-image.git``
#. Investigate. Change directory to your new repo: ``cd scikit-image``. Then
``git branch -a`` to show you all branches. You'll get something
like::
@@ -35,7 +35,7 @@ Clone your fork
What remote repository is ``remote/origin``? Try ``git remote -v`` to
see the URLs for the remote. They will point to your github fork.
Now you want to connect to the upstream `scikits-image github`_ repository, so
Now you want to connect to the upstream `scikit-image github`_ repository, so
you can merge in changes from trunk.
.. _linking-to-upstream:
@@ -45,11 +45,11 @@ Linking your repository to the upstream repo
::
cd scikits-image
git remote add upstream git://github.com/scikits-image/scikits-image.git
cd scikit-image
git remote add upstream git://github.com/scikit-image/scikit-image.git
``upstream`` here is just the arbitrary name we're using to refer to the
main scikits-image_ repository at `scikits-image github`_.
main scikit-image_ repository at `scikit-image github`_.
Note that we've used ``git://`` for the URL rather than ``git@``. The
``git://`` URL is read only. This means we that we can't accidentally
@@ -59,10 +59,10 @@ use it to merge into our own code.
Just for your own satisfaction, show yourself that you now have a new
'remote', with ``git remote -v show``, giving you something like::
upstream git://github.com/scikits-image/scikits-image.git (fetch)
upstream git://github.com/scikits-image/scikits-image.git (push)
origin git@github.com:your-user-name/scikits-image.git (fetch)
origin git@github.com:your-user-name/scikits-image.git (push)
upstream git://github.com/scikit-image/scikit-image.git (fetch)
upstream git://github.com/scikit-image/scikit-image.git (push)
origin git@github.com:your-user-name/scikit-image.git (fetch)
origin git@github.com:your-user-name/scikit-image.git (push)
.. include:: links.inc
+4 -4
View File
@@ -1,5 +1,5 @@
.. scikits-image
.. _scikits-image: http://scikits-image.org
.. _`scikits-image github`: http://github.com/scikits-image/scikits-image
.. scikit-image
.. _scikit-image: http://scikit-image.org
.. _`scikit-image github`: http://github.com/scikit-image/scikit-image
.. _`scikits-image mailing list`: http://groups.google.com/group/scikits-image
.. _`scikit-image mailing list`: http://groups.google.com/group/scikit-image
+8 -10
View File
@@ -1,8 +1,6 @@
Pre-built installation
----------------------
.. !! Also update scikits-image-web !!
`Windows binaries
<http://www.lfd.uci.edu/~gohlke/pythonlibs/#scikits.image>`__
are kindly provided by Christoph Gohlke.
@@ -12,37 +10,37 @@ Distribution (EPD) <http://enthought.com/products/epd.php>`__ and `Python(x,y)
<http://code.google.com/p/pythonxy/wiki/Welcome>`__.
On systems that support setuptools, the package can be installed from the
`Python packaging index <http://pypi.python.org/pypi/scikits-image>`__ using
`Python packaging index <http://pypi.python.org/pypi/scikit-image>`__ using
::
easy_install -U scikits-image
easy_install -U scikit-image
or
::
pip -U scikits-image
pip install -U scikit-image
Installation from source
------------------------
Obtain the source from the git-repository at
`http://github.com/scikits-image/scikits-image
<http://github.com/scikits-image/scikits-image>`_.
`http://github.com/scikit-image/scikit-image
<http://github.com/scikit-image/scikit-image>`_.
by running
::
git clone http://github.com/scikits-image/scikits-image.git
git clone http://github.com/scikit-image/scikit-image.git
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/scikits-image/scikits-image/zipball/master
<https://github.com/scikits-image/scikits-image/zipball/master>`_.
`https://github.com/scikit-image/scikit-image/zipball/master
<https://github.com/scikit-image/scikit-image/zipball/master>`_.
The SciKit can be installed globally using
+4 -4
View File
@@ -1,7 +1,7 @@
Image Processing SciKit
=======================
The `scikits-image <http://scikits-image.org>`__ SciKit (toolkit for
The `scikit-image <http://scikit-image.org>`__ SciKit (toolkit for
`SciPy <http://www.scipy.org>`__) extends ``scipy.ndimage`` to provide
a versatile set of image processing routines. It is written in the
`Python <http://www.python.org>`_ language.
@@ -12,15 +12,15 @@ mailing list (address provided below).
Homepage
--------
http://scikits-image.org
http://scikit-image.org
Source, bugs and patches
------------------------
http://github.com/scikits-image/scikits-image
http://github.com/scikit-image/scikit-image
Mailing List
------------
http://groups.google.com/group/scikits-image
http://groups.google.com/group/scikit-image
Contact
-------
+2 -2
View File
@@ -32,8 +32,8 @@ gallery_div = '''\
examples = glob.glob(os.path.join(example_dir, 'plot_*.py'))
images, links = [], []
image_url = 'http://scikits-image.org/docs/dev/_images/%s.png'
link_url = 'http://scikits-image.org/docs/dev/auto_examples/%s.html'
image_url = 'http://scikit-image.org/docs/dev/_images/%s.png'
link_url = 'http://scikit-image.org/docs/dev/auto_examples/%s.html'
for e in examples:
e = os.path.basename(e)
-58
View File
@@ -1,58 +0,0 @@
{#
agogo/layout.html
~~~~~~~~~~~~~~~~~
Sphinx layout template for the agogo theme, originally written
by Andi Albrecht.
:copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
#}
{% extends "basic/layout.html" %}
{% set script_files = script_files + ['_static/docversions.js'] %}
{% block header %}
<div class="header-wrapper">
<div class="header">
{%- block headertitle %}
{%- if logo %}
<div class="logo"><a href="http://scikits-image.org">
<img class="logo" src="{{ pathto('_static/' + logo, 1) }}" alt="Logo"/>
</a></div>
{%- endif %}
{# <h1><a href="{{ pathto(master_doc) }}">{{ shorttitle|e }}</a></h1> #}
{%- endblock %}
</div>
</div>
{% endblock %}
{% block content %}
<div class="content-wrapper">
<div class="content">
{%- block sidebar2 %}
{# We don't want the logo here #}
{%- block sidebarlogo %} {% endblock %}
{{ sidebar() }}
{% endblock %}
<div class="document">
{%- block document %}
{{ super() }}
{%- endblock %}
</div>
<div class="clearer"></div>
</div>
</div>
{% endblock %}
{% block footer %}
<div class="footer-wrapper">
{{ super() }}
</div>
{% endblock %}
{% block relbar1 %}{% endblock %}
{% block relbar2 %}{% endblock %}
-754
View File
@@ -1,754 +0,0 @@
/*
* agogo.css_t
* ~~~~~~~~~~~
*
* Sphinx stylesheet -- agogo theme.
*
* :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
* {
margin: 0px;
padding: 0px;
}
div.header-wrapper {
border-top: 0px solid #babdb6;
padding: 1em 1em 0;
min-height: 0px;
}
body {
font-family: {{ theme_bodyfont }};
font-size: 10pt;
line-height: 1.4em;
color: black;
background-color: {{ theme_bgcolor }};
}
/* Page layout */
div.header, div.content, div.footer {
max-width: {{ theme_pagewidth }};
margin-left: auto;
margin-right: auto;
}
div.header-wrapper {
border-bottom: 0px solid #2e3436;
}
/* Default body styles */
a {
color: {{ theme_linkcolor }};
}
div.bodywrapper a, div.footer a {
text-decoration: underline;
}
.clearer {
clear: both;
}
.left {
float: left;
}
.right {
float: right;
}
.line-block {
display: block;
margin-top: 1em;
margin-bottom: 1em;
}
.line-block .line-block {
margin-top: 0;
margin-bottom: 0;
margin-left: 1.5em;
}
h1, h2, h3, h4 {
font-weight: normal;
color: {{ theme_headercolor2 }};
margin-bottom: .8em;
clear: left;
}
h1 {
color: {{ theme_headercolor1 }};
line-height: 1.1em;
text-align: left;
}
h2 {
padding-bottom: .5em;
color: {{ theme_headercolor1 }};
border-bottom: 1px solid {{ theme_headercolor1 }};
}
a.headerlink {
visibility: hidden;
color: #dddddd;
padding-left: .3em;
}
h1:hover > a.headerlink,
h2:hover > a.headerlink,
h3:hover > a.headerlink,
h4:hover > a.headerlink,
h5:hover > a.headerlink,
h6:hover > a.headerlink,
dt:hover > a.headerlink {
visibility: visible;
}
img {
border: 0;
}
div.admonition {
margin-top: 10px;
margin-bottom: 10px;
padding: 2px 7px 1px 7px;
border-left: 0.2em solid black;
}
p.admonition-title {
margin: 0px 10px 5px 0px;
font-weight: bold;
}
dt:target, .highlighted {
background-color: #fbe54e;
}
/* Header */
div.header {}
div.header h1 {
font-family: "Trebuchet MS", Helvetica, sans-serif;
font-weight: normal;
font-size: 250%;
letter-spacing: .08em;
line-height: 70px;
margin-bottom: 0;
}
div.header h1 a {
color: white;
}
div.header h1 a:hover {
text-decoration: none;
}
div.header div.rel {
margin-top: 1em;
border-top: 1px solid #AAA;
border-bottom: 1px solid #AAA;
border-radius: 5px;
padding: 3px 1em;
}
div.header div.rel a {
color: {{ theme_linkcolor }};
letter-spacing: .05em;
font-weight: bold;
}
div.logo {}
img.logo {
border: 0;
}
/* Content */
div.content-wrapper {
background-color: white;
padding: 1em;
}
div.document {
max-width: {{ theme_documentwidth }};
}
div.body {
padding-right: 2em;
min-width: 20em;
overflow: hidden;
font-size: 90%;
text-align: {{ theme_textalign }};
}
div.document ul {
margin: 1.5em;
list-style-type: square;
}
div.document dd {
margin-left: 1.2em;
margin-top: .4em;
margin-bottom: 1em;
}
div.document .section {
margin-top: 1.7em;
}
div.document .section:first-child {
margin-top: 0px;
}
div.document div.highlight {
padding: 3px;
background-color: #eeeeec;
border-top: 2px solid #dddddd;
border-bottom: 2px solid #dddddd;
margin-top: .8em;
margin-bottom: .8em;
}
div.document h2 {
margin-top: .7em;
}
div.document p {
margin-bottom: 1.5em;
}
div.document li.toctree-l1 {
margin-bottom: 1em;
}
div.document .descname {
font-weight: bold;
}
div.document .docutils.literal {
background-color: #eeeeec;
padding: 1px;
}
div.document .docutils.xref.literal {
background-color: transparent;
padding: 0px;
}
div.document blockquote {
margin: 1em;
}
div.document ol {
margin: 1.5em;
}
/* Sidebar */
div.sphinxsidebar {
width: {{ theme_sidebarwidth }};
padding: 0 1em;
float: right;
font-size: .93em;
background-color: white;
}
div.sphinxsidebar a, div.header a {
text-decoration: none;
}
div.sphinxsidebar a:hover, div.header a:hover {
text-decoration: underline;
}
div.sphinxsidebar h3 {
color: #2e3436;
text-transform: uppercase;
font-size: 130%;
letter-spacing: .1em;
margin-bottom: .4em;
}
div.sphinxsidebar h4 {
margin-bottom: 0;
font-weight: bold;
}
div.sphinxsidebar .tile {
border: 1px solid #D1DDE2;
border-radius: 10px;
background-color: #E1E8EC;
padding-left: 0.5em;
margin: 1em 0;
}
div.sphinxsidebar ul {
margin-bottom: 1.5em;
list-style-type: none;
}
div.sphinxsidebar li.toctree-l1 a {
display: block;
padding: 1px;
border: 1px solid #dddddd;
background-color: #eeeeec;
margin-bottom: .4em;
padding-left: 3px;
color: #2e3436;
}
div.sphinxsidebar li.toctree-l2 a {
background-color: transparent;
border: none;
margin-left: 1em;
border-bottom: 1px solid #dddddd;
}
div.sphinxsidebar li.toctree-l3 a {
background-color: transparent;
border: none;
margin-left: 2em;
border-bottom: 1px solid #dddddd;
}
div.sphinxsidebar li.toctree-l2:last-child a {
border-bottom: none;
}
div.sphinxsidebar li.toctree-l1.current a {
border-right: 5px solid {{ theme_headerlinkcolor }};
}
div.sphinxsidebar li.toctree-l1.current li.toctree-l2 a {
border-right: none;
}
div.sidebarblock {
padding-bottom: .4em;
border-bottom: 1px solid #AAA;
margin-bottom: .8em;
}
ul.versions li {
color: gray;
list-style: circle inside;
}
ul.versions li#current {
list-style: disc inside;
}
/* Footer */
div.footer-wrapper {
padding-top: 10px;
padding-bottom: 10px;
}
div.footer {
border-top: 2px solid #aaa;
text-align: right;
}
div.footer, div.footer a {
color: #888a85;
}
.figure {
float: left;
margin: 1em;
}
.figure img {
display: block;
margin-left: auto;
margin-right: auto;
max-height: 150px;
}
.figure .caption {
width: 200px;
text-align: center !important;
}
/* Styles copied from basic theme */
img.align-left, .figure.align-left, object.align-left {
clear: left;
float: left;
margin-right: 1em;
}
img.align-right, .figure.align-right, object.align-right {
clear: right;
float: right;
margin-left: 1em;
}
img.align-center, .figure.align-center, object.align-center {
display: block;
margin-left: auto;
margin-right: auto;
}
.align-left {
text-align: left;
}
.align-center {
clear: both;
text-align: center;
}
.align-right {
text-align: right;
}
/* -- search page ----------------------------------------------------------- */
ul.search {
margin: 10px 0 0 20px;
padding: 0;
}
ul.search li {
padding: 5px 0 5px 20px;
background-image: url(file.png);
background-repeat: no-repeat;
background-position: 0 7px;
}
ul.search li a {
font-weight: bold;
}
ul.search li div.context {
color: #888;
margin: 2px 0 0 30px;
text-align: left;
}
ul.keywordmatches li.goodmatch a {
font-weight: bold;
}
/* -- index page ------------------------------------------------------------ */
table.contentstable p.biglink {
line-height: 150%;
}
table.contentstable, table.contentstable td, table.contentstable th {
border-style: none;
}
div.body table.contentstable p {
margin: 0.5em;
text-align: left;
}
table.contentstable a {
text-decoration: none;
font-size: 120%;
}
a.biglink {
font-size: 1.3em;
}
span.linkdescr {
font-style: italic;
padding-top: 5px;
font-size: 90%;
}
/* -- general index --------------------------------------------------------- */
table.indextable td {
text-align: left;
vertical-align: top;
}
table.indextable dl, table.indextable dd {
margin-top: 0;
margin-bottom: 0;
}
table.indextable tr.pcap {
height: 10px;
}
table.indextable tr.cap {
margin-top: 10px;
background-color: #f2f2f2;
}
img.toggler {
margin-right: 3px;
margin-top: 3px;
cursor: pointer;
}
/* -- viewcode extension ---------------------------------------------------- */
.viewcode-link {
float: right;
}
.viewcode-back {
float: right;
font-family:: {{ theme_bodyfont }};
}
div.viewcode-block:target {
margin: -1px -3px;
padding: 0 3px;
background-color: #f4debf;
border-top: 1px solid #ac9;
border-bottom: 1px solid #ac9;
}
span.strike { text-decoration: line-through; }
/* -- body styles ----------------------------------------------------------- */
a {
color: {{ theme_linkcolor }};
text-decoration: none;
}
a:visited {
color: {{ theme_visitedlinkcolor }};
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
div.body h1,
div.body h2,
div.body h3,
div.body h4,
div.body h5,
div.body h6 {
font-family: {{ theme_headfont }};
background-color: {{ theme_headbgcolor }};
font-weight: normal;
color: {{ theme_headtextcolor }};
border-bottom: 1px solid #ccc;
margin: 20px 20px 10px 0px;
padding: 3px 0 3px 0px;
}
div.body h1 { margin-top: 0; font-size: 180%; }
div.body h2 { font-size: 150%; }
div.body h3 { font-size: 130%; }
div.body h4 { font-size: 120%; }
div.body h5 { font-size: 110%; }
div.body h6 { font-size: 100%; }
a.headerlink {
color: {{ theme_headlinkcolor }};
font-size: 0.8em;
padding: 0 4px 0 4px;
text-decoration: none;
}
a.headerlink:hover {
background-color: {{ theme_headlinkcolor }};
color: white;
}
div.body p, div.body dd, div.body li {
text-align: justify;
line-height: 130%;
}
div.admonition p.admonition-title + p {
display: inline;
}
div.note {
background-color: #eee;
border: 1px solid #ccc;
}
div.seealso {
background-color: #ffc;
border: 1px solid #ff6;
}
div.topic {
background-color: #eee;
}
div.warning {
background-color: #ffe4e4;
border: 1px solid #f66;
}
p.admonition-title {
display: inline;
}
p.admonition-title:after {
content: ":";
}
pre {
padding: 1em;
margin-bottom: 0.5em;
background-color: {{ theme_codebgcolor }};
color: {{ theme_codetextcolor }};
line-height: 120%;
border: 0px solid #ac9;
border-left: none;
border-right: none;
}
sup {
font-size: x-small;
line-height: 0;
}
tt {
background-color: #ecf0f3;
padding: 0 1px 0 1px;
font-size: 1em;
}
table {
border-collapse: collapse;
margin-bottom: 1em;
margin-top: 1em;
}
table, th, td {
border: 1px solid #ccc;
}
th, td {
padding: 5px;
}
th {
color: #333;
background-color: #eee;
}
#api-reference ul:first-child {
float: left;
width: 35em;
margin-top: 0;
padding-top: 0;
list-style: none;
overflow: auto;
}
#api-reference li {
float: left;
position: relative;
margin-right: 1em;
width: 17em;
padding: 0;
}
.field-list {
font-size: 80%;
}
/* ----------------- Example Gallery ----------------- */
.gallery {
height: 200px;
}
.gallery p.caption a{
text-decoration: none;
}
/* ----------------- Coverage States ----------------- */
span.missing{
color: #000;
background-color: #ff5840;
border-color: #A77272;
font-weight: bold;
}
span.partial{
color: #806600;
background-color: #ffc343;
font-weight: bold;
}
span.done{
color: #106600;
background-color: #60f030;
border-color: #4F8530;
font-weight: bold;
}
span.na{
color: #A8A8A8;
border-color: #4F8530;
}
table.coverage {
border: solid 1px;
}
td.missing-bar{
color: #ff5840;
background-color: #ff5840;
border-color: #A77272;
font-weight: normal;
font-style: normal;
}
td.partial-bar{
color: #ffc343;
background-color: #ffc343;
font-weight: normal;
font-style: normal;
}
td.done-bar{
color: #60f030;
background-color: #60f030;
border-color: #4F8530;
font-weight: normal;
font-style: normal;
}
td.na-bar{
color: #FFF;
background-color: #FFF;
border-color: #4F8530;
font-weight: normal;
font-style: normal;
}
/* Adjust doc headers such as Notes, References, etc. */
p.rubric {
font-weight: bold;
font-size: 120%;
}
/* Math */
img.math {
vertical-align: middle;
}
div.body div.math p {
text-align: center;
}
span.eqno {
float: right;
}
-19
View File
@@ -1,19 +0,0 @@
[theme]
inherit = basic
stylesheet = agogo.css
pygments_style = tango
[options]
bodyfont = "Verdana", Arial, sans-serif
pagewidth = 70em
documentwidth = 55em
sidebarwidth = 14em
bgcolor = white
headerbg = url(bgtop.png) top left repeat-x
footerbg = url(bgfooter.png) top left repeat-x
linkcolor = #FC852B
headercolor1 = #555
headercolor2 = #555
headerlinkcolor = #fcaf3e
codebgcolor = #EEE
textalign = justify
+113
View File
@@ -0,0 +1,113 @@
{#
scikit-image/layout.html
~~~~~~~~~~~~~~~~~
Sphinx layout template for the scikit-image theme, written by
Johannes Schönberger.
#}
{%- set url_root = pathto('', 1) %}
{# XXX necessary? #}
{%- if url_root == '#' %}{% set url_root = '' %}{% endif %}
{%- if not embedded and docstitle %}
{%- set titlesuffix = " &mdash; "|safe + docstitle|e %}
{%- else %}
{%- set titlesuffix = "" %}
{%- endif %}
{%- macro script() %}
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script src="{{ pathto('_static/', 1) }}js/bootstrap.min.js"></script>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '{{ url_root }}',
VERSION: '{{ release|e }}',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '{{ '' if no_search_suffix else file_suffix }}',
HAS_SOURCE: {{ has_source|lower }}
};
</script>
{%- for scriptfile in script_files %}
<script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
{%- endfor %}
{%- endmacro %}
{%- macro css() %}
<link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />
<link href="{{ pathto('_static/', 1) }}css/bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="{{ pathto('_static/', 1) }}css/custom.css" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=Raleway" rel="stylesheet" type="text/css">
{%- for cssfile in css_files %}
<link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" />
{%- endfor %}
{%- endmacro %}
<!DOCTYPE html>
<html lang="en">
<head>
{%- block htmltitle %}
<title>{{ title|striptags|e }}{{ titlesuffix }}</title>
{%- endblock %}
{{ metatags }}
{{ css() }}
{{ script() }}
{%- if hasdoc('about') %}
<link rel="author" title="{{ _('About these documents') }}" href="{{ pathto('about') }}" />
{%- endif %}
{%- if hasdoc('genindex') %}
<link rel="index" title="{{ _('Index') }}" href="{{ pathto('genindex') }}" />
{%- endif %}
{%- if hasdoc('search') %}
<link rel="search" title="{{ _('Search') }}" href="{{ pathto('search') }}" />
{%- endif %}
{%- if hasdoc('copyright') %}
<link rel="copyright" title="{{ _('Copyright') }}" href="{{ pathto('copyright') }}" />
{%- endif %}
<link rel="top" title="{{ docstitle|e }}" href="{{ pathto('index') }}" />
{%- if parents %}
<link rel="up" title="{{ parents[-1].title|striptags|e }}" href="{{ parents[-1].link|e }}" />
{%- endif %}
{%- if next %}
<link rel="next" title="{{ next.title|striptags|e }}" href="{{ next.link|e }}" />
{%- endif %}
{%- if prev %}
<link rel="prev" title="{{ prev.title|striptags|e }}" href="{{ prev.link|e }}" />
{%- endif %}
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<link rel="shortcut icon" href="{{ pathto('_static/', 1) }}favicon.ico">
{%- block extrahead %}{% endblock %}
</head>
<body class="container">
<a href="http://scikit-image.org" class="logo"><img src="{{ pathto('_static/', 1) }}img/logo.png" alt=""></a>
<div class="clearfix"></div>
<div class="navbar">
<div class="navbar-inner">
<ul class="nav">
{% include 'navbar.html' %}
</ul>
<form class="navbar-form pull-right" action="{{ pathto('search') }}" method="get">
<input type="text" class="search span3" name="q" placeholder="Search documentation ...">
<input type="hidden" name="check_keywords" value="yes" >
<input type="hidden" name="area" value="default" >
</form>
</div>
</div>
<div class="row">
<div class="span9">
{% block body %}{% endblock %}
</div>
<div class="span3">
{%- for sidebartemplate in sidebars %}
{%- include sidebartemplate %}
{%- endfor %}
</div>
</div>
<div class="well footer">
<small>
&copy; Copyright the scikit-image development team.
Created using <a href="http://twitter.github.com/bootstrap/">Bootstrap</a> and <a href="http://sphinx.pocoo.org/">Sphinx</a>.
</small>
</div>
</body>
</html>
@@ -0,0 +1,46 @@
{#
basic/search.html
~~~~~~~~~~~~~~~~~
Template for the search page.
:copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
#}
{% extends "layout.html" %}
{% set title = _('Search') %}
{% set script_files = script_files + ['_static/searchtools.js'] %}
{% set script_files = script_files + ['searchindex.js'] %}
{% block body %}
<h1 id="search-documentation">{{ _('Search') }}</h1>
<div id="fallback" class="admonition warning">
<script type="text/javascript">
$('#fallback').hide();
$("input.search").focus();
</script>
<p>
{% trans %}Please activate JavaScript to enable the search
functionality.{% endtrans %}
</p>
</div>
<p>
{% trans %}From here you can search these documents. Enter your search
words into the box in the navigation bar and press "Enter". Note that the
search function will automatically search for all of the words. Pages
containing fewer words won't appear in the result list.{% endtrans %}
</p>
{% if search_performed %}
{% if not search_results %}
<p>{{ _('Your search did not match any results.') }}</p>
{% endif %}
{% endif %}
<div id="search-results">
{% if search_results %}
<ul>
{% for href, caption, context in search_results %}
<li class="well"><a href="{{ pathto(item.href) }}">{{ caption }}</a></li>
{% endfor %}
</ul>
{% endif %}
</div>
{% endblock %}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,224 @@
body {
font-family: "Raleway";
}
a {
color: #CE5C00;
}
input,
button,
select,
textarea {
font-family: "Raleway";
}
pre {
font-size: 11px;
}
h1, h2, h3, h4, h5, h6 {
clear: left;
}
h1 {
font-size: 30px;
line-height: 36px;
}
h2 {
font-size: 24px;
line-height: 30px;
}
h3 {
font-size: 19px;
line-height: 21px;
}
h4 {
font-size: 17px;
line-height: 19px;
}
h5 {
font-size: 15px;
line-height: 17px;
}
h6 {
font-size: 13px;
line-height: 15px;
}
.logo {
float: left;
margin: 20px 0 20px 22px;
}
.logo img {
height: 70px;
}
.hero {
padding: 10px 25px;
}
.gallery-random {
float: right;
line-height: 180px;
}
.gallery-random img {
max-height: 180px;
}
.coins-sample {
padding: 5px;
}
.sidebar-box {
padding: 0;
}
.sidebar-box-heading {
padding-left: 15px;
}
.headerlink {
margin-left: 10px;
color: #ddd;
display: none;
}
h1:hover .headerlink,
h2:hover .headerlink,
h3:hover .headerlink,
h4:hover .headerlink,
h5:hover .headerlink,
h6:hover .headerlink {
display: inline;
}
.headerlink:hover {
color: #CE5C00;
text-decoration: none;
}
.footer {
margin-top: 30px;
padding: 5px 10px;
color: #999;
}
.footer a {
color: #999;
text-decoration: underline;
}
.ohloh-use, .gplus-use {
float: left;
margin: 0 0 10px 15px;
}
/* Documentation */
/* general table settings */
table.docutils {
margin-bottom: 10px;
border-color: #ccc;
}
table.docutils td, table.docutils th {
padding: 5px;
border-color: #ccc;
text-align: left;
}
.toc ul ul {
font-size: 13px;
margin-right: -15px;
}
/* master content table */
.contentstable.docutils, .contentstable.docutils td {
border-color: transparent;
}
.contentstable.docutils .first {
font-weight: bold;
}
.contentstable.docutils .last {
padding-left: 10px;
}
.docutils .label, .docutils .badge {
background: transparent;
text-shadow: none;
font-size: 13px;
padding: 5px;
line-height: 20px;
color: #333;
}
/* module summary table */
.longtable.docutils {
font-size: 12px;
margin-bottom: 30px;
}
.longtable.docutils, .longtable.docutils td {
border-color: #ccc;
}
/* function and class description */
dl.class, dl.function, dl.method, dl.attribute {
border-top: 1px solid #ccc;
padding-top: 10px;
}
.descclassname {
color: #aaa;
font-weight: normal;
font-family: monospace;
}
.descname {
font-family: monospace;
}
dl.class em, dl.function em, dl.class big, dl.function big {
font-weight: normal;
font-family: monospace;
}
dl.class dd, dl.function dd {
padding: 10px;
}
.docutils.field-list th {
background-color: #eee;
padding: 10px;
text-align: left;
vertical-align: top;
width: 100px;
}
.docutils.field-list td {
padding: 10px 10px 10px 20px;
text-align: left;
vertical-align: top;
}
.docutils.field-list td blockquote p {
font-size: 13px;
line-height: 18px;
}
p.rubric {
font-weight: bold;
font-size: 19px;
margin: 15px 0 10px 0;
}
p.admonition-title {
font-weight: bold;
text-decoration: underline;
}
/* example gallery */
.gallery {
height: 200px;
}
.figure {
float: left;
margin: 1em;
}
.figure img {
display: block;
margin-left: auto;
margin-right: auto;
max-height: 150px;
max-width: 200px;
}
.figure .caption {
width: 200px;
text-align: center !important;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

File diff suppressed because one or more lines are too long
@@ -0,0 +1,4 @@
[theme]
inherit = basic
stylesheet = none
pygments_style = default
+4 -4
View File
@@ -44,13 +44,13 @@ functions include one or more examples.
Mailing-list
------------
The scikits-image mailing-list is scikits-image@googlegroups.com (users
The scikit-image mailing-list is scikit-image@googlegroups.com (users
should join the `Google Group
<http://groups.google.com/group/scikits-image>`_ before posting). This
<http://groups.google.com/group/scikit-image>`_ before posting). This
mailing-list is shared by users and developers, and it is the right
place to ask any question about ``skimage``, or in general, image
processing using Python. Posting snippets of code with minimal examples
ensures to get more relevant and focused answers.
ensures to get more relevant and focused answers.
We would love to hear from how you use ``skimage`` for your work on the
mailing-list!
mailing-list!
+1 -1
View File
@@ -65,7 +65,7 @@ slider:
denoise_plugin += SaveButtons()
Here, we connect a slider widget to the filter's 'weight' argument. We also
added some buttons for saving the image to file or to the ``scikits-image``
added some buttons for saving the image to file or to the ``scikit-image``
image stack (see ``skimage.io.push`` and ``skimage.io.pop``).
All that's left is to create an image viewer and add the plugin to that viewer.
+1 -1
View File
@@ -33,7 +33,7 @@ month_duration = 24
for r in releases:
releases[r] = dateutil.parser.parse(releases[r])
def fetch_PRs(user='scikits-image', repo='scikits-image', state='open'):
def fetch_PRs(user='scikit-image', repo='scikit-image', state='open'):
params = {'state': state,
'per_page': 100,
'page': 1}
+5 -5
View File
@@ -6,18 +6,18 @@ Image processing algorithms for SciPy, including IO, morphology, filtering,
warping, color manipulation, object detection, etc.
Please refer to the online documentation at
http://scikits-image.org/
http://scikit-image.org/
"""
DISTNAME = 'scikits-image'
DISTNAME = 'scikit-image'
DESCRIPTION = 'Image processing routines for SciPy'
LONG_DESCRIPTION = descr
MAINTAINER = 'Stefan van der Walt'
MAINTAINER_EMAIL = 'stefan@sun.ac.za'
URL = 'http://scikits-image.org'
URL = 'http://scikit-image.org'
LICENSE = 'Modified BSD'
DOWNLOAD_URL = 'http://github.com/scikits-image/scikits-image'
VERSION = '0.7.1'
DOWNLOAD_URL = 'http://github.com/scikit-image/scikit-image'
VERSION = '0.7.2'
PYTHON_VERSION = (2, 5)
DEPENDENCIES = {
'numpy': (1, 6),
+2 -2
View File
@@ -1,6 +1,6 @@
"""Image Processing SciKit (Toolbox for SciPy)
``scikits-image`` (a.k.a. ``skimage``) is a collection of algorithms for image
``scikit-image`` (a.k.a. ``skimage``) is a collection of algorithms for image
processing and computer vision.
The main package of ``skimage`` only provides a few utilities for converting
@@ -65,7 +65,7 @@ except ImportError:
def _setup_test(verbose=False):
import functools
args = ['', '--exe', '-w', pkg_dir]
args = ['', pkg_dir, '--exe']
if verbose:
args.extend(['-v', '-s'])
+4 -4
View File
@@ -28,11 +28,11 @@ def configuration(parent_package='', top_path=None):
if __name__ == '__main__':
from numpy.distutils.core import setup
setup(maintainer='Scikits-image Developers',
author='Scikits-image Developers',
maintainer_email='scikits-image@googlegroups.com',
setup(maintainer='scikit-image Developers',
author='scikit-image Developers',
maintainer_email='scikit-image@googlegroups.com',
description='Transforms',
url='https://github.com/scikits-image/scikits-image',
url='https://github.com/scikit-image/scikit-image',
license='SciPy License (BSD Style)',
**(configuration(top_path='').todict())
)
+17 -1
View File
@@ -15,9 +15,25 @@ def test_camera():
def test_checkerboard():
""" Test that checkerboard image can be loaded. """
""" Test that "checkerboard" image can be loaded. """
data.checkerboard()
def test_text():
""" Test that "text" image can be loaded. """
data.text()
def test_moon():
""" Test that "moon" image can be loaded. """
data.moon()
def test_page():
""" Test that "page" image can be loaded. """
data.page()
if __name__ == "__main__":
from numpy.testing import run_module_suite
run_module_suite()
+4 -4
View File
@@ -21,11 +21,11 @@ def configuration(parent_package='', top_path=None):
if __name__ == '__main__':
from numpy.distutils.core import setup
setup(maintainer='scikits-image developers',
author='scikits-image developers',
maintainer_email='scikits-image@googlegroups.com',
setup(maintainer='scikit-image developers',
author='scikit-image developers',
maintainer_email='scikit-image@googlegroups.com',
description='Drawing',
url='https://github.com/scikits-image/scikits-image',
url='https://github.com/scikit-image/scikit-image',
license='SciPy License (BSD Style)',
**(configuration(top_path='').todict())
)
+4 -4
View File
@@ -24,11 +24,11 @@ def configuration(parent_package='', top_path=None):
if __name__ == '__main__':
from numpy.distutils.core import setup
setup(maintainer='scikits-image Developers',
author='scikits-image Developers',
maintainer_email='scikits-image@googlegroups.com',
setup(maintainer='scikit-image Developers',
author='scikit-image Developers',
maintainer_email='scikit-image@googlegroups.com',
description='Features',
url='https://github.com/scikits-image/scikits-image',
url='https://github.com/scikit-image/scikit-image',
license='SciPy License (BSD Style)',
**(configuration(top_path='').todict())
)
+1 -1
View File
@@ -75,7 +75,7 @@ class LPIFilter2D(object):
>>> filter = LPIFilter2D(filt_func)
"""
if impulse_response is None:
if not callable(impulse_response):
raise ValueError("Impulse response must be a callable.")
self.impulse_response = impulse_response
+4 -4
View File
@@ -21,11 +21,11 @@ def configuration(parent_package='', top_path=None):
if __name__ == '__main__':
from numpy.distutils.core import setup
setup(maintainer='scikits-image Developers',
author='scikits-image Developers',
maintainer_email='scikits-image@googlegroups.com',
setup(maintainer='scikit-image Developers',
author='scikit-image Developers',
maintainer_email='scikit-image@googlegroups.com',
description='Filters',
url='https://github.com/scikits-image/scikits-image',
url='https://github.com/scikit-image/scikit-image',
license='SciPy License (BSD Style)',
**(configuration(top_path='').todict())
)
+5
View File
@@ -61,3 +61,8 @@ class TestCanny(unittest.TestCase):
def test_image_shape(self):
self.assertRaises(TypeError, F.canny, np.zeros((20, 20, 20)), 4, 0, 0)
def test_mask_none(self):
result1 = F.canny(np.zeros((20, 20)), 4, 0, 0, np.ones((20, 20), bool))
result2 = F.canny(np.zeros((20, 20)), 4, 0, 0)
self.assertTrue(np.all(result1 == result2))
+6
View File
@@ -117,5 +117,11 @@ def test_insufficient_size():
median_filter(img, radius=1)
@raises(TypeError)
def test_wrong_shape():
img = np.empty((10, 10, 3))
median_filter(img)
if __name__ == "__main__":
np.testing.run_module_suite()
+6 -1
View File
@@ -8,7 +8,8 @@ from skimage.io import *
from skimage.filter import *
class TestLPIFilter2D():
class TestLPIFilter2D(object):
img = imread(os.path.join(data_dir, 'camera.png'),
flatten=True)[:50, :50]
@@ -55,5 +56,9 @@ class TestLPIFilter2D():
g1 = wiener(F[::-1, ::-1], self.filt_func)
assert ((g - g1[::-1, ::-1]).sum() < 1)
def test_non_callable(self):
assert_raises(ValueError, LPIFilter2D, None)
if __name__ == "__main__":
run_module_suite()
+3 -3
View File
@@ -29,10 +29,10 @@ def configuration(parent_package='', top_path=None):
if __name__ == '__main__':
from numpy.distutils.core import setup
setup(maintainer='scikits-image Developers',
maintainer_email='scikits-image@googlegroups.com',
setup(maintainer='scikit-image Developers',
maintainer_email='scikit-image@googlegroups.com',
description='Graph-based Image-processing Algorithms',
url='https://github.com/scikits-image/scikits-image',
url='https://github.com/scikit-image/scikit-image',
license='Modified BSD',
**(configuration(top_path='').todict())
)
+2 -2
View File
@@ -3,9 +3,9 @@ Skivi is written/maintained/developed by:
S. Chris Colbert - sccolbert@gmail.com
Skivi is free software and is part of the scikits-image project.
Skivi is free software and is part of the scikit-image project.
Skivi is governed by the licenses of the scikits-image project.
Skivi is governed by the licenses of the scikit-image project.
Please report any bugs to the author.
+3 -1
View File
@@ -11,6 +11,7 @@ from copy import copy
import numpy as np
from ._io import imread
def concatenate_images(ic):
"""Concatenate all images in the image collection into an array.
@@ -66,6 +67,7 @@ def alphanumeric_key(s):
k = [int(c) if c.isdigit() else c for c in re.split('([0-9]+)', s)]
return k
class MultiImage(object):
"""A class containing a single multi-frame image.
@@ -217,6 +219,7 @@ class MultiImage(object):
"""
return concatenate_images(self)
class ImageCollection(object):
"""Load and manage a collection of image files.
@@ -428,4 +431,3 @@ class ImageCollection(object):
If images in the `ImageCollection` don't have identical shapes.
"""
return concatenate_images(self)
+3 -3
View File
@@ -31,10 +31,10 @@ def configuration(parent_package='', top_path=None):
if __name__ == '__main__':
from numpy.distutils.core import setup
setup(maintainer='scikits-image Developers',
maintainer_email='scikits-image@googlegroups.com',
setup(maintainer='scikit-image Developers',
maintainer_email='scikit-image@googlegroups.com',
description='Image I/O Routines',
url='https://github.com/scikits-image/scikits-image',
url='https://github.com/scikit-image/scikit-image',
license='Modified BSD',
**(configuration(top_path='').todict())
)
+1 -1
View File
@@ -28,7 +28,7 @@ def approximate_polygon(coords, tolerance):
----------
.. [1] http://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm
"""
if tolerance == 0:
if tolerance <= 0:
return coords
chain = np.zeros(coords.shape[0], 'bool')
+1 -1
View File
@@ -98,7 +98,7 @@ def find_contours(array, level,
"""
array = np.asarray(array, dtype=np.double)
if array.ndim != 2:
raise RuntimeError('Only 2D arrays are supported.')
raise ValueError('Only 2D arrays are supported.')
level = float(level)
if (fully_connected not in _param_options or
positive_orientation not in _param_options):
+3 -3
View File
@@ -24,10 +24,10 @@ def configuration(parent_package='', top_path=None):
if __name__ == '__main__':
from numpy.distutils.core import setup
setup(maintainer='scikits-image Developers',
maintainer_email='scikits-image@googlegroups.com',
setup(maintainer='scikit-image Developers',
maintainer_email='scikit-image@googlegroups.com',
description='Graph-based Image-processing Algorithms',
url='https://github.com/scikits-image/scikits-image',
url='https://github.com/scikit-image/scikit-image',
license='Modified BSD',
**(configuration(top_path='').todict())
)
+35 -27
View File
@@ -21,34 +21,37 @@ r = np.sqrt(x**2 + y**2)
def test_binary():
contours = find_contours(a, 0.5)
ref = [[6. , 1.5],
[5. , 1.5],
[4. , 1.5],
[3. , 1.5],
[2. , 1.5],
[1.5, 2. ],
[1.5, 3. ],
[1.5, 4. ],
[1.5, 5. ],
[1.5, 6. ],
[1. , 6.5],
[0.5, 6. ],
[0.5, 5. ],
[0.5, 4. ],
[0.5, 3. ],
[0.5, 2. ],
[0.5, 1. ],
[1. , 0.5],
[2. , 0.5],
[3. , 0.5],
[4. , 0.5],
[5. , 0.5],
[6. , 0.5],
[6.5, 1. ],
[6. , 1.5]]
contours = find_contours(a, 0.5, positive_orientation='high')
assert len(contours) == 1
assert_array_equal(contours[0],
[[6. , 1.5],
[5. , 1.5],
[4. , 1.5],
[3. , 1.5],
[2. , 1.5],
[1.5, 2. ],
[1.5, 3. ],
[1.5, 4. ],
[1.5, 5. ],
[1.5, 6. ],
[1. , 6.5],
[0.5, 6. ],
[0.5, 5. ],
[0.5, 4. ],
[0.5, 3. ],
[0.5, 2. ],
[0.5, 1. ],
[1. , 0.5],
[2. , 0.5],
[3. , 0.5],
[4. , 0.5],
[5. , 0.5],
[6. , 0.5],
[6.5, 1. ],
[6. , 1.5]])
assert_array_equal(contours[0][::-1], ref)
def test_float():
@@ -70,6 +73,11 @@ def test_memory_order():
assert len(contours) == 1
def test_invalid_input():
assert_raises(ValueError, find_contours, r, 0.5, 'foo', 'bar')
assert_raises(ValueError, find_contours, r[..., None], 0.5)
if __name__ == '__main__':
from numpy.testing import run_module_suite
run_module_suite()
+6
View File
@@ -22,6 +22,8 @@ def test_approximate_polygon():
out = approximate_polygon(square, -1)
np.testing.assert_array_equal(out, square)
out = approximate_polygon(square, 0)
np.testing.assert_array_equal(out, square)
def test_subdivide_polygon():
@@ -51,6 +53,10 @@ def test_subdivide_polygon():
np.testing.assert_equal(new_square3.shape[0],
2 * (square3.shape[0] - mask_len + 2))
# not supported B-Spline degree
np.testing.assert_raises(ValueError, subdivide_polygon, square, 0)
np.testing.assert_raises(ValueError, subdivide_polygon, square, 8)
if __name__ == "__main__":
np.testing.run_module_suite()
+36 -4
View File
@@ -1,9 +1,9 @@
from numpy.testing import assert_array_equal, assert_almost_equal, \
assert_array_almost_equal
assert_array_almost_equal, assert_raises
import numpy as np
import math
from skimage.measure import regionprops
from skimage.measure._regionprops import regionprops, PROPS, perimeter
SAMPLE = np.array(
@@ -22,6 +22,16 @@ INTENSITY_SAMPLE = SAMPLE.copy()
INTENSITY_SAMPLE[1, 9:11] = 2
def test_unsupported_dtype():
assert_raises(TypeError, regionprops, np.zeros((10, 10), dtype=np.double))
def test_all_props():
props = regionprops(SAMPLE, 'all', INTENSITY_SAMPLE)[0]
for prop in PROPS:
assert prop in props
def test_area():
area = regionprops(SAMPLE, ['Area'])[0]['Area']
assert area == np.sum(SAMPLE)
@@ -36,6 +46,7 @@ def test_bbox():
bbox = regionprops(SAMPLE_mod, ['BoundingBox'])[0]['BoundingBox']
assert_array_almost_equal(bbox, (0, 0, SAMPLE.shape[0], SAMPLE.shape[1]-1))
def test_central_moments():
mu = regionprops(SAMPLE, ['CentralMoments'])[0]['CentralMoments']
#: determined with OpenCV
@@ -48,6 +59,7 @@ def test_central_moments():
assert_almost_equal(mu[2,1], 2000.296296296291)
assert_almost_equal(mu[3,0], -760.0246913580195)
def test_centroid():
centroid = regionprops(SAMPLE, ['Centroid'])[0]['Centroid']
# determined with MATLAB
@@ -90,6 +102,11 @@ def test_eccentricity():
eps = regionprops(SAMPLE, ['Eccentricity'])[0]['Eccentricity']
assert_almost_equal(eps, 0.814629313427)
img = np.zeros((5, 5), dtype=np.int)
img[2, 2] = 1
eps = regionprops(img, ['Eccentricity'])[0]['Eccentricity']
assert_almost_equal(eps, 0)
def test_equiv_diameter():
diameter = regionprops(SAMPLE, ['EquivDiameter'])[0]['EquivDiameter']
@@ -142,6 +159,11 @@ def test_filled_area():
assert area == np.sum(SAMPLE)
def test_filled_image():
img = regionprops(SAMPLE, ['FilledImage'])[0]['FilledImage']
assert_array_equal(img, SAMPLE)
def test_major_axis_length():
length = regionprops(SAMPLE, ['MajorAxisLength'])[0]['MajorAxisLength']
# MATLAB has different interpretation of ellipse than found in literature,
@@ -188,6 +210,7 @@ def test_moments():
assert_almost_equal(m[2,1], 43882.0)
assert_almost_equal(m[3,0], 95588.0)
def test_normalized_moments():
nu = regionprops(SAMPLE, ['NormalizedMoments'])[0]['NormalizedMoments']
#: determined with OpenCV
@@ -198,6 +221,7 @@ def test_normalized_moments():
assert_almost_equal(nu[2,1], 0.045473992910668816)
assert_almost_equal(nu[3,0], -0.017278118992041805)
def test_orientation():
orientation = regionprops(SAMPLE, ['Orientation'])[0]['Orientation']
# determined with MATLAB
@@ -219,15 +243,21 @@ def test_orientation():
)[0]['Orientation']
assert_almost_equal(orientation_diag, -math.pi / 4)
def test_perimeter():
perimeter = regionprops(SAMPLE, ['Perimeter'])[0]['Perimeter']
assert_almost_equal(perimeter, 59.2132034355964)
per = regionprops(SAMPLE, ['Perimeter'])[0]['Perimeter']
assert_almost_equal(per, 59.2132034355964)
per = perimeter(SAMPLE.astype('double'), neighbourhood=8)
assert_almost_equal(per, 43.1213203436)
def test_solidity():
solidity = regionprops(SAMPLE, ['Solidity'])[0]['Solidity']
# determined with MATLAB
assert_almost_equal(solidity, 0.580645161290323)
def test_weighted_central_moments():
wmu = regionprops(SAMPLE, ['WeightedCentralMoments'], INTENSITY_SAMPLE
)[0]['WeightedCentralMoments']
@@ -281,6 +311,7 @@ def test_weighted_moments():
)
assert_array_almost_equal(wm, ref)
def test_weighted_normalized_moments():
wnu = regionprops(SAMPLE, ['WeightedNormalizedMoments'], INTENSITY_SAMPLE
)[0]['WeightedNormalizedMoments']
@@ -292,6 +323,7 @@ def test_weighted_normalized_moments():
)
assert_array_almost_equal(wnu, ref)
if __name__ == "__main__":
from numpy.testing import run_module_suite
run_module_suite()
@@ -1,5 +1,5 @@
import numpy as np
from numpy.testing import assert_equal
from numpy.testing import assert_equal, assert_raises
from skimage.measure import structural_similarity as ssim
@@ -24,20 +24,19 @@ def test_ssim_image():
S1 = ssim(X, Y, win_size=3)
assert(S1 < 0.3)
## Come up with a better way of testing the gradient
##
## # NOTE: This test is known to randomly fail on some systems (Mac OS X 10.6)
## def test_ssim_grad():
## N = 30
## X = np.random.random((N, N)) * 255
## Y = np.random.random((N, N)) * 255
## def func(Y):
## return ssim(X, Y, dynamic_range=255)
## f = ssim(X, Y, dynamic_range=255)
## g = ssim(X, Y, dynamic_range=255, gradient=True)
## def grad(Y):
## return ssim(X, Y, dynamic_range=255, gradient=True)[1]
## assert(np.all(opt.check_grad(func, grad, Y) < 0.05))
## assert f < 0.05
## assert g[0] < 0.05
## assert np.all(g[1] < 0.05)
def test_ssim_dtype():
@@ -56,5 +55,15 @@ def test_ssim_dtype():
assert S2 < 0.1
def test_invalid_input():
X = np.zeros((3, 3), dtype=np.double)
Y = np.zeros((3, 3), dtype=np.int)
assert_raises(ValueError, ssim, X, Y)
Y = np.zeros((4, 4), dtype=np.double)
assert_raises(ValueError, ssim, X, Y)
assert_raises(ValueError, ssim, X, X, win_size=8)
if __name__ == "__main__":
np.testing.run_module_suite()
+6 -9
View File
@@ -1,10 +1,3 @@
"""
:author: Damian Eads, 2009
:license: modified BSD
"""
__docformat__ = 'restructuredtext en'
import warnings
from skimage import img_as_ubyte
@@ -45,6 +38,7 @@ def erosion(image, selem, out=None, shift_x=False, shift_y=False):
Examples
--------
>>> # Erosion shrinks bright regions
>>> import numpy as np
>>> from skimage.morphology import square
>>> bright_square = np.array([[0, 0, 0, 0, 0],
... [0, 1, 1, 1, 0],
@@ -97,6 +91,7 @@ def dilation(image, selem, out=None, shift_x=False, shift_y=False):
Examples
--------
>>> # Dilation enlarges bright regions
>>> import numpy as np
>>> from skimage.morphology import square
>>> bright_pixel = np.array([[0, 0, 0, 0, 0],
... [0, 0, 0, 0, 0],
@@ -146,6 +141,7 @@ def opening(image, selem, out=None):
Examples
--------
>>> # Open up gap between two bright regions (but also shrink regions)
>>> import numpy as np
>>> from skimage.morphology import square
>>> bad_connection = np.array([[1, 0, 0, 0, 1],
... [1, 1, 0, 1, 1],
@@ -196,6 +192,7 @@ def closing(image, selem, out=None):
Examples
--------
>>> # Close a gap between two bright lines
>>> import numpy as np
>>> from skimage.morphology import square
>>> broken_line = np.array([[0, 0, 0, 0, 0],
... [0, 0, 0, 0, 0],
@@ -245,6 +242,7 @@ def white_tophat(image, selem, out=None):
Examples
--------
>>> # Subtract grey background from bright peak
>>> import numpy as np
>>> from skimage.morphology import square
>>> bright_on_grey = np.array([[2, 3, 3, 3, 2],
... [3, 4, 5, 4, 3],
@@ -261,7 +259,6 @@ def white_tophat(image, selem, out=None):
"""
if image is out:
raise NotImplementedError("Cannot perform white top hat in place.")
image = img_as_ubyte(image)
out = opening(image, selem, out=out)
out = image - out
@@ -294,6 +291,7 @@ def black_tophat(image, selem, out=None):
Examples
--------
>>> # Change dark peak to bright peak and subtract background
>>> import numpy as np
>>> from skimage.morphology import square
>>> dark_on_grey = np.array([[7, 6, 6, 6, 7],
... [6, 5, 4, 5, 6],
@@ -311,7 +309,6 @@ def black_tophat(image, selem, out=None):
if image is out:
raise NotImplementedError("Cannot perform white top hat in place.")
image = img_as_ubyte(image)
out = closing(image, selem, out=out)
out = out - image
+3 -3
View File
@@ -39,11 +39,11 @@ def configuration(parent_package='', top_path=None):
if __name__ == '__main__':
from numpy.distutils.core import setup
setup(maintainer='scikits-image Developers',
setup(maintainer='scikit-image Developers',
author='Damian Eads',
maintainer_email='scikits-image@googlegroups.com',
maintainer_email='scikit-image@googlegroups.com',
description='Morphology Wrapper',
url='https://github.com/scikits-image/scikits-image',
url='https://github.com/scikit-image/scikit-image',
license='SciPy License (BSD Style)',
**(configuration(top_path='').todict())
)
+3 -3
View File
@@ -25,10 +25,10 @@ def configuration(parent_package='', top_path=None):
if __name__ == '__main__':
from numpy.distutils.core import setup
setup(maintainer='scikits-image Developers',
maintainer_email='scikits-image@googlegroups.com',
setup(maintainer='scikit-image Developers',
maintainer_email='scikit-image@googlegroups.com',
description='Segmentation Algorithms',
url='https://github.com/scikits-image/scikits-image',
url='https://github.com/scikit-image/scikit-image',
license='SciPy License (BSD Style)',
**(configuration(top_path='').todict())
)
+4 -3
View File
@@ -1015,7 +1015,8 @@ def warp(image, inverse_map=None, map_args={}, output_shape=None, order=1,
if mode == 'constant' and not (0 <= cval <= 1):
clipped[out == cval] = cval
if clipped.shape[0] == 1 or clipped.shape[1] == 1:
if clipped.ndim == 3 and orig_ndim == 2:
# remove singleton dim introduced by atleast_3d
return clipped[..., 0]
else:
return clipped
else: # remove singleton dim introduced by atleast_3d
return clipped.squeeze()
+10 -10
View File
@@ -57,7 +57,7 @@ def pyramid_reduce(image, downscale=2, sigma=None, order=1,
References
----------
..[1] http://web.mit.edu/persci/people/adelson/pub_pdfs/pyramid83.pdf
.. [1] http://web.mit.edu/persci/people/adelson/pub_pdfs/pyramid83.pdf
"""
@@ -111,7 +111,7 @@ def pyramid_expand(image, upscale=2, sigma=None, order=1,
References
----------
..[1] http://web.mit.edu/persci/people/adelson/pub_pdfs/pyramid83.pdf
.. [1] http://web.mit.edu/persci/people/adelson/pub_pdfs/pyramid83.pdf
"""
@@ -143,9 +143,9 @@ def pyramid_gaussian(image, max_layer=-1, downscale=2, sigma=None, order=1,
the downscaled images.
Note that the first image of the pyramid will be the original, unscaled
image. The total number of images is `max_layer + 1`. In case all layers are
computed, the last image is either a one-pixel image or the image where the
reduction does not change its shape.
image. The total number of images is `max_layer + 1`. In case all layers
are computed, the last image is either a one-pixel image or the image where
the reduction does not change its shape.
Parameters
----------
@@ -176,7 +176,7 @@ def pyramid_gaussian(image, max_layer=-1, downscale=2, sigma=None, order=1,
References
----------
..[1] http://web.mit.edu/persci/people/adelson/pub_pdfs/pyramid83.pdf
.. [1] http://web.mit.edu/persci/people/adelson/pub_pdfs/pyramid83.pdf
"""
@@ -225,8 +225,8 @@ def pyramid_laplacian(image, max_layer=-1, downscale=2, sigma=None, order=1,
Note that the first image of the pyramid will be the difference between the
original, unscaled image and its smoothed version. The total number of
images is `max_layer + 1`. In case all layers are computed, the last image
is either a one-pixel image or the image where the reduction does not change
its shape.
is either a one-pixel image or the image where the reduction does not
change its shape.
Parameters
----------
@@ -257,8 +257,8 @@ def pyramid_laplacian(image, max_layer=-1, downscale=2, sigma=None, order=1,
References
----------
..[1] http://web.mit.edu/persci/people/adelson/pub_pdfs/pyramid83.pdf
..[2] http://sepwww.stanford.edu/~morgan/texturematch/paper_html/node3.html
.. [1] http://web.mit.edu/persci/people/adelson/pub_pdfs/pyramid83.pdf
.. [2] http://sepwww.stanford.edu/~morgan/texturematch/paper_html/node3.html
"""
+4 -4
View File
@@ -26,11 +26,11 @@ def configuration(parent_package='', top_path=None):
if __name__ == '__main__':
from numpy.distutils.core import setup
setup(maintainer='Scikits-image Developers',
author='Scikits-image Developers',
maintainer_email='scikits-image@googlegroups.com',
setup(maintainer='scikit-image Developers',
author='scikit-image Developers',
maintainer_email='scikit-image@googlegroups.com',
description='Transforms',
url='https://github.com/scikits-image/scikits-image',
url='https://github.com/scikit-image/scikit-image',
license='SciPy License (BSD Style)',
**(configuration(top_path='').todict())
)
+44 -13
View File
@@ -1,41 +1,72 @@
from numpy.testing import assert_array_equal, run_module_suite
from numpy.testing import assert_array_equal, assert_raises, run_module_suite
from skimage import data
from skimage.transform import (pyramid_reduce, pyramid_expand,
pyramid_gaussian, pyramid_laplacian)
from skimage.transform import pyramids
image = data.lena()
image_gray = image[..., 0]
def test_pyramid_reduce():
def test_pyramid_reduce_rgb():
rows, cols, dim = image.shape
out = pyramid_reduce(image, downscale=2)
out = pyramids.pyramid_reduce(image, downscale=2)
assert_array_equal(out.shape, (rows / 2, cols / 2, dim))
def test_pyramid_expand():
def test_pyramid_reduce_gray():
rows, cols = image_gray.shape
out = pyramids.pyramid_reduce(image_gray, downscale=2)
assert_array_equal(out.shape, (rows / 2, cols / 2))
def test_pyramid_expand_rgb():
rows, cols, dim = image.shape
out = pyramid_expand(image, upscale=2)
out = pyramids.pyramid_expand(image, upscale=2)
assert_array_equal(out.shape, (rows * 2, cols * 2, dim))
def test_build_gaussian_pyramid():
rows, cols, dim = image.shape
pyramid = pyramid_gaussian(image, downscale=2)
def test_pyramid_expand_gray():
rows, cols = image_gray.shape
out = pyramids.pyramid_expand(image_gray, upscale=2)
assert_array_equal(out.shape, (rows * 2, cols * 2))
def test_build_gaussian_pyramid_rgb():
rows, cols, dim = image.shape
pyramid = pyramids.pyramid_gaussian(image, downscale=2)
for layer, out in enumerate(pyramid):
layer_shape = (rows / 2 ** layer, cols / 2 ** layer, dim)
assert_array_equal(out.shape, layer_shape)
def test_build_laplacian_pyramid():
rows, cols, dim = image.shape
pyramid = pyramid_laplacian(image, downscale=2)
def test_build_gaussian_pyramid_gray():
rows, cols = image_gray.shape
pyramid = pyramids.pyramid_gaussian(image_gray, downscale=2)
for layer, out in enumerate(pyramid):
layer_shape = (rows / 2 ** layer, cols / 2 ** layer)
assert_array_equal(out.shape, layer_shape)
def test_build_laplacian_pyramid_rgb():
rows, cols, dim = image.shape
pyramid = pyramids.pyramid_laplacian(image, downscale=2)
for layer, out in enumerate(pyramid):
layer_shape = (rows / 2 ** layer, cols / 2 ** layer, dim)
assert_array_equal(out.shape, layer_shape)
def test_build_laplacian_pyramid_gray():
rows, cols = image_gray.shape
pyramid = pyramids.pyramid_laplacian(image_gray, downscale=2)
for layer, out in enumerate(pyramid):
layer_shape = (rows / 2 ** layer, cols / 2 ** layer)
assert_array_equal(out.shape, layer_shape)
def test_check_factor():
assert_raises(ValueError, pyramids._check_factor, 0.99)
assert_raises(ValueError, pyramids._check_factor, - 2)
if __name__ == "__main__":
run_module_suite()
+2
View File
@@ -71,6 +71,8 @@ def montage2d(arr_in, fill='mean', rescale_intensity=False):
assert arr_in.ndim == 3
n_images, height, width = arr_in.shape
arr_in = arr_in.copy()
# -- rescale intensity if necessary
if rescale_intensity: