Greyscale reconstruction and merging CellProfiler code

Tony Yu tsyu80 at
Sun Aug 7 09:35:03 EDT 2011

2011/8/6 Stéfan van der Walt <stefan at>

> Hey Tony
> On Sat, Aug 6, 2011 at 3:04 PM, Tony Yu <tsyu80 at> wrote:
> > (
> Thanks!  I'm very interested to have a look, but I see that one of the
> data files (.png) is missing.  Could you add that as well?

That's strange: I can't see any missing files. I don't get any missing image
warnings from Sphinx, and I don't have any uncommitted files on my end.
Also, I checked that all savefig filenames in the tutorial are in the
ipython_images directory on the github repo. Was this from a Sphinx warning?
Any more clues?

> > A couple of random notes:
> > * This branch adds the ipython_directive (and
> ipython_console_hightlighting)
> > sphinx extension, because it allows you to show code examples with text
> > in-between (and still be able to access variables from previous blocks).
> No problem.  I saw another pretty cool trick that the IPython and
> PyMVPA guys use: they write tutorials as .py files, that are then
> parsed to produce an rst file.  I'm not sure what the best way is to
> do this, but their approach does have the advantage that tutorials are
> simply .py files, ready for distribution, and that we can provide a
> template that is super easy to modify (we really need to encourage
> more people to use, test, complain and write about this package).
> What do you think: what's the best way to do tutorials?

That sounds like an interesting idea. I especially like the fact you can
test *.py files without rebuilding all the docs. I can't find any examples
of this on the IPython or PyMVPA github accounts (granted I didn't try
*that* hard). Do you have any more info on this approach?


> > * the morphology names seem a bit clunky to work with. For example, white
> > top hat is called with "morphology.greyscale_white_top_hat". The
> greyscale
> > routines are already isolated to morphology.grey, so maybe
> > morphology/ can just call "import grey" (instead of "from grey
> > import *") and then the "greyscale_" prefix can be removed from the
> > functions?
> Why don't we just shorten those names to morphology.grey_tophat etc.?

I like the flexibility with namespaces, actually. For example, I could be
very verbose and write:

>>> from scikits.image import morphology
>>> morphology.grey.white_tophat(...)

or slightly less verbose and write

>>> from scikits.image.morphology import grey
>>> grey.white_tophat(...)

or just lazy and write

>>> from scikits.image.morphology.grey import *
>>> white_tophat(...)

(BTW, the "white_" prefix is required because there's also a black_tophat).
Plus, "Namespaces are one honking great idea".

That's just my preference, though.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the scikit-image mailing list