[Neuroimaging] compute_mask - algorithm changed?

Matthew Brett matthew.brett at gmail.com
Tue Sep 29 02:13:40 CEST 2015


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?

Cheers,

Matthew


More information about the Neuroimaging mailing list