public class ResolutionAsXml extends Object
If a particular dimension is missing from the XML file, 1 is supplied as a replacement value.
The XML file specifies the physical pixel sizes (in meters) of an individual voxel, as follows:
<metadata><resolution><width>0.12</width><height>0.12</height><depth>0.12</depth></resolution></metadata>
Modifier and Type | Method and Description |
---|---|
static Resolution |
readResolutionXml(File file)
Retrieves resolution from a XML file previously written by
writeResolutionXml(Resolution, Path) . |
static void |
writeResolutionXml(Resolution resolution,
Path path)
Writes a XML metadata file describing the image-resolution.
|
public static Resolution readResolutionXml(File file) throws ImageIOException
writeResolutionXml(Resolution, Path)
.file
- the file to openImageIOException
- if file I/O or parsing errors occur.public static void writeResolutionXml(Resolution resolution, Path path) throws ImageIOException
path
- path to write toresolution
- the resolution to writeImageIOException
- if any file I/O or parser errors occurCopyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.