That makes sense. Could you please add that to the documentation?


On Wed, Jul 17, 2013 at 10:20 AM, matthieudumont
<notifications@github.com>wrote:

> In dipy/segment/mask.py:
>
> > +        vol[outliers] = 0
> > +
> > +
> > +def binary_threshold(vol, thresh):
> > +    """
> > +    Simple binary thresholding.
> > +
> > +    Parameters
> > +    ----------
> > +    vol : ndarray
> > +        Volume to apply threshold on.
> > +    thresh : float
> > +        Thresholding value.
> > +    """
> > +    outvol = np.zeros_like(vol, dtype=np.uint8)
> > +    outvol[np.where(vol > thresh)] = 1
>
> The actual purpose of this method is to output a binary mask[0,1].
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/nipy/dipy/pull/210/files#r5247971>
> .
>