Cythonized version of streamlines' resample() and length() functions.

I made a cythonized version of the resampling and length functions found in `tracking/metrics.py`. As suggested by @Garyfallidis, I put these new functions in `core/streamlinespeed.pyx` accessible through `core/streamline.py`.

I made a minor change to the Makefile and setup.py to add the compilation of the new cython file. Also, regarding the language use for compiling Cython, I changed it to C++ instead of C since I needed `vector` from C++ std and also it was not breaking anything except one thing that I also fixed (see commit logs). If you don't want to change the compiler for Cython, I can set it only to compile `core/streamlinespeed.pyx` instead.
No big deal - just spaces around operators : `cumlen[-1] / (n_pols - 1)`


On Wed, Jul 2, 2014 at 3:26 PM, Marc-Alexandre Côté <
notifications@github.com> wrote:

> In dipy/core/tests/test_streamline.py:
>
> > +    return np.sum(dists)
> > +
> > +
> > +def resample_python(xyz, n_pols=3):
> > +    def _extrap(xyz, cumlen, distance):
> > +        ''' Helper function for extrapolate '''
> > +        ind = np.where((cumlen-distance) > 0)[0][0]
> > +        len0 = cumlen[ind-1]
> > +        len1 = cumlen[ind]
> > +        Ds = distance-len0
> > +        Lambda = Ds/(len1-len0)
> > +        return Lambda*xyz[ind]+(1-Lambda)*xyz[ind-1]
> > +
> > +    cumlen = np.zeros(xyz.shape[0])
> > +    cumlen[1:] = length_python(xyz, along=True)
> > +    step = cumlen[-1]/(n_pols-1)
>
> What's wrong with this line?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/nipy/dipy/pull/382/files#r14487820>.
>