Hi Stefan,

2009/11/2 Stéfan van der Walt <stefan@sun.ac.za>

Hi all,

Please review the Shortest Path functionality implemented in branch 'spath' of

http://github.com/stefanv/scikits.image

Looks good, both the shortest path algorithm and the Cython build improvements.

About the build first, I had to run the setup.py in analysis separately, it wasn't picked up by the main setup.py. I do not have Cython installed.

Some questions / points to think about for shortest path:

- why only left-to-right through the image? it would be easy to have an axis keyword and then transpose the image if necessary.
- module name. "analysis" is quite generic, if that is where most algorithms end up it will be a very large module after a while. maybe that is okay, i'm not sure.
- docstring is rather incomplete: needs Returns, References, Examples, Notes: synonym=Dijkstra's algorithm
- for the test, why is path [0, 0, 1] instead of either [1, 0 ,1] or [0, 1, 0]? I would expect path to contain either indices or values of the followed path.

- and some questions motivated by my lack of knowledge of Cython:
* can you write r_bracket_min = max(r - 1, 0) and leave out the if < 0 check afterward?
* what is the overhead (if any) of a triple for loop in Cython? I don't see an obvious way to vectorize things, but if it's possible (even partially), would that help?

Cheers,
Ralf