use of loci.formats.in.PrairieMetadata in project bioformats by openmicroscopy.
the class PrairieMetadataTest method testParseNewXML.
@Test
public void testParseNewXML() throws ParserConfigurationException, SAXException, IOException {
final Document xml = XMLTools.parseDOM(NEW_XML);
final PrairieMetadata meta = new PrairieMetadata(xml, null, null);
final ValueTable positionCurrent = (ValueTable) meta.getSequence(1).getFrame(1).getValue("positionCurrent");
final ValueTable xAxis = (ValueTable) positionCurrent.get("XAxis");
assertEquals("-621.412879412341", xAxis.value());
final ValueTable yAxis = (ValueTable) positionCurrent.get("YAxis");
assertEquals("255.652372573538", yAxis.value());
final ValueTable zAxis = (ValueTable) positionCurrent.get("ZAxis");
assertEquals("28.15", zAxis.get(0).value());
assertEquals("111.23", zAxis.get(1).value());
}
use of loci.formats.in.PrairieMetadata in project bioformats by openmicroscopy.
the class PrairieMetadataTest method testParseOldXML.
@Test
public void testParseOldXML() throws ParserConfigurationException, SAXException, IOException {
final Document xml = XMLTools.parseDOM(OLD_XML);
final PrairieMetadata meta = new PrairieMetadata(xml, null, null);
final Value positionCurrent = meta.getSequence(1).getFrame(1).getValue("positionCurrent");
final Value xAxis = positionCurrent.get("XAxis");
assertEquals("0.95", xAxis.value());
final Value yAxis = positionCurrent.get("YAxis");
assertEquals("-4.45", yAxis.value());
final ValueTable zAxis = (ValueTable) positionCurrent.get("ZAxis");
assertEquals("-9", zAxis.get(0).value());
assertEquals("62.45", zAxis.get(1).value());
}
Aggregations