Fixing the bug of MaximumFinder
Posted by grimper on Sep 02, 2010; 10:45am
URL: http://imagej.273.s1.nabble.com/Fixing-the-bug-of-MaximumFinder-tp3687009.html
Hello all,
I am writing a plugin and I want to use the findMaxima method in class MaximumFinder. However when the method finMaxima was called with outputType equaled List or Count. There was nothing appeared on the result table.
Here is a example code:
public class demo_findmax implements PlugIn {
public void run(String arg) {
ByteProcessor bp = new ByteProcessor(10,10);
bp.putPixel(3, 4, 255);
bp.putPixel(7, 8, 255);
new ImagePlus("test", bp).show();
MaximumFinder fd=new MaximumFinder();
ByteProcessor fdB = fd.findMaxima(bp, 50, ImageProcessor.NO_THRESHOLD, 4, false, false);
}
}
So I tried to look into the source code of MaximumFinder.java and did some modification to fix the problem. I am wondering if this modified MaximumFinder would be usable for the future ImageJ build.
If so how should I do it ? Should I post the code here or upload it to somewhere ?
Cheers,
Zong