From eae045b16ae4c27aa5b883b8cb3af6da2a53a937 Mon Sep 17 00:00:00 2001 From: Tony S Yu Date: Tue, 21 Feb 2012 21:30:11 -0500 Subject: [PATCH 1/6] DOC: Add hidden toctree for main index. --- doc/source/index.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/doc/source/index.txt b/doc/source/index.txt index 362d79ab..3c6ff75c 100644 --- a/doc/source/index.txt +++ b/doc/source/index.txt @@ -11,6 +11,19 @@ This SciKit_ is an image processing toolbox for SciPy_. Sections ======== +.. toctree:: + :hidden: + + overview + api + api_changes + install + user_guide + contribute + license + auto_examples/index + + .. list-table:: :class: contentstable From dc78c59be50a68f7befba90d71397feb002bdd28 Mon Sep 17 00:00:00 2001 From: Tony S Yu Date: Tue, 21 Feb 2012 21:47:09 -0500 Subject: [PATCH 2/6] DOC: Add toctree to example gallery. --- doc/ext/gen_rst.py | 50 ++++++++++++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 19 deletions(-) diff --git a/doc/ext/gen_rst.py b/doc/ext/gen_rst.py index 89da260d..de34d4b8 100644 --- a/doc/ext/gen_rst.py +++ b/doc/ext/gen_rst.py @@ -47,6 +47,16 @@ plot_rst_template = """ :lines: %(end_row)s- """ + +toctree_template = """ + +.. toctree:: + :hidden: + + %s + +""" + # The following strings are used when we have several pictures: we use # an html div tag that our CSS uses to turn the lists into horizontal # lists. @@ -144,13 +154,10 @@ def generate_dir_rst(dir, fhindex, example_dir, root_dir, plot_gallery): print 'Skipping this directory' print 80*'_' return - fhindex.write(""" + example_description = file(os.path.join(src_dir, 'README.txt')).read() + fhindex.write("""\n\n%s\n\n""" % example_description) -%s - - -""" % file(os.path.join(src_dir, 'README.txt')).read()) if not os.path.exists(target_dir): os.makedirs(target_dir) @@ -159,20 +166,25 @@ def generate_dir_rst(dir, fhindex, example_dir, root_dir, plot_gallery): if not a.startswith('plot') and a.endswith('.py'): return 'zz' + a return a - for fname in sorted(os.listdir(src_dir), key=sort_key): - if fname.endswith('py'): - generate_file_rst(fname, target_dir, src_dir, plot_gallery) - thumb = os.path.join(dir, 'images', 'thumb', fname[:-3] + '.png') - link_name = os.path.join(dir, fname).replace(os.path.sep, '_') - fhindex.write('.. figure:: %s\n' % thumb) - if link_name.startswith('._'): - link_name = link_name[2:] - fhindex.write(' :figclass: gallery\n') - if dir != '.': - fhindex.write(' :target: ./%s/%s.html\n\n' % (dir, fname[:-3])) - else: - fhindex.write(' :target: ./%s.html\n\n' % link_name[:-3]) - fhindex.write(' :ref:`example_%s`\n\n' % link_name) + + examples = [fname for fname in sorted(os.listdir(src_dir), key=sort_key) + if fname.endswith('py')] + ex_names = [ex[:-3] for ex in examples] # strip '.py' extension + fhindex.write(toctree_template % '\n '.join(ex_names)) + + for fname in examples: + generate_file_rst(fname, target_dir, src_dir, plot_gallery) + thumb = os.path.join(dir, 'images', 'thumb', fname[:-3] + '.png') + link_name = os.path.join(dir, fname).replace(os.path.sep, '_') + fhindex.write('.. figure:: %s\n' % thumb) + if link_name.startswith('._'): + link_name = link_name[2:] + fhindex.write(' :figclass: gallery\n') + if dir != '.': + fhindex.write(' :target: ./%s/%s.html\n\n' % (dir, fname[:-3])) + else: + fhindex.write(' :target: ./%s.html\n\n' % link_name[:-3]) + fhindex.write(' :ref:`example_%s`\n\n' % link_name) fhindex.write(""" .. raw:: html From c4b8964094c4c5b5e8c858082dd2ab73a96adcf2 Mon Sep 17 00:00:00 2001 From: Tony S Yu Date: Tue, 21 Feb 2012 22:35:19 -0500 Subject: [PATCH 3/6] DOC: Add hidden toctree to tasks --- TASKS.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/TASKS.txt b/TASKS.txt index 8bfc19ee..cc6a3cc2 100644 --- a/TASKS.txt +++ b/TASKS.txt @@ -5,6 +5,15 @@ How to contribute to ``skimage`` ====================================== +.. toctree:: + :hidden: + + gitwash/index + gsoc2011 + coverage_table + cell_profiler + + 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. From a040c6108ae5e18031e7cc533cbb185149fda597 Mon Sep 17 00:00:00 2001 From: Tony S Yu Date: Tue, 21 Feb 2012 22:47:26 -0500 Subject: [PATCH 4/6] DOC: Remove completed tasks. It's a bit distracting to leave the completed tasks in the docs. I left some tasks that are marked completed: Either I couldn't find where they were implemented, or it has not been merged. --- TASKS.txt | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/TASKS.txt b/TASKS.txt index cc6a3cc2..d12a716f 100644 --- a/TASKS.txt +++ b/TASKS.txt @@ -42,9 +42,6 @@ Implement Algorithms - 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. -- :strike:`Histograms of oriented gradients` -- :strike:`Fast radon transform` -- :strike:`Probabilistic Hough transform` Drawing (directly on an ndarray) ```````````````````````````````` @@ -63,29 +60,22 @@ modified to work as part of the scikit, others may be lacking in documentation or tests. * :strike:`Connected components` - * :strike:`Grey-level co-occurrence matrices` - * :strike:`Marching squares` * 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 - * :strike:`2D iso-contour finding (sub-pixel precision) [ask Zach Pincus]` * 2D image warping via thin-plate splines [ask Zach Pincus] Merge code provided by `CellProfiler `_ team ````````````````````````````````````````````````````````````````````````` -* :strike:`Canny filter` (Canny, J., *A Computational Approach To Edge Detection*, - IEEE Trans. Pattern Analysis and Machine Intelligence, 8:679-714, 1986) -* :strike:`Prewitt filter` - convolution with ``[[1,1,1], [0,0,0], [-1,-1,-1]]`` to - detect edges -* :strike:`Sobel filter - convolution with` ``[[1,2,1], [0,0,0], [-1,-2,-1]]`` :strike:`to detect edges` * Roberts filter - convolution with diagonal and anti-diagonal kernels to detect edges * Minimum enclosing circles of objects in a labels matrix * :strike:`Map-coloring of a labels matrix - assign each label a color so that - all adjacent labels have different colors` -- simply plot with colormap "spectral". -* :strike:`Skeletonize`, spur removal, thinning, thickening, and other morphological - operations on binary images, framework for creating arbitrary morphological - operations using a 3x3 grid. + all adjacent labels have different colors` -- simply plot with colormap + "spectral". +* 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 @@ -134,6 +124,4 @@ docs * Add examples to the gallery * Write topics for the `user guide `_ -* :strike:`Build docs outside source directory` * Integrate BiBTeX plugin into Sphinx build -* :strike:`Create a kick-ass website` From fc71d311412f98380f3f8cf72441a07a455e2c1f Mon Sep 17 00:00:00 2001 From: Tony S Yu Date: Tue, 21 Feb 2012 22:56:06 -0500 Subject: [PATCH 5/6] DOC: Delete completed task. --- TASKS.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TASKS.txt b/TASKS.txt index d12a716f..7b29bbe3 100644 --- a/TASKS.txt +++ b/TASKS.txt @@ -45,7 +45,7 @@ Implement Algorithms Drawing (directly on an ndarray) ```````````````````````````````` -- Wu's algorithm for lines and circles +- Wu's algorithm for circles - Text rendering Infrastructure From de14e8fbb630870282e679fad141297ee8a26c16 Mon Sep 17 00:00:00 2001 From: Tony S Yu Date: Tue, 21 Feb 2012 22:57:47 -0500 Subject: [PATCH 6/6] DOC: Remove "completed" labeled-image plotting task. Comment for task mentioned that it could be done by setting the matplotlib colormap to "spectral". This solution is already demonstrated in the `plot_coins_segmentation` tutorial. --- TASKS.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/TASKS.txt b/TASKS.txt index 7b29bbe3..153a7098 100644 --- a/TASKS.txt +++ b/TASKS.txt @@ -70,9 +70,6 @@ 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 -* :strike:`Map-coloring of a labels matrix - assign each label a color so that - all adjacent labels have different colors` -- simply plot with colormap - "spectral". * spur removal, thinning, thickening, and other morphological operations on binary images, framework for creating arbitrary morphological operations using a 3x3 grid.