for (int i=0; i<channelNodes.getLength(); i++) { Element channel = (Element) channelNodes.item(i); String color = getFirstNodeValue(channel, "Color"); if (color == null) { color = getFirstNodeValue(channel, "OriginalColor"); String fluor = getFirstNodeValue(channel, "DyeName"); if (fluor != null) { channels.get(i).fluor = fluor; String emission = getFirstNodeValue(channel, "DyeMaxEmission"); if (emission != null) { channels.get(i).emission = emission; String excitation = getFirstNodeValue(channel, "DyeMaxExcitation"); if (excitation != null) { channels.get(i).excitation = excitation; String illumination = getFirstNodeValue(channel, "IlluminationType");
for (int i=0; i<channelNodes.getLength(); i++) { Element channel = (Element) channelNodes.item(i); String color = getFirstNodeValue(channel, "Color"); if (color == null) { color = getFirstNodeValue(channel, "OriginalColor"); String fluor = getFirstNodeValue(channel, "DyeName"); if (fluor != null) { channels.get(i).fluor = fluor; String emission = getFirstNodeValue(channel, "DyeMaxEmission"); if (emission != null) { channels.get(i).emission = emission; String excitation = getFirstNodeValue(channel, "DyeMaxExcitation"); if (excitation != null) { channels.get(i).excitation = excitation; String illumination = getFirstNodeValue(channel, "IlluminationType");
private int populateRectangles(NodeList rectangles, int roi, int shape) { for (int s=0; s<rectangles.getLength(); s++) { Element rectangle = (Element) rectangles.item(s); Element geometry = getFirstNode(rectangle, "Geometry"); Element textElements = getFirstNode(rectangle, "TextElements"); Element attributes = getFirstNode(rectangle, "Attributes"); String left = getFirstNodeValue(geometry, "Left"); String top = getFirstNodeValue(geometry, "Top"); String width = getFirstNodeValue(geometry, "Width"); String height = getFirstNodeValue(geometry, "Height"); if (left != null && top != null && width != null && height != null) { store.setRectangleID( MetadataTools.createLSID("Shape", roi, shape), roi, shape); store.setRectangleX(new Double(left), roi, shape); store.setRectangleY(new Double(top), roi, shape); store.setRectangleWidth(new Double(width), roi, shape); store.setRectangleHeight(new Double(height), roi, shape); String name = getFirstNodeValue(attributes, "Name"); String label = getFirstNodeValue(textElements, "Text"); if (label != null) { store.setRectangleText(label, roi, shape); } shape++; } } return shape; }
private int populateRectangles(NodeList rectangles, int roi, int shape) { for (int s=0; s<rectangles.getLength(); s++) { Element rectangle = (Element) rectangles.item(s); Element geometry = getFirstNode(rectangle, "Geometry"); Element textElements = getFirstNode(rectangle, "TextElements"); Element attributes = getFirstNode(rectangle, "Attributes"); String left = getFirstNodeValue(geometry, "Left"); String top = getFirstNodeValue(geometry, "Top"); String width = getFirstNodeValue(geometry, "Width"); String height = getFirstNodeValue(geometry, "Height"); if (left != null && top != null && width != null && height != null) { store.setRectangleID( MetadataTools.createLSID("Shape", roi, shape), roi, shape); store.setRectangleX(new Double(left), roi, shape); store.setRectangleY(new Double(top), roi, shape); store.setRectangleWidth(new Double(width), roi, shape); store.setRectangleHeight(new Double(height), roi, shape); String name = getFirstNodeValue(attributes, "Name"); String label = getFirstNodeValue(textElements, "Text"); if (label != null) { store.setRectangleText(label, roi, shape); } shape++; } } return shape; }
getFirstNodeValue(manufacturerNode, "Manufacturer"); String model = getFirstNodeValue(manufacturerNode, "Model"); String serialNumber = getFirstNodeValue(manufacturerNode, "SerialNumber"); String lotNumber = getFirstNodeValue(manufacturerNode, "LotNumber"); String correction = getFirstNodeValue(objective, "Correction"); if (correction != null) { store.setObjectiveCorrection(MetadataTools.getCorrection(correction), 0, i); MetadataTools.getImmersion(getFirstNodeValue(objective, "Immersion")), 0, i); String lensNA = getFirstNodeValue(objective, "LensNA"); if (lensNA != null) { store.setObjectiveLensNA(new Double(lensNA), 0, i); getFirstNodeValue(objective, "NominalMagnification"); if (magnification == null) { magnification = getFirstNodeValue(objective, "Magnification"); getFirstNodeValue(objective, "CalibratedMagnification"); if (calibratedMag != null) { store.setObjectiveCalibratedMagnification( new Double(calibratedMag), 0, i); String wd = getFirstNodeValue(objective, "WorkingDistance"); if (wd != null) { store.setObjectiveWorkingDistance(new Length(new Double(wd), UNITS.MICROMETER), 0, i);
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; }
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; }
getFirstNodeValue(manufacturerNode, "Manufacturer"); String model = getFirstNodeValue(manufacturerNode, "Model"); String serialNumber = getFirstNodeValue(manufacturerNode, "SerialNumber"); String lotNumber = getFirstNodeValue(manufacturerNode, "LotNumber"); String correction = getFirstNodeValue(objective, "Correction"); if (correction != null) { store.setObjectiveCorrection(MetadataTools.getCorrection(correction), 0, i); MetadataTools.getImmersion(getFirstNodeValue(objective, "Immersion")), 0, i); String lensNA = getFirstNodeValue(objective, "LensNA"); if (lensNA != null) { store.setObjectiveLensNA(new Double(lensNA), 0, i); getFirstNodeValue(objective, "NominalMagnification"); if (magnification == null) { magnification = getFirstNodeValue(objective, "Magnification"); getFirstNodeValue(objective, "CalibratedMagnification"); if (calibratedMag != null) { store.setObjectiveCalibratedMagnification( new Double(calibratedMag), 0, i); String wd = getFirstNodeValue(objective, "WorkingDistance"); if (wd != null) { store.setObjectiveWorkingDistance(new Length(new Double(wd), UNITS.MICROMETER), 0, i);
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 populatePolylines(NodeList polylines, int roi, int shape, boolean closed) { for (int s=0; s<polylines.getLength(); s++, shape++) { Element polyline = (Element) polylines.item(s); Element geometry = getFirstNode(polyline, "Geometry"); Element textElements = getFirstNode(polyline, "TextElements"); Element attributes = getFirstNode(polyline, "Attributes"); String shapeID = MetadataTools.createLSID("Shape", roi, shape); if (closed) { store.setPolygonID(shapeID, roi, shape); store.setPolygonPoints( getFirstNodeValue(geometry, "Points"), roi, shape); store.setPolygonText( getFirstNodeValue(textElements, "Text"), roi, shape); } else { store.setPolylineID(shapeID, roi, shape); store.setPolylinePoints( getFirstNodeValue(geometry, "Points"), roi, shape); store.setPolylineText( getFirstNodeValue(textElements, "Text"), roi, shape); } } return shape; }
private int populatePolylines(NodeList polylines, int roi, int shape, boolean closed) { for (int s=0; s<polylines.getLength(); s++, shape++) { Element polyline = (Element) polylines.item(s); Element geometry = getFirstNode(polyline, "Geometry"); Element textElements = getFirstNode(polyline, "TextElements"); Element attributes = getFirstNode(polyline, "Attributes"); String shapeID = MetadataTools.createLSID("Shape", roi, shape); if (closed) { store.setPolygonID(shapeID, roi, shape); store.setPolygonPoints( getFirstNodeValue(geometry, "Points"), roi, shape); store.setPolygonText( getFirstNodeValue(textElements, "Text"), roi, shape); } else { store.setPolylineID(shapeID, roi, shape); store.setPolylinePoints( getFirstNodeValue(geometry, "Points"), roi, shape); store.setPolylineText( getFirstNodeValue(textElements, "Text"), roi, shape); } } return shape; }
String position = getFirstNodeValue(objectiveChanger, "Position"); int positionIndex = -1; if (position != null) { objective.getAttribute("UniqueName"), 0, i); String immersion = getFirstNodeValue(objective, "Immersions"); store.setObjectiveImmersion(MetadataTools.getImmersion(immersion), 0, i); store.setObjectiveCorrection(MetadataTools.getCorrection("Other"), 0, i); String magnification = getFirstNodeValue(objective, "Magnification"); String na = getFirstNodeValue(objective, "NumericalAperture"); String wd = getFirstNodeValue(objective, "WorkingDistance");
String position = getFirstNodeValue(objectiveChanger, "Position"); int positionIndex = -1; if (position != null) { objective.getAttribute("UniqueName"), 0, i); String immersion = getFirstNodeValue(objective, "Immersions"); store.setObjectiveImmersion(MetadataTools.getImmersion(immersion), 0, i); store.setObjectiveCorrection(MetadataTools.getCorrection("Other"), 0, i); String magnification = getFirstNodeValue(objective, "Magnification"); String na = getFirstNodeValue(objective, "NumericalAperture"); String wd = getFirstNodeValue(objective, "WorkingDistance");
Element distance = (Element) distances.item(i); String id = distance.getAttribute("Id"); String originalValue = getFirstNodeValue(distance, "Value"); if (originalValue == null) { continue;
Element distance = (Element) distances.item(i); String id = distance.getAttribute("Id"); String originalValue = getFirstNodeValue(distance, "Value"); if (originalValue == null) { continue;
String tilesXValue = getFirstNodeValue(group, "TilesX"); String tilesYValue = getFirstNodeValue(group, "TilesY"); if (position != null && tilesXValue != null && !tilesXValue.isEmpty() && tilesYValue != null && !tilesYValue.isEmpty()) { Integer tilesX = DataTools.parseInteger(tilesXValue); String cameraModel = getFirstNodeValue(setup, "SelectedCamera"); store.setDetectorModel(model, 0, i); String bin = getFirstNodeValue(detector, "Binning"); if (bin != null) { bin = bin.replaceAll(",", "x"); for (int i=0; i<detectors.getLength(); i++) { Element detector = (Element) detectors.item(i); String voltage = getFirstNodeValue(detector, "Voltage"); if (i == 0 && d == 0) { gain = voltage; Element track = (Element) tracks.item(i); Element channel = getFirstNode(track, "Channel"); String exposure = getFirstNodeValue(channel, "ExposureTime"); String gain = getFirstNodeValue(channel, "EMGain");
String tilesXValue = getFirstNodeValue(group, "TilesX"); String tilesYValue = getFirstNodeValue(group, "TilesY"); if (position != null && tilesXValue != null && !tilesXValue.isEmpty() && tilesYValue != null && !tilesYValue.isEmpty()) { Integer tilesX = DataTools.parseInteger(tilesXValue); String cameraModel = getFirstNodeValue(setup, "SelectedCamera"); store.setDetectorModel(model, 0, i); String bin = getFirstNodeValue(detector, "Binning"); if (bin != null) { bin = bin.replaceAll(",", "x"); for (int i=0; i<detectors.getLength(); i++) { Element detector = (Element) detectors.item(i); String voltage = getFirstNodeValue(detector, "Voltage"); if (i == 0 && d == 0) { gain = voltage; Element track = (Element) tracks.item(i); Element channel = getFirstNode(track, "Channel"); String exposure = getFirstNodeValue(channel, "ExposureTime"); String gain = getFirstNodeValue(channel, "EMGain");
MetadataTools.createLSID("Shape", roiCount, shape + 1), roiCount, shape + 1); String length = getFirstNodeValue(geometry, "Length"); String centerX = getFirstNodeValue(geometry, "CenterX"); String centerY = getFirstNodeValue(geometry, "CenterY"); store.setLineText(getFirstNodeValue(textElements, "Text"), roiCount, shape); store.setLineText(getFirstNodeValue(textElements, "Text"), roiCount, shape + 1); MetadataTools.createLSID("Shape", roiCount, shape), roiCount, shape); String radiusX = getFirstNodeValue(geometry, "RadiusX"); String radiusY = getFirstNodeValue(geometry, "RadiusY"); String centerX = getFirstNodeValue(geometry, "CenterX"); String centerY = getFirstNodeValue(geometry, "CenterY"); getFirstNodeValue(textElements, "Text"), roiCount, shape); store.setROIID(roiID, roiCount); store.setROIName(layer.getAttribute("Name"), roiCount); store.setROIDescription(getFirstNodeValue(layer, "Usage"), roiCount);
MetadataTools.createLSID("Shape", roiCount, shape + 1), roiCount, shape + 1); String length = getFirstNodeValue(geometry, "Length"); String centerX = getFirstNodeValue(geometry, "CenterX"); String centerY = getFirstNodeValue(geometry, "CenterY"); store.setLineText(getFirstNodeValue(textElements, "Text"), roiCount, shape); store.setLineText(getFirstNodeValue(textElements, "Text"), roiCount, shape + 1); MetadataTools.createLSID("Shape", roiCount, shape), roiCount, shape); String radiusX = getFirstNodeValue(geometry, "RadiusX"); String radiusY = getFirstNodeValue(geometry, "RadiusY"); String centerX = getFirstNodeValue(geometry, "CenterX"); String centerY = getFirstNodeValue(geometry, "CenterY"); getFirstNodeValue(textElements, "Text"), roiCount, shape); store.setROIID(roiID, roiCount); store.setROIName(layer.getAttribute("Name"), roiCount); store.setROIDescription(getFirstNodeValue(layer, "Usage"), roiCount);