How to contribute to skimage¶
Developing Open Source is great fun! Join us on the skimage mailing list 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.
- How to use GitHub when developing skimage
Tasks¶
Implement Algorithms¶
- Graph cut segmentation
- Image colorization
- Fast 2D convex hull (consider using CellProfiler version) Algorithm overview. One free implementation. [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.
Drawing (directly on an ndarray)¶
- Wu’s algorithm for circles
- Text rendering
Infrastructure¶
- 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.
- 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 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
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 (CellProfiler BSD license announcement | original message).
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.
docs¶
- Add examples to the gallery
- Write topics for the user guide
- Integrate BiBTeX plugin into Sphinx build
Development process¶
Read this overview of how to use Git with skimage. Here’s the long and short of it:
- Go to https://github.com/scikits-image/scikits-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 such as ‘your_name-transform-speedups’.
- Commit locally as you progress.
- Push your changes back to github and create a pull request by clicking “request pull” in GitHub.
- Optionally, mail the mailing list, explaining your changes.
You may also read this summary by Fernando Perez of the IPython project on how they manage to keep review overhead to a minimum:
http://mail.scipy.org/pipermail/ipython-dev/2010-October/006746.html
Note
Do not merge the main branch into yours. You may rebase, as long as you are aware of its dangers (also see LWN article).
- To reviewers: add a short explanation of what a branch did to the merge message or, if closing a bug, add “Closes gh-XXXX”.
Guidelines¶
- All code should have tests (see “Test coverage” below for more details).
- All code should be documented, to the same standard as NumPy and SciPy. If possible, also add a section to the user guide.
- Follow the Python PEPs where possible.
- No major changes should be committed without review. Ask on the mailing list if you get no response to your pull request.
- Examples in the gallery should have a maximum figure width of 8 inches.
Test coverage¶
Tests for a module should ideally cover all code in that module, i.e. statement coverage should be at 100%.
To measure the test coverage, install coverage.py (using easy_install coverage) and then run:
$ make coverage
This will print a report with one line for each file in skimage, detailing the test coverage:
Name Stmts Exec Cover Missing
------------------------------------------------------------------------------
skimage/color/colorconv 77 77 100%
skimage/filter/__init__ 1 1 100%
...
Bugs¶
Please report bugs on Github.