http://imagej.273.s1.nabble.com/Bug-in-FindMaxima-output-ImageJ-1-43o-tp3689500p3689502.html
It works... I will try it tomorrow on real data.
Thanks you all so much for your reactivity.
Le 4 févr. 10 à 18:39, Rasband, Wayne (NIH/NIMH) [E] a écrit :
> Hi Michael,
>
> I applied your proposed bugfix to the 1.43p7 daily build, and it
> appears to work. You can see the changes at the ImageJ Git repository
>
>
> Best regards,
>
> -wayne
>
> On Feb 4, 2010, at 11:11 AM, Michael Schmid wrote:
>
>> Hi Wayne,
>>
>> here is a proposal for a bugfix (I have not tried, but I think that
>> it should be ok):
>>
>> in MaximumFinder.analyzeAndMarkMaxima at the top:
>>
>> //unchanged line:
>> boolean displayOrCount = imp!=null &&
>> (outputType==POINT_SELECTION||outputType==LIST||outputType==COUNT);
>> //new lines:
>> if (displayOrCount) {
>> xyVector=new Vector();
>> roi = imp.getRoi();
>> }
>>
>> further down, we can eliminate the creation of a new xyVector:
>>
>> if (maxPossible) {
>> int offset = pList[nearestI];
>> types[offset] |= MAX_POINT;
>> if (displayOrCount && !(this.excludeOnEdges &&
>> isEdgeMaximum)) {
>> //no reason to check for xyVector=null, just continue like this:
>> int x = offset % width;
>>
>> then before creating a roi we should check whether the vector is not
>> empty:
>>
>> //changed line:
>> if (outputType == POINT_SELECTION && npoints>0) {
>> //rest unchanged:
>> int[] xpoints = new int[npoints];
>>
>>
>> Best wishes,
>>
>> Michael
>> ________________________________________________________________
>> Michael Schmid email:
[hidden email]
>> Institut für Angewandte Physik, Technische Universität Wien
>> Wiedner Hauptstr. 8-10/134, A 1040 Wien, Austria
>> Tel. +43 1 58801-13452 or -13453, Fax +43 1 58801 13499
>> ________________________________________________________________
>>
>> Begin forwarded message:
>>
>>> From: Gabriel Landini <
[hidden email]>
>>> Date: 4 February 2010 16:44:57 GMT+01:00
>>> To:
[hidden email]
>>> Subject: Re: Bug in FindMaxima output (ImageJ 1.43o) ?
>>> Reply-To: ImageJ Interest Group <
[hidden email]>
>>>
>>> On Thursday 04 Feb 2010 15:41:54 you wrote:
>>>> When the result is equal to 0 (zero), the result doesn't go to the
>>>> ouput window "results". Meaning that the counting value for that
>>>> specific ROI is also not recorded. This is important as I am
>>>> setting
>>>> an automatic counting system of particles (foci) within nuclei
>>>> using
>>>> this function.
>>>
>>> Yes, I can confirm this too. With a black image, (maxima not found)
>>> there is
>>> no result of counts (which should be "0") sent to the Results Table.
>>>
>>> Cheers,
>>> G.
>>
>