private void populateROI(List<String> columns, String[] data, int series, int roi, int time, int z, MetadataStore store) { String roiID = MetadataTools.createLSID("ROI", roi, 0); store.setROIID(roiID, roi); store.setImageROIRef(roiID, series, roi); store.setEllipseID(MetadataTools.createLSID("Shape", roi, 0), roi, 0); store.setEllipseTheT(new NonNegativeInteger(time), roi, 0); store.setEllipseTheZ(new NonNegativeInteger(z), roi, 0); store.setEllipseX(new Double(data[columns.indexOf("Col")]), roi, 0); store.setEllipseY(new Double(data[columns.indexOf("Row")]), roi, 0); store.setEllipseText(data[columns.indexOf("Label")], roi, 0); double diam = Double.parseDouble(data[columns.indexOf("Cell Diam.")]); double radius = diam / 2; store.setEllipseRadiusX(radius, roi, 0); store.setEllipseRadiusY(radius, roi, 0); // NB: other attributes are "Nucleus Area", "Cell Type", and // "Mean Nucleus Intens." }
private void populateROI(List<String> columns, String[] data, int series, int roi, int time, int z, MetadataStore store) { String roiID = MetadataTools.createLSID("ROI", roi, 0); store.setROIID(roiID, roi); store.setImageROIRef(roiID, series, roi); store.setEllipseID(MetadataTools.createLSID("Shape", roi, 0), roi, 0); store.setEllipseTheT(new NonNegativeInteger(time), roi, 0); store.setEllipseTheZ(new NonNegativeInteger(z), roi, 0); store.setEllipseX(new Double(data[columns.indexOf("Col")]), roi, 0); store.setEllipseY(new Double(data[columns.indexOf("Row")]), roi, 0); store.setEllipseText(data[columns.indexOf("Label")], roi, 0); double diam = Double.parseDouble(data[columns.indexOf("Cell Diam.")]); double radius = diam / 2; store.setEllipseRadiusX(radius, roi, 0); store.setEllipseRadiusY(radius, roi, 0); // NB: other attributes are "Nucleus Area", "Cell Type", and // "Mean Nucleus Intens." }
private int populateCircles(NodeList circles, int roi, int shape) { for (int s=0; s<circles.getLength(); s++, shape++) { Element circle = (Element) circles.item(s); Element geometry = getFirstNode(circle, "Geometry"); Element textElements = getFirstNode(circle, "TextElements"); Element attributes = getFirstNode(circle, "Attributes"); store.setEllipseID( MetadataTools.createLSID("Shape", roi, shape), roi, shape); String radius = getFirstNodeValue(geometry, "Radius"); String centerX = getFirstNodeValue(geometry, "CenterX"); String centerY = getFirstNodeValue(geometry, "CenterY"); if (radius != null) { store.setEllipseRadiusX(new Double(radius), roi, shape); store.setEllipseRadiusY(new Double(radius), roi, shape); } if (centerX != null) { store.setEllipseX(new Double(centerX), roi, shape); } if (centerY != null) { store.setEllipseY(new Double(centerY), roi, shape); } store.setEllipseText(getFirstNodeValue(textElements, "Text"), roi, shape); } return shape; }
private int populateCircles(NodeList circles, int roi, int shape) { for (int s=0; s<circles.getLength(); s++, shape++) { Element circle = (Element) circles.item(s); Element geometry = getFirstNode(circle, "Geometry"); Element textElements = getFirstNode(circle, "TextElements"); Element attributes = getFirstNode(circle, "Attributes"); store.setEllipseID( MetadataTools.createLSID("Shape", roi, shape), roi, shape); String radius = getFirstNodeValue(geometry, "Radius"); String centerX = getFirstNodeValue(geometry, "CenterX"); String centerY = getFirstNodeValue(geometry, "CenterY"); if (radius != null) { store.setEllipseRadiusX(new Double(radius), roi, shape); store.setEllipseRadiusY(new Double(radius), roi, shape); } if (centerX != null) { store.setEllipseX(new Double(centerX), roi, shape); } if (centerY != null) { store.setEllipseY(new Double(centerY), roi, shape); } store.setEllipseText(getFirstNodeValue(textElements, "Text"), roi, shape); } return shape; }
store.setEllipseY(shape.y1 + radiusY, nextROI, 0); store.setEllipseRadiusX(radiusX, nextROI, 0); store.setEllipseRadiusY(radiusY, nextROI, 0); store.setEllipseText(shape.text, nextROI, 0); store.setEllipseFontSize(shape.fontSize, nextROI, 0);
store.setEllipseY(shape.y1 + radiusY, i, 0); store.setEllipseRadiusX(radiusX, i, 0); store.setEllipseRadiusY(radiusY, i, 0); store.setEllipseText(shape.text, i, 0); store.setEllipseFontSize(shape.fontSize, i, 0);
store.setEllipseRadiusY(new Double(radiusY), roiCount, shape);
store.setEllipseRadiusY(new Double(radiusY), roiCount, shape);
store.setEllipseY(centerY, i, 0); store.setEllipseRadiusX(rx, i, 0); store.setEllipseRadiusY(ry, i, 0); if (fontSize != null) { store.setEllipseFontSize(fontSize, i, 0); store.setEllipseY(centerY, i, 0); store.setEllipseRadiusX(radius, i, 0); store.setEllipseRadiusY(radius, i, 0); if (fontSize != null) { store.setEllipseFontSize(fontSize, i, 0); store.setEllipseY(cy, i, 0); store.setEllipseRadiusX(r, i, 0); store.setEllipseRadiusY(r, i, 0); if (fontSize != null) { store.setEllipseFontSize(fontSize, i, 0);
store.setEllipseY(y + ry, nextROI, shape); store.setEllipseRadiusX(rx, nextROI, shape); store.setEllipseRadiusY(ry, nextROI, shape);
store.setEllipseY(centerY, i, 0); store.setEllipseRadiusX(rx, i, 0); store.setEllipseRadiusY(ry, i, 0); if (fontSize != null) { store.setEllipseFontSize(fontSize, i, 0); store.setEllipseY(centerY, i, 0); store.setEllipseRadiusX(radius, i, 0); store.setEllipseRadiusY(radius, i, 0); if (fontSize != null) { store.setEllipseFontSize(fontSize, i, 0); store.setEllipseY(cy, i, 0); store.setEllipseRadiusX(r, i, 0); store.setEllipseRadiusY(r, i, 0); if (fontSize != null) { store.setEllipseFontSize(fontSize, i, 0);
store.setEllipseY(y + ry, nextROI, shape); store.setEllipseRadiusX(rx, nextROI, shape); store.setEllipseRadiusY(ry, nextROI, shape);
store.setEllipseY(((double) y + ry/2), roiNum, shape); store.setEllipseRadiusX((double) rx/2, roiNum, shape); store.setEllipseRadiusY((double) ry/2, roiNum, shape); store.setEllipseText(roi.getName(), roiNum, shape); if (c >= 0) {
store.setEllipseY(((double) y + ry/2), roiNum, shape); store.setEllipseRadiusX((double) rx/2, roiNum, shape); store.setEllipseRadiusY((double) ry/2, roiNum, shape); store.setEllipseText(roi.getName(), roiNum, shape); if (c >= 0) {
store.setEllipseY(shape.points[1], roiIndex, shapeIndex); store.setEllipseRadiusX(radius, roiIndex, shapeIndex); store.setEllipseRadiusY(radius, roiIndex, shapeIndex); if (shape.text != null) store.setEllipseText(shape.text, roiIndex, shapeIndex); store.setEllipseY((shape.points[1] + shape.points[5])/2, roiIndex, shapeIndex); store.setEllipseRadiusX((shape.points[4] - shape.points[0])/2.0, roiIndex, shapeIndex); store.setEllipseRadiusY((shape.points[5] - shape.points[1])/2.0, roiIndex, shapeIndex); if (shape.text != null) store.setEllipseText(shape.text, roiIndex, shapeIndex);
store.setEllipseY(shape.points[1], roiIndex, shapeIndex); store.setEllipseRadiusX(radius, roiIndex, shapeIndex); store.setEllipseRadiusY(radius, roiIndex, shapeIndex); if (shape.text != null) store.setEllipseText(shape.text, roiIndex, shapeIndex); store.setEllipseY((shape.points[1] + shape.points[5])/2, roiIndex, shapeIndex); store.setEllipseRadiusX((shape.points[4] - shape.points[0])/2.0, roiIndex, shapeIndex); store.setEllipseRadiusY((shape.points[5] - shape.points[1])/2.0, roiIndex, shapeIndex); if (shape.text != null) store.setEllipseText(shape.text, roiIndex, shapeIndex);
store.setEllipseY(getY(i) + ROI_SPACING / 2, roiCount, 0); store.setEllipseRadiusX(new Double(ROI_SPACING / 2), roiCount, 0); store.setEllipseRadiusY(new Double(ROI_SPACING / 2), roiCount, 0); store.setImageROIRef(roiID, imageIndex, roiRefCount); roiCount++;
store.setEllipseY(getY(i) + ROI_SPACING / 2, roiCount, 0); store.setEllipseRadiusX(new Double(ROI_SPACING / 2), roiCount, 0); store.setEllipseRadiusY(new Double(ROI_SPACING / 2), roiCount, 0); store.setImageROIRef(roiID, imageIndex, roiRefCount); roiCount++;
store.setEllipseY(y1, roiNum, shapeNum); store.setEllipseRadiusX(width, roiNum, shapeNum); store.setEllipseRadiusY(height, roiNum, shapeNum); store.setEllipseTheC(unwrap(shape1.getTheC()), roiNum, shapeNum); store.setEllipseTheZ(unwrap(shape1.getTheZ()), roiNum, shapeNum);