[Neuroimaging] compute_mask - algorithm changed?

JB Poline jbpoline at gmail.com
Tue Sep 29 08:52:30 CEST 2015


Hi,

Fyi, I had to tweak the values to get a reasonable answer on some
data, but generally works well
cheers
JB

On Tue, Sep 29, 2015 at 2:18 AM, Matthew Brett <matthew.brett at gmail.com> wrote:
> 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...
>
> Cheers2,
>
> Matthew
> _______________________________________________
> Neuroimaging mailing list
> Neuroimaging at python.org
> https://mail.python.org/mailman/listinfo/neuroimaging


More information about the Neuroimaging mailing list