use of ome.xml.model.Mask in project bioformats by openmicroscopy.
the class PrintROIs method printShape.
/**
* Print the given shape.
*/
public static void printShape(Shape shapeObject) {
if (shapeObject instanceof Ellipse) {
Ellipse ellipse = (Ellipse) shapeObject;
System.out.println(" Ellipse:");
System.out.println(" Text = " + ellipse.getText());
System.out.println(" X = " + ellipse.getX());
System.out.println(" Y = " + ellipse.getY());
System.out.println(" Radius (X) = " + ellipse.getRadiusX());
System.out.println(" Radius (Y) = " + ellipse.getRadiusY());
} else if (shapeObject instanceof Line) {
Line line = (Line) shapeObject;
System.out.println(" Line:");
System.out.println(" Text = " + line.getText());
System.out.println(" X1 = " + line.getX1());
System.out.println(" Y1 = " + line.getY1());
System.out.println(" X2 = " + line.getX2());
System.out.println(" Y2 = " + line.getY2());
} else if (shapeObject instanceof Point) {
Point point = (Point) shapeObject;
System.out.println(" Point:");
System.out.println(" Text = " + point.getText());
System.out.println(" X = " + point.getX());
System.out.println(" Y = " + point.getY());
} else if (shapeObject instanceof Polyline) {
Polyline polyline = (Polyline) shapeObject;
System.out.println(" Polyline:");
System.out.println(" Text = " + polyline.getText());
System.out.println(" Points = " + polyline.getPoints());
} else if (shapeObject instanceof Polygon) {
Polygon polygon = (Polygon) shapeObject;
System.out.println(" Polygon:");
System.out.println(" Text = " + polygon.getText());
System.out.println(" Points = " + polygon.getPoints());
} else if (shapeObject instanceof Rectangle) {
Rectangle rectangle = (Rectangle) shapeObject;
System.out.println(" Rectangle:");
System.out.println(" Text = " + rectangle.getText());
} else if (shapeObject instanceof Mask) {
Mask mask = (Mask) shapeObject;
System.out.println(" Mask:");
System.out.println(" Text = " + mask.getText());
System.out.println(" X = " + mask.getX());
System.out.println(" Y = " + mask.getY());
System.out.println(" Width = " + mask.getWidth());
System.out.println(" Height = " + mask.getHeight());
} else if (shapeObject instanceof Label) {
Label text = (Label) shapeObject;
System.out.println(" Label:");
System.out.println(" Text = " + text.getText());
System.out.println(" X = " + text.getX());
System.out.println(" Y = " + text.getY());
}
}