I am working on adding support for 2D ROIs to ImageJ-OMERO. In order to do this, I will need to expand the ImgLib2-Roi API. My basic plan for doing this is outlined below. @ctrueden, @tpietzsch, @dietzc, @axtimwalde, @joshmoore please let me know your thoughts on this plan, and if you have any questions/concerns regarding it.
- Create the below classes:
b. Composite (OMERO allows for ROIs which are a union of shapes, this would be the equiavalent to that)
- Rename Polygon to Polygon2D
- Add methods to Regions to create:
- Create GeomRegions in
net.imglib2.roi.geometricand add methods to create the below ROIs to it:
- All of the proposed new classes would implement the
Containsinterface, and the
- Create all classes expect BinaryMask & Composite in `net.imglib2.roi.geometric’
- Create BinaryMask & Composite in
- BinaryMask would essentially be an
- Contain a list of ROIs in the composite
- Allow for operations (union, difference, etc.) between ROI structures via JTS Topology Suite
- Point2D would be a RealPoint
- Line2D would be defined by two
- Polyline2D would be defined by a
- Could also specify which points in the list are the start/end points. If not specified assume first point in list is start and last point in list is end
- Rectangle2D defined by width, height, center point, and
AffineTransform2Dwould allow for rotations if someone didn’t want a rectangle which was parallel to the xy-axes
- Ellipse2D defined by xy radii, center,
- Do we want to include a method for creating LabelRegions in Regions? I can see keeping it separate or adding it …
- Would we prefer to define a rectangle by the four corner points? Or some other way? Or both?
- What should be the equivalent data structure in ImgLib2 for OMERO Label ROIs?
a. We could try to equate OMERO Labels to ImgLib2 LabelRegions
b. Or we could create a new type of label (either in ImgLib2 or ImageJ-OMERO), which is more of a direct equivalent to OMERO Labels
This is just a very high level plan. There’s still more details to work out, but I wanted to make sure we were ok with this basic structure before I proceeded. Please feel free to make suggestions or bring up any issues which I haven’t addressed.