MorphoLibJ areaOpening problem

Hi,
I find many of the plugins inn the MorpholibJ collection very helpful. I normally do initial development of imaging tasks in Fiji, but for often used tasks I then develop standalone application in Netbeans. Recently I have been trying to use the MorpholibJ plugin Label size opening. This works fine in an ImageJ macro. However, when I try to use it in Netbeans (so no ImageJ UI running) it leads to an error.

Code I’m using:

ImageProcessor labelImg;
        ImageProcessor imgDest=imgIn.duplicate();
        labelImg=BinaryImages.componentsLabeling(imgIn, 4, 32);
        imgDest=LabelImages.areaOpening(labelImg, minSize);
        imgDest=BinaryImages.binarize(imgDest);

The error refers to the line imgDest=LabelImages.areaOpening(labelImg, minSize);

Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError: ij.process.ImageProcessor.getLut()Lij/process/LUT;
	at inra.ijpb.label.LabelImages.areaOpening(LabelImages.java:511)

Does anybody have any idea what’s causing this?

thanks,

Rob

NoSuchMethodError means incompatible library versions. See this Troubleshooting section.

In this case, you might have a too-old version of ImageJ 1.x.

Which version of net.imagej:ij are you depending on in your NetBeans project?

2 Likes

I had 1.45. Now changed to latest (1.51) and everything works. Should have thought of that…
Thanks

2 Likes