On Mar 13, 2013, at 6:24 AM,
gerald...@gmail.com wrote:
> Hi,
>
> I recently started to use Fiji instead of ImageJ. I am working at the development of some plugins. Now Fiji does not compilate plugins using the ij.gui.Line class.
> The error message is (one example):
> symbol : constructor Line(double,double,double,double)
> location: class Line
> addToRoiManager(new Line(p.getX(), p.getY(), pI.getX(), pI.getY()), name);
>
> The constructor Line(double,double,double,double) does exist, and it worked before. I also tried other constructors, but it seems like the class Line entirely has disappeared from the Fiji API?
>
> Thank you in advance for any help on that.
I am able to reproduce this problem using this test plugin.
import ij.*;
import ij.gui.*;
import ij.plugin.*;
public class My_Plugin implements PlugIn {
public void run(String arg) {
ImagePlus imp = IJ.getImage();
Line line = new Line(10.5, 10.5, 100.5, 100.5);
imp.setRoi(line);
}
}
It works as expected on ImageJ but on a fully updated version of Fiji I get the error message:
/Applications/Fiji.app/plugins/My_Plugin.java:13: cannot find symbol
symbol : method setRoi(Line)
location: class ij.ImagePlus
imp.setRoi(line);
If I change
Line line = new Line(10.5, 10.5, 100.5, 100.5);
to
Roi line = new Line(10.5, 10.5, 100.5, 100.5);
I get this error message:
/Applications/Fiji.app/plugins/My_Plugin.java:12: cannot find symbol
symbol : constructor Line(double,double,double,double)
location: class Line
Roi line = new Line(10.5, 10.5, 100.5, 100.5);
-wayne