public int getShapeCount(int ROIIndex) { // Parents: {u'Union': {u'ROI': {u'OME': None}}} // Shape is not a reference return root.getROI(ROIIndex).getUnion().sizeOfShapeList(); }
public int getShapeCount(int ROIIndex) { // Parents: {u'Union': {u'ROI': {u'OME': None}}} // Shape is not a reference return root.getROI(ROIIndex).getUnion().sizeOfShapeList(); }
@Test (groups = {"11-06-u-roi"}, dependsOnMethods = {"testOmeNode"}) public void testROI2AndUnion() { Assert.assertNotNull(ome); roi2 = ome.getROI(2); Assert.assertNull(roi2.getDescription()); Assert.assertNull(roi2.getName()); union2 = roi2.getUnion(); Assert.assertNotNull(union2); Assert.assertEquals(8, union2.sizeOfShapeList()); }
@Test (groups = {"11-06-u-roi"}, dependsOnMethods = {"testOmeNode"}) public void testROI0AndUnion() { Assert.assertNotNull(ome); roi0 = ome.getROI(0); Assert.assertNull(roi0.getDescription()); Assert.assertNull(roi0.getName()); union0 = roi0.getUnion(); Assert.assertNotNull(union0); Assert.assertEquals(1, union0.sizeOfShapeList()); }
@Test (groups = {"11-06-u-roi"}, dependsOnMethods = {"testOmeNode"}) public void testROI3AndUnion() { Assert.assertNotNull(ome); roi3 = ome.getROI(3); Assert.assertNull(roi3.getDescription()); Assert.assertNull(roi3.getName()); union3 = roi3.getUnion(); Assert.assertNotNull(union3); Assert.assertEquals(1, union3.sizeOfShapeList()); }
@Test (groups = {"11-06-u-roi"}, dependsOnMethods = {"testOmeNode"}) public void testROI1AndUnion() { Assert.assertNotNull(ome); roi1 = ome.getROI(1); Assert.assertEquals(ref.ROI1Description, roi1.getDescription()); Assert.assertNull(roi1.getName()); union1 = roi1.getUnion(); Assert.assertNotNull(union1); Assert.assertEquals(1, union1.sizeOfShapeList()); }
@Test (groups = {"11-06-u-roi"}, dependsOnMethods = {"testOmeNode"}) public void testROI4AndUnion() { Assert.assertNotNull(ome); roi4 = ome.getROI(4); Assert.assertNull(roi4.getDescription()); Assert.assertNull(roi4.getName()); union4 = roi4.getUnion(); Assert.assertNotNull(union4); Assert.assertEquals(2, union4.sizeOfShapeList()); }
public void setEllipseFillColor(Color fillColor, int ROIIndex, int shapeIndex) { // Parents: None // FillColor is not a reference OME o0 = root; if (o0.sizeOfROIList() == ROIIndex) { o0.addROI(new ROI()); } ROI o1 = o0.getROI(ROIIndex); if (o1.getUnion() == null) { o1.setUnion(new Union()); } Union o2 = o1.getUnion(); if (o2.sizeOfShapeList() == shapeIndex) { o2.addShape(new Ellipse()); } Ellipse o3 = (Ellipse) o2.getShape(shapeIndex); o3.setFillColor(fillColor); }
public void setEllipseStrokeColor(Color strokeColor, int ROIIndex, int shapeIndex) { // Parents: None // StrokeColor is not a reference OME o0 = root; if (o0.sizeOfROIList() == ROIIndex) { o0.addROI(new ROI()); } ROI o1 = o0.getROI(ROIIndex); if (o1.getUnion() == null) { o1.setUnion(new Union()); } Union o2 = o1.getUnion(); if (o2.sizeOfShapeList() == shapeIndex) { o2.addShape(new Ellipse()); } Ellipse o3 = (Ellipse) o2.getShape(shapeIndex); o3.setStrokeColor(strokeColor); }
public void setEllipseStrokeDashArray(String strokeDashArray, int ROIIndex, int shapeIndex) { // Parents: None // StrokeDashArray is not a reference OME o0 = root; if (o0.sizeOfROIList() == ROIIndex) { o0.addROI(new ROI()); } ROI o1 = o0.getROI(ROIIndex); if (o1.getUnion() == null) { o1.setUnion(new Union()); } Union o2 = o1.getUnion(); if (o2.sizeOfShapeList() == shapeIndex) { o2.addShape(new Ellipse()); } Ellipse o3 = (Ellipse) o2.getShape(shapeIndex); o3.setStrokeDashArray(strokeDashArray); }
public void setEllipseStrokeWidth(Length strokeWidth, int ROIIndex, int shapeIndex) { // Parents: None // StrokeWidth is not a reference OME o0 = root; if (o0.sizeOfROIList() == ROIIndex) { o0.addROI(new ROI()); } ROI o1 = o0.getROI(ROIIndex); if (o1.getUnion() == null) { o1.setUnion(new Union()); } Union o2 = o1.getUnion(); if (o2.sizeOfShapeList() == shapeIndex) { o2.addShape(new Ellipse()); } Ellipse o3 = (Ellipse) o2.getShape(shapeIndex); o3.setStrokeWidth(strokeWidth); }
public void setEllipseTransform(AffineTransform transform, int ROIIndex, int shapeIndex) { // Parents: None // Transform is not a reference OME o0 = root; if (o0.sizeOfROIList() == ROIIndex) { o0.addROI(new ROI()); } ROI o1 = o0.getROI(ROIIndex); if (o1.getUnion() == null) { o1.setUnion(new Union()); } Union o2 = o1.getUnion(); if (o2.sizeOfShapeList() == shapeIndex) { o2.addShape(new Ellipse()); } Ellipse o3 = (Ellipse) o2.getShape(shapeIndex); o3.setTransform(transform); }
public void setLineMarkerEnd(Marker markerEnd, int ROIIndex, int shapeIndex) { // Parents: None // MarkerEnd is not a reference OME o0 = root; if (o0.sizeOfROIList() == ROIIndex) { o0.addROI(new ROI()); } ROI o1 = o0.getROI(ROIIndex); if (o1.getUnion() == null) { o1.setUnion(new Union()); } Union o2 = o1.getUnion(); if (o2.sizeOfShapeList() == shapeIndex) { o2.addShape(new Line()); } Line o3 = (Line) o2.getShape(shapeIndex); o3.setMarkerEnd(markerEnd); }
public void setMaskFontSize(Length fontSize, int ROIIndex, int shapeIndex) { // Parents: None // FontSize is not a reference OME o0 = root; if (o0.sizeOfROIList() == ROIIndex) { o0.addROI(new ROI()); } ROI o1 = o0.getROI(ROIIndex); if (o1.getUnion() == null) { o1.setUnion(new Union()); } Union o2 = o1.getUnion(); if (o2.sizeOfShapeList() == shapeIndex) { o2.addShape(new Mask()); } Mask o3 = (Mask) o2.getShape(shapeIndex); o3.setFontSize(fontSize); }
public void setMaskFontStyle(FontStyle fontStyle, int ROIIndex, int shapeIndex) { // Parents: None // FontStyle is not a reference OME o0 = root; if (o0.sizeOfROIList() == ROIIndex) { o0.addROI(new ROI()); } ROI o1 = o0.getROI(ROIIndex); if (o1.getUnion() == null) { o1.setUnion(new Union()); } Union o2 = o1.getUnion(); if (o2.sizeOfShapeList() == shapeIndex) { o2.addShape(new Mask()); } Mask o3 = (Mask) o2.getShape(shapeIndex); o3.setFontStyle(fontStyle); }
public void setPolygonPoints(String points, int ROIIndex, int shapeIndex) { // Parents: None // Points is not a reference OME o0 = root; if (o0.sizeOfROIList() == ROIIndex) { o0.addROI(new ROI()); } ROI o1 = o0.getROI(ROIIndex); if (o1.getUnion() == null) { o1.setUnion(new Union()); } Union o2 = o1.getUnion(); if (o2.sizeOfShapeList() == shapeIndex) { o2.addShape(new Polygon()); } Polygon o3 = (Polygon) o2.getShape(shapeIndex); o3.setPoints(points); }
public void setPolygonStrokeColor(Color strokeColor, int ROIIndex, int shapeIndex) { // Parents: None // StrokeColor is not a reference OME o0 = root; if (o0.sizeOfROIList() == ROIIndex) { o0.addROI(new ROI()); } ROI o1 = o0.getROI(ROIIndex); if (o1.getUnion() == null) { o1.setUnion(new Union()); } Union o2 = o1.getUnion(); if (o2.sizeOfShapeList() == shapeIndex) { o2.addShape(new Polygon()); } Polygon o3 = (Polygon) o2.getShape(shapeIndex); o3.setStrokeColor(strokeColor); }
public void setPolygonStrokeWidth(Length strokeWidth, int ROIIndex, int shapeIndex) { // Parents: None // StrokeWidth is not a reference OME o0 = root; if (o0.sizeOfROIList() == ROIIndex) { o0.addROI(new ROI()); } ROI o1 = o0.getROI(ROIIndex); if (o1.getUnion() == null) { o1.setUnion(new Union()); } Union o2 = o1.getUnion(); if (o2.sizeOfShapeList() == shapeIndex) { o2.addShape(new Polygon()); } Polygon o3 = (Polygon) o2.getShape(shapeIndex); o3.setStrokeWidth(strokeWidth); }
@Test public void validateUpgrade() throws ServiceException { assertEquals(1, ome.sizeOfImageList()); Image image = ome.getImage(0); assertNotNull(image.getAcquisitionDate()); assertEquals(1, ome.sizeOfROIList()); ROI roi = ome.getROI(0); Union union = roi.getUnion(); assertEquals(1, union.sizeOfShapeList()); Shape shape = union.getShape(0); assertTrue(shape instanceof Label); assertNotNull(shape.getText()); }
@Test(dependsOnMethods={"testValidOMENode"}) public void testValidROINode() { ROI roi = ome.getROI(0); assertNotNull(roi); assertEquals(ROI_ID, roi.getID()); Union shapeUnion = roi.getUnion(); assertNotNull(shapeUnion); assertEquals(1, shapeUnion.sizeOfShapeList()); Shape s = shapeUnion.getShape(0); assertNotNull(s); assertEquals(SHAPE_ID, s.getID()); assertTrue(s instanceof Rectangle); Rectangle rect = (Rectangle) s; assertEquals(RECTANGLE_X, rect.getX()); assertEquals(RECTANGLE_Y, rect.getY()); assertEquals(RECTANGLE_WIDTH, rect.getWidth()); assertEquals(RECTANGLE_HEIGHT, rect.getHeight()); }