store.setLineX1(roiX + x.get(0), roi, 1); store.setLineY1(roiY + y.get(0), roi, 1); store.setLineX2(roiX + x.get(1), roi, 1); store.setLineY2(roiY + y.get(1), roi, 1); break;
store.setLineX1(roiX + x.get(0), roi, 1); store.setLineY1(roiY + y.get(0), roi, 1); store.setLineX2(roiX + x.get(1), roi, 1); store.setLineY2(roiY + y.get(1), roi, 1); break;
store.setLineX1(roiX + x.get(0), roi, 1); store.setLineY1(roiY + y.get(0), roi, 1); store.setLineX2(roiX + x.get(1), roi, 1); store.setLineY2(roiY + y.get(1), roi, 1); break;
store.setLineX1(roiX + x.get(0), roi, 1); store.setLineY1(roiY + y.get(0), roi, 1); store.setLineX2(roiX + x.get(1), roi, 1); store.setLineY2(roiY + y.get(1), roi, 1); break;
private int populateLines(NodeList lines, int roi, int shape) { for (int s=0; s<lines.getLength(); s++, shape++) { Element line = (Element) lines.item(s); Element geometry = getFirstNode(line, "Geometry"); Element textElements = getFirstNode(line, "TextElements"); Element attributes = getFirstNode(line, "Attributes"); String x1 = getFirstNodeValue(geometry, "X1"); String x2 = getFirstNodeValue(geometry, "X2"); String y1 = getFirstNodeValue(geometry, "Y1"); String y2 = getFirstNodeValue(geometry, "Y2"); store.setLineID( MetadataTools.createLSID("Shape", roi, shape), roi, shape); if (x1 != null) { store.setLineX1(new Double(x1), roi, shape); } if (x2 != null) { store.setLineX2(new Double(x2), roi, shape); } if (y1 != null) { store.setLineY1(new Double(y1), roi, shape); } if (y2 != null) { store.setLineY2(new Double(y2), roi, shape); } store.setLineText(getFirstNodeValue(textElements, "Text"), roi, shape); } return shape; }
private int populateLines(NodeList lines, int roi, int shape) { for (int s=0; s<lines.getLength(); s++, shape++) { Element line = (Element) lines.item(s); Element geometry = getFirstNode(line, "Geometry"); Element textElements = getFirstNode(line, "TextElements"); Element attributes = getFirstNode(line, "Attributes"); String x1 = getFirstNodeValue(geometry, "X1"); String x2 = getFirstNodeValue(geometry, "X2"); String y1 = getFirstNodeValue(geometry, "Y1"); String y2 = getFirstNodeValue(geometry, "Y2"); store.setLineID( MetadataTools.createLSID("Shape", roi, shape), roi, shape); if (x1 != null) { store.setLineX1(new Double(x1), roi, shape); } if (x2 != null) { store.setLineX2(new Double(x2), roi, shape); } if (y1 != null) { store.setLineY1(new Double(y1), roi, shape); } if (y2 != null) { store.setLineY2(new Double(y2), roi, shape); } store.setLineText(getFirstNodeValue(textElements, "Text"), roi, shape); } return shape; }
store.setLineX1(shape.x1, i, 0); store.setLineY1(shape.y1, i, 0); store.setLineX2(shape.x2, i, 0); store.setLineY2(shape.y2, i, 0); store.setLineText(shape.text, i, 0);
store.setLineX1(shape.x1, nextROI, 0); store.setLineY1(shape.y1, nextROI, 0); store.setLineX2(shape.x2, nextROI, 0); store.setLineY2(shape.y2, nextROI, 0); store.setLineText(shape.text, nextROI, 0);
store.setLineX2(new Double(roi.x2), roiNum, shape); store.setLineY1(new Double(roi.y1), roiNum, shape); store.setLineY2(new Double(roi.y2), roiNum, shape);
store.setLineX2(new Double(roi.x2), roiNum, shape); store.setLineY1(new Double(roi.y1), roiNum, shape); store.setLineY2(new Double(roi.y2), roiNum, shape);
store.setLineX1(shape.points[0], roiIndex, shapeIndex); store.setLineY1(shape.points[1], roiIndex, shapeIndex); store.setLineX2(shape.points[2], roiIndex, shapeIndex); store.setLineY2(shape.points[3], roiIndex, shapeIndex); if (shape.text != null) store.setLineX1(shape.points[(i*2)+0], roiIndex, shapeIndex); store.setLineY1(shape.points[(i*2)+1], roiIndex, shapeIndex); store.setLineX2(shape.points[(i*2)+2], roiIndex, shapeIndex); store.setLineY2(shape.points[(i*2)+3], roiIndex, shapeIndex); if (shape.text != null && i == caliperPoints - 2) // Store label on baseline store.setLineX1(shape.points[(i*2)+0], roiIndex, shapeIndex); store.setLineY1(shape.points[(i*2)+1], roiIndex, shapeIndex); store.setLineX2(shape.points[(i*2)+2], roiIndex, shapeIndex); store.setLineY2(shape.points[(i*2)+3], roiIndex, shapeIndex); if (shape.text != null && i == 0) store.setLineX1(shape.points[0], roiIndex, shapeIndex); store.setLineY1(shape.points[1], roiIndex, shapeIndex); store.setLineX2(shape.points[2], roiIndex, shapeIndex); store.setLineY2(shape.points[3], roiIndex, shapeIndex); shapeIndex++; store.setLineX1(shape.points[0], roiIndex, shapeIndex); store.setLineY1(shape.points[1], roiIndex, shapeIndex); store.setLineX2(shape.points[2], roiIndex, shapeIndex); store.setLineY2(shape.points[3], roiIndex, shapeIndex); store.setLineText(shape.text, roiIndex, shapeIndex);
store.setLineX1(shape.points[0], roiIndex, shapeIndex); store.setLineY1(shape.points[1], roiIndex, shapeIndex); store.setLineX2(shape.points[2], roiIndex, shapeIndex); store.setLineY2(shape.points[3], roiIndex, shapeIndex); if (shape.text != null) store.setLineX1(shape.points[(i*2)+0], roiIndex, shapeIndex); store.setLineY1(shape.points[(i*2)+1], roiIndex, shapeIndex); store.setLineX2(shape.points[(i*2)+2], roiIndex, shapeIndex); store.setLineY2(shape.points[(i*2)+3], roiIndex, shapeIndex); if (shape.text != null && i == caliperPoints - 2) // Store label on baseline store.setLineX1(shape.points[(i*2)+0], roiIndex, shapeIndex); store.setLineY1(shape.points[(i*2)+1], roiIndex, shapeIndex); store.setLineX2(shape.points[(i*2)+2], roiIndex, shapeIndex); store.setLineY2(shape.points[(i*2)+3], roiIndex, shapeIndex); if (shape.text != null && i == 0) store.setLineX1(shape.points[0], roiIndex, shapeIndex); store.setLineY1(shape.points[1], roiIndex, shapeIndex); store.setLineX2(shape.points[2], roiIndex, shapeIndex); store.setLineY2(shape.points[3], roiIndex, shapeIndex); shapeIndex++; store.setLineX1(shape.points[0], roiIndex, shapeIndex); store.setLineY1(shape.points[1], roiIndex, shapeIndex); store.setLineX2(shape.points[2], roiIndex, shapeIndex); store.setLineY2(shape.points[3], roiIndex, shapeIndex); store.setLineText(shape.text, roiIndex, shapeIndex);
store.setLineX1((double) x, nextROI, shape); store.setLineY1((double) y, nextROI, shape); store.setLineX2((double) (x + width), nextROI, shape); store.setLineY2((double) (y + height), nextROI, shape);
store.setLineX1((double) x, nextROI, shape); store.setLineY1((double) y, nextROI, shape); store.setLineX2((double) (x + width), nextROI, shape); store.setLineY2((double) (y + height), nextROI, shape);
store.setLineX1(startX, i, 0); store.setLineY1(startY, i, 0); store.setLineX2(endX, i, 0); store.setLineY2(endY, i, 0); if (fontSize != null) {
store.setLineX2(new Double(x2), roiNum, shapeNum); store.setLineY1(new Double(y1), roiNum, shapeNum); store.setLineY2(new Double(y2), roiNum, shapeNum);
store.setLineX1(getX(i) + ROI_SPACING / 4, roiCount, 0); store.setLineY1(getY(i) + ROI_SPACING / 4, roiCount, 0); store.setLineX2(getX(i) + ROI_SPACING / 2, roiCount, 0); store.setLineY2(getY(i) + ROI_SPACING / 2, roiCount, 0); store.setImageROIRef(roiID, imageIndex, roiRefCount);
store.setLineX1(getX(i) + ROI_SPACING / 4, roiCount, 0); store.setLineY1(getY(i) + ROI_SPACING / 4, roiCount, 0); store.setLineX2(getX(i) + ROI_SPACING / 2, roiCount, 0); store.setLineY2(getY(i) + ROI_SPACING / 2, roiCount, 0); store.setImageROIRef(roiID, imageIndex, roiRefCount);