case ARROW: case LINE: store.setLineID(shapeID, roi, 1); store.setLineX1(roiX + x.get(0), roi, 1); store.setLineY1(roiY + y.get(0), roi, 1);
case ARROW: case LINE: store.setLineID(shapeID, roi, 1); store.setLineX1(roiX + x.get(0), roi, 1); store.setLineY1(roiY + y.get(0), roi, 1);
case ARROW: case LINE: store.setLineID(shapeID, roi, 1); store.setLineX1(roiX + x.get(0), roi, 1); store.setLineY1(roiY + y.get(0), roi, 1);
case ARROW: case LINE: store.setLineID(shapeID, roi, 1); store.setLineX1(roiX + x.get(0), roi, 1); store.setLineY1(roiY + y.get(0), roi, 1);
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.setLineID(shapeID, i, 0); store.setLineX1(shape.x1, i, 0); store.setLineY1(shape.y1, i, 0);
case LINE: shapeID = createROI(store, nextROI); store.setLineID(shapeID, nextROI, 0); store.setLineX1(shape.x1, nextROI, 0); store.setLineY1(shape.y1, nextROI, 0);
case MEAS_PROFILE: // Uses a line as the profile path, but we can't handle that yet. shapeID = MetadataTools.createLSID("Shape", roiIndex, shapeIndex); store.setLineID(shapeID, roiIndex, shapeIndex); store.setLineX1(shape.points[0], roiIndex, shapeIndex); store.setLineY1(shape.points[1], roiIndex, shapeIndex); store.setLineID(shapeID, roiIndex, shapeIndex); store.setLineX1(shape.points[(i*2)+0], roiIndex, shapeIndex); store.setLineY1(shape.points[(i*2)+1], roiIndex, shapeIndex); store.setLineID(shapeID, roiIndex, shapeIndex); store.setLineX1(shape.points[(i*2)+0], roiIndex, shapeIndex); store.setLineY1(shape.points[(i*2)+1], roiIndex, shapeIndex); shapeIndex++; shapeID = MetadataTools.createLSID("Shape", roiIndex, shapeIndex); store.setLineID(shapeID, roiIndex, shapeIndex); store.setLineX1(shape.points[0], roiIndex, shapeIndex); store.setLineY1(shape.points[1], roiIndex, shapeIndex); store.setLineID(shapeID, roiIndex, shapeIndex); store.setLineX1(shape.points[0], roiIndex, shapeIndex); store.setLineY1(shape.points[1], roiIndex, shapeIndex); store.setLineID(shapeID, roiIndex, shapeIndex); store.setLineX1(shape.points[(i*2)+0], roiIndex, shapeIndex); store.setLineY1(shape.points[(i*2)+1], roiIndex, shapeIndex);
case MEAS_PROFILE: // Uses a line as the profile path, but we can't handle that yet. shapeID = MetadataTools.createLSID("Shape", roiIndex, shapeIndex); store.setLineID(shapeID, roiIndex, shapeIndex); store.setLineX1(shape.points[0], roiIndex, shapeIndex); store.setLineY1(shape.points[1], roiIndex, shapeIndex); store.setLineID(shapeID, roiIndex, shapeIndex); store.setLineX1(shape.points[(i*2)+0], roiIndex, shapeIndex); store.setLineY1(shape.points[(i*2)+1], roiIndex, shapeIndex); store.setLineID(shapeID, roiIndex, shapeIndex); store.setLineX1(shape.points[(i*2)+0], roiIndex, shapeIndex); store.setLineY1(shape.points[(i*2)+1], roiIndex, shapeIndex); shapeIndex++; shapeID = MetadataTools.createLSID("Shape", roiIndex, shapeIndex); store.setLineID(shapeID, roiIndex, shapeIndex); store.setLineX1(shape.points[0], roiIndex, shapeIndex); store.setLineY1(shape.points[1], roiIndex, shapeIndex); store.setLineID(shapeID, roiIndex, shapeIndex); store.setLineX1(shape.points[0], roiIndex, shapeIndex); store.setLineY1(shape.points[1], roiIndex, shapeIndex); store.setLineID(shapeID, roiIndex, shapeIndex); store.setLineX1(shape.points[(i*2)+0], roiIndex, shapeIndex); store.setLineY1(shape.points[(i*2)+1], roiIndex, shapeIndex);
store.setLineID(shapeID, nextROI, shape); store.setLineX1((double) x, nextROI, shape); store.setLineY1((double) y, nextROI, shape);
store.setLineID(shapeID, nextROI, shape); store.setLineX1((double) x, nextROI, shape); store.setLineY1((double) y, nextROI, shape);
boolean checkpoint = ijRoi.isDrawingTool(); if (!checkpoint) { store.setLineID(polylineID, cntr, 0); storeLine((Line) ijRoi, store, cntr, 0, c, z, t); } else { boolean checkpoint = ijShape.isDrawingTool(); if (!checkpoint) { store.setLineID(polylineID, cntr, 0); storeLine((Line) ijShape, store, cntr, 0, c, z, t); } else {
boolean checkpoint = ijRoi.isDrawingTool(); if (!checkpoint) { store.setLineID(polylineID, cntr, 0); storeLine((Line) ijRoi, store, cntr, 0, c, z, t); } else { boolean checkpoint = ijShape.isDrawingTool(); if (!checkpoint) { store.setLineID(polylineID, cntr, 0); storeLine((Line) ijShape, store, cntr, 0, c, z, t); } else {
store.setLineID(shapeID, i, 0); store.setLineX1(startX, i, 0); store.setLineY1(startY, i, 0);
store.setLineID(polylineID, roiNum, shapeNum);
roiID = ROI_PREFIX + roiCount; store.setROIID(roiID, roiCount); store.setLineID(SHAPE_PREFIX + roiCount, roiCount, 0); store.setLineX1(getX(i) + ROI_SPACING / 4, roiCount, 0); store.setLineY1(getY(i) + ROI_SPACING / 4, roiCount, 0);
roiID = ROI_PREFIX + roiCount; store.setROIID(roiID, roiCount); store.setLineID(SHAPE_PREFIX + roiCount, roiCount, 0); store.setLineX1(getX(i) + ROI_SPACING / 4, roiCount, 0); store.setLineY1(getY(i) + ROI_SPACING / 4, roiCount, 0);