final Transformer transformer = TransformerFactory.newInstance().newTransformer();
transformer.transform(domSource, new StreamResult(output));
DOMResult domResult = new DOMResult();
transformer.transform(new StreamSource(new StringReader(output.toString())), domResult);
Node documentOut = domResult.getNode();
OMEModel model = new OMEModelImpl();
omeOut = new OME((Element)(documentOut.getFirstChild()), model);
model.resolveReferences();
}
TypedAxis [] axes = new TypedAxis[stackIn.numDimensions()];
stackIn.axes(axes);
ImagePlaneDetailsStack stackOut = new ImagePlaneDetailsStack(axes);
stackOut.loadFromOME(omeOut, name);