imglib / imglib2-roi

Regions of interest (ROIs) and labelings for ImgLib2
Other
8 stars 8 forks source link

Ellipsoid #28

Closed tibuch closed 7 years ago

tibuch commented 7 years ago

I am improving the geometric 2d feature tests in imagej-ops https://github.com/imagej/imagej-ops/issues/449. Since I couldn't verify the major- and minor-axis numbers I took a closer look at the implementation. Currently ImageJ1 code which is adapted to work with a Polygon is used to find the fitting ellipse from which major- and minor-axis are extracted.

Since I couldn't verify the numbers I opened this discussion https://github.com/imagej/imagej-ops/issues/452 which ended up in this PR https://github.com/imagej/imagej-ops/pull/453 which would decouple the fitting ellipse implementation from the major- and minor-axis implementation and could be tested against a matlab-implementation.

This is not the best solution, because this implementation is based on the deprecated ellipse implementation. In discussion with @tpietzsch and @dietzc I found other implementations of HyperEllipsoids and fitting ellipse algorithms.

What do we have:

What I would suggest:

I am happy to contribute, the question is just where to continue.

maierl commented 7 years ago

There's another 3D Ellipsoid implementation available as ImageJ plugin: https://github.com/mcib3d/mcib3d-plugins/blob/master/src/main/java/mcib_plugins/Ellipsoids_3D.java

tibuch commented 7 years ago

I was able to verify the major-minor-axis implementation.

The best fitting ellipse in the major-minor-axis case, is the one with the "same" area. which is different from the referenced implementations which fit an ellipse to a point cloud.

Also ellipse is part of this discussion: http://forum.imagej.net/t/implementation-plan-for-imglib2-rois-2d/2531/1