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; }
getFirstNode((Element) experiments.item(0), "ExperimentBlocks"); Element acquisition = getFirstNode(experimentBlock, "AcquisitionBlock"); if (acquisition == null) { return false; Element multiTrack = getFirstNode(acquisition, "MultiTrackSetup"); if (multiTrack == null) { return false; Element trackSetup = getFirstNode(multiTrack, "TrackSetup"); if (trackSetup == null) { return false; Element palmSlider = getFirstNode(trackSetup, "PalmSlider"); if (palmSlider == null) { return false;
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; }
getFirstNode((Element) experiments.item(0), "ExperimentBlocks"); Element acquisition = getFirstNode(experimentBlock, "AcquisitionBlock"); if (acquisition == null) { return false; Element multiTrack = getFirstNode(acquisition, "MultiTrackSetup"); if (multiTrack == null) { return false; Element trackSetup = getFirstNode(multiTrack, "TrackSetup"); if (trackSetup == null) { return false; Element palmSlider = getFirstNode(trackSetup, "PalmSlider"); if (palmSlider == null) { return false;
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 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 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; }
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; }
for (int i=0; i<objectives.getLength(); i++) { Element objective = (Element) objectives.item(i); Element manufacturerNode = getFirstNode(objective, "Manufacturer");
for (int i=0; i<objectives.getLength(); i++) { Element objective = (Element) objectives.item(i); Element manufacturerNode = getFirstNode(objective, "Manufacturer");
getFirstNode((Element) experiments.item(0), "ExperimentBlocks"); Element acquisition = getFirstNode(experimentBlock, "AcquisitionBlock"); Element tilesSetup = getFirstNode(acquisition, "TilesSetup"); NodeList groups = getGrandchildren(tilesSetup, "PositionGroup"); Element position = getFirstNode(group, "Position"); String tilesXValue = getFirstNodeValue(group, "TilesX"); String tilesYValue = getFirstNodeValue(group, "TilesY"); Element regionsSetup = getFirstNode(acquisition, "RegionsSetup"); Element sampleHolder = getFirstNode(regionsSetup, "SampleHolder"); if (sampleHolder != null) { NodeList regions = getGrandchildren(sampleHolder, String x = getFirstNode(region, "X").getTextContent(); String y = getFirstNode(region, "Y").getTextContent(); String z = getFirstNode(region, "Z").getTextContent(); Element setup = getFirstNode(acquisition, "AcquisitionModeSetup"); String cameraModel = getFirstNodeValue(setup, "SelectedCamera"); Element multiTrack = getFirstNode(acquisition, "MultiTrackSetup"); for (int i=0; i<tracks.getLength(); i++) { Element track = (Element) tracks.item(i); Element channel = getFirstNode(track, "Channel"); String exposure = getFirstNodeValue(channel, "ExposureTime"); String gain = getFirstNodeValue(channel, "EMGain");
getFirstNode((Element) experiments.item(0), "ExperimentBlocks"); Element acquisition = getFirstNode(experimentBlock, "AcquisitionBlock"); Element tilesSetup = getFirstNode(acquisition, "TilesSetup"); NodeList groups = getGrandchildren(tilesSetup, "PositionGroup"); Element position = getFirstNode(group, "Position"); String tilesXValue = getFirstNodeValue(group, "TilesX"); String tilesYValue = getFirstNodeValue(group, "TilesY"); Element regionsSetup = getFirstNode(acquisition, "RegionsSetup"); Element sampleHolder = getFirstNode(regionsSetup, "SampleHolder"); if (sampleHolder != null) { NodeList regions = getGrandchildren(sampleHolder, String x = getFirstNode(region, "X").getTextContent(); String y = getFirstNode(region, "Y").getTextContent(); String z = getFirstNode(region, "Z").getTextContent(); Element setup = getFirstNode(acquisition, "AcquisitionModeSetup"); String cameraModel = getFirstNodeValue(setup, "SelectedCamera"); Element multiTrack = getFirstNode(acquisition, "MultiTrackSetup"); for (int i=0; i<tracks.getLength(); i++) { Element track = (Element) tracks.item(i); Element channel = getFirstNode(track, "Channel"); String exposure = getFirstNodeValue(channel, "ExposureTime"); String gain = getFirstNodeValue(channel, "EMGain");
Element microscope = getFirstNode(hardware, "Microscope"); if (microscope != null) { String model = microscope.getAttribute("Name"); Element objectiveChanger = getFirstNode(hardware, "ObjectiveChanger"); if (objectiveChanger != null) { String position = getFirstNodeValue(objectiveChanger, "Position");
Element microscope = getFirstNode(hardware, "Microscope"); if (microscope != null) { String model = microscope.getAttribute("Name"); Element objectiveChanger = getFirstNode(hardware, "ObjectiveChanger"); if (objectiveChanger != null) { String position = getFirstNodeValue(objectiveChanger, "Position");
Element image = getFirstNode(information, "Image"); Element user = getFirstNode(information, "User"); Element environment = getFirstNode(information, "Environment"); Element instrument = getFirstNode(information, "Instrument"); Element document = getFirstNode(information, "Document"); Element objectiveSettings = getFirstNode(image, "ObjectiveSettings"); correctionCollar = getFirstNodeValue(objectiveSettings, "CorrectionCollar"); Element dimensions = getFirstNode(image, "Dimensions"); Element tNode = getFirstNode(dimensions, "T"); if (tNode != null) { Element positions = getFirstNode(tNode, "Positions"); if (positions != null) { Element interval = getFirstNode(positions, "Interval"); if (interval != null) { Element incrementNode = getFirstNode(interval, "Increment"); if (incrementNode != null) { String increment = incrementNode.getTextContent(); Element sNode = getFirstNode(dimensions, "S"); if (sNode != null) { NodeList scenes = sNode.getElementsByTagName("Scene"); Element detectorSettings = getFirstNode(channel, "DetectorSettings"); Element scanInfo = getFirstNode(channel, "LaserScanInfo");
Element image = getFirstNode(information, "Image"); Element user = getFirstNode(information, "User"); Element environment = getFirstNode(information, "Environment"); Element instrument = getFirstNode(information, "Instrument"); Element document = getFirstNode(information, "Document"); Element objectiveSettings = getFirstNode(image, "ObjectiveSettings"); correctionCollar = getFirstNodeValue(objectiveSettings, "CorrectionCollar"); Element dimensions = getFirstNode(image, "Dimensions"); Element tNode = getFirstNode(dimensions, "T"); if (tNode != null) { Element positions = getFirstNode(tNode, "Positions"); if (positions != null) { Element interval = getFirstNode(positions, "Interval"); if (interval != null) { Element incrementNode = getFirstNode(interval, "Increment"); if (incrementNode != null) { String increment = incrementNode.getTextContent(); Element sNode = getFirstNode(dimensions, "S"); if (sNode != null) { NodeList scenes = sNode.getElementsByTagName("Scene"); Element detectorSettings = getFirstNode(channel, "DetectorSettings"); Element scanInfo = getFirstNode(channel, "LaserScanInfo");
Element cross = (Element) crosses.item(s); Element geometry = getFirstNode(cross, "Geometry"); Element textElements = getFirstNode(cross, "TextElements"); Element attributes = getFirstNode(cross, "Attributes"); Element ellipse = (Element) ellipses.item(s); Element geometry = getFirstNode(ellipse, "Geometry"); Element textElements = getFirstNode(ellipse, "TextElements"); Element attributes = getFirstNode(ellipse, "Attributes");
Element cross = (Element) crosses.item(s); Element geometry = getFirstNode(cross, "Geometry"); Element textElements = getFirstNode(cross, "TextElements"); Element attributes = getFirstNode(cross, "Attributes"); Element ellipse = (Element) ellipses.item(s); Element geometry = getFirstNode(ellipse, "Geometry"); Element textElements = getFirstNode(ellipse, "TextElements"); Element attributes = getFirstNode(ellipse, "Attributes");