Hi Mohamed,
> I was trying to write some code in which I want to create a
> PolygonRoi; in imageJ there is the PolygonRoi class from which I
> create a new instance and use x coordinates , y coordinates, number of
> points, Roi.Polygon as arguments. I wanted to test this in new imageJ2
Very sorry for the delay in reply, and glad to see your interest in trying
out ImageJ2!
> I downloaded the library (beta5) of both imageJ and ImgLib
Note that beta6 is the newest available release. You also may want to
consider simply working from the master branch of the Git repository, since
it is the newest.
> I went through the libraries; but couldn't get the PolygonRoi; Instead
> in the imglib2 library I found the class PolygonRegionOfInterest which
> accepts no arguments, and I couldn't find any way on how to use it.
The class you want is indeed PolygonRegionOfInterest within ImgLib2.
You'll notice that while the constructor takes no arguments, there is an
addVertex(int, RealLocalizable) method; something like:
myPolyRoi.addVertex(i, new RealPoint(new double[] {x, y}));
Admittedly not the friendliest, but the ROI API is still subject to change
at this point; there will be an ImageJ2 beta focused on ROIs later this
year [1].
Regards,
Curtis
[1]
http://trac.imagej.net/milestone/imagej2-b9-roisOn Mon, Mar 4, 2013 at 11:26 AM, Mohamed Tleis <
[hidden email]> wrote:
> Dear Members;
>
> I was trying to write some code in which I want to create a PolygonRoi; in
> imageJ there is the PolygonRoi class from which I create a new instance and
> use x coordinates , y coordinates, number of points, Roi.Polygon as
> arguments.
> I wanted to test this in new imageJ2; I downloaded the library (beta5) of
> both imageJ and ImgLib; I went through the libraries; but couldn't get the
> PolygonRoi; Instead in the imglib2 library I found the class
> PolygonRegionOfInterest which accepts no arguments, and I couldn't find any
> way on how to use it.
> I never coded with the new libraries yet, and was wondering how to do so.
>
> Thanks in advance,
>
> Best Regards,
> M. Tleis
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.**html<
http://imagej.nih.gov/ij/list.html>
>
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html