ROI statistic no longer working

If I use

<parent>
	<groupId>net.imagej</groupId>
	<artifactId>pom-imagej</artifactId>
	<version>7.0.0</version>
	<relativePath />
</parent>

then i can do

Roi UFOV = <some definition>;
double area0 = UFOV.getStatistics().area;

but starting from <version>8.0.0</version>, it throws me the error

error: cannot find symbol

My questions are, How can I use ROI statistics again?? which version use them again?? Is there another way to do this now??

Using 15.7.0 recovers the functionality, it seems that it were lost at some point, up to 14.0.0 it does not work.

Everything is solved now

@BishopWolf You are looking for ij.gui.Roi, which is part of net.imagej:ij. Do you have a dependency on that artifact declared in your POM?

using 7.0.0 and 15.7.0 works fine, without any extra declaration, but from 8.0.0 up to 14.0.0 it does not work at all. It says Roi does not have a getStatistic method.

Firstly, you should always add explicit dependencies for artifacts you are using directly, rather than relying on dependency inheritance. Otherwise, upstream dependency structure could change and then suddenly your code stops working mysteriously.

In other words, your POM should include:

<dependency>
  <groupId>net.imagej</groupId>
  <artifactId>ij</artifactId>
</dependency>

And any other dependencies whose classes you are using.

You can check it with:

mvn dependency:analyze

The ij.gui.Roi class indeed does not have a getStatistic method. There is getStatistics, however, which IIRC has been part of that class for many versions. So I’m not sure why you would see a difference in behavior between 15.7.0 and earlier versions of pom-imagej.