Package org.anchoranalysis.plugin.io.xml
Class ResolutionAsXML
Object
ResolutionAsXML
Reads and writes a metadata XML file specifying the image-resolution.
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>
- Author:
- Owen Feehan
-
Method Summary
Modifier and TypeMethodDescriptionstatic ResolutionreadResolutionXml(File file) Retrieves resolution from a XML file previously written bywriteResolutionXML(Resolution, Path).static voidwriteResolutionXML(Resolution resolution, Path path) Writes a XML metadata file describing the image-resolution.
-
Method Details
-
readResolutionXml
Retrieves resolution from a XML file previously written bywriteResolutionXML(Resolution, Path).- Parameters:
file- the file to open- Returns:
- a resolution read from the file
- Throws:
ImageIOException- if file I/O or parsing errors occur.
-
writeResolutionXML
Writes a XML metadata file describing the image-resolution.- Parameters:
resolution- the resolution to writepath- path to write to- Throws:
ImageIOException- if any file I/O or parser errors occur
-