fiji / Trainable_Segmentation

Fiji library to perform image segmentation based on the Weka learning schemes
https://imagej.net/Trainable_Weka_Segmentation
GNU General Public License v3.0
106 stars 60 forks source link

Adding Polygon as Example #73

Open julien2424 opened 2 years ago

julien2424 commented 2 years ago

Hello!

We are currently running Weka Segmentation successfully, but are only able to add Rectangles as ROIs for the examples. We thought we might be able to add Polygons (as they are both java.awt) but it seems like the ROI constructor only accepts Rectangles. How do you recommend we get around this? Thanks!

roi_constr

iarganda commented 2 years ago

I'll have a look. I haven't changed anything and Polygons used to work (if I remember well) so it might have to do with an update in the ImageJ core.

julien2424 commented 2 years ago

@iarganda Okay let me know what you find. Is there any way you can think of to get around this?

imagejan commented 2 years ago

@julien2424 do I get it right that you want to add a polygon ROI programmatically (i.e. not using the Polygon selection tool and your mouse)?

In this case, please use ij.gui.PolygonRoi which extends ij.gui.Roi.