I'm writing a new Java plugin and using:
FloatPolygon fp = new FloatPolygon();
fp.addPoint(x0,y0);
...
fp.addPOint(xn,yn);
float u = ...
float v = ...
if(fp.contains(u,v)) ...
The documentation says that FloatPolygon.contains takes two doubles - but the compiler complains that it wants floats (which makes some sense). Calling contains with 2 ints works just as well as 2 floats, but the compiler rejects calls with 2 doubles.
But then...at run time, I get this error:
================================================================================================
There was a problem with the class ij.process.FloatPolygon which can be found here:
/Applications/Fiji.app/jars/ij-1.52p.jar
java.lang.NoSuchMethodError: ij.process.FloatPolygon.contains(FF)Z
at CompareVisits.compare(Unknown Source)
at CompareVisits.run(Unknown Source)
at ij.IJ.runUserPlugIn(IJ.java:230)
at ij.IJ.runPlugIn(IJ.java:193)
at ij.Executer.runCommand(Executer.java:137)
at ij.Executer.run(Executer.java:66)
at java.lang.Thread.run(Thread.java:745)
[ERROR] null
java.lang.NoSuchMethodException: Could not find method ij.process.FloatPolygon.contains(FF)Z
There was a problem with the class ij.process.FloatPolygon which can be found here:
/Applications/Fiji.app/jars/ij-1.52p.jar
java.lang.NoSuchMethodError: ij.process.FloatPolygon.contains(FF)Z
...
================================================================================================
What am I doing wrong?
--
Kenneth Sloan
[hidden email]
Vision is the art of seeing what is invisible to others.
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html