[Neuroimaging] compute_mask - algorithm changed?

Matthew Brett matthew.brett at gmail.com
Tue Sep 29 02:18:51 CEST 2015

On Mon, Sep 28, 2015 at 5:13 PM, Matthew Brett <matthew.brett at gmail.com> wrote:
> Hi guys,
> One of our post-docs here was just asking about `nipy.labs.compute_mask`.
> The docstring for that function has:
>     Compute and write the mask of an image based on the grey level
>     This is based on an heuristic proposed by T.Nichols:
>     find the least dense point of the histogram, between fractions
>     m and M of the total image histogram.
> but I think the actual algorithm is:
>     * Sort values;
>     * Remove m from start and M from end of the sorted vector;
>     * Find the value to value difference;
>     * Use the value corresponding to the position of the largest
> difference as a threshold.
> Is that right?   Did the algorithm change at some point?

Ah - sorry - with a moment's reflection, I see that the large
difference between the sorted values also represents a local point of
low histogram density...



More information about the Neuroimaging mailing list