Class InferFromHeader
Object
org.anchoranalysis.bean.AnchorBean<org.anchoranalysis.image.io.bean.stack.metadata.reader.ImageMetadataReader>
org.anchoranalysis.image.io.bean.stack.metadata.reader.ImageMetadataReader
org.anchoranalysis.plugin.io.bean.metadata.reader.InferFromHeader
public class InferFromHeader
extends org.anchoranalysis.image.io.bean.stack.metadata.reader.ImageMetadataReader
Tries to construct the
ImageMetadata from EXIF and other metadata, if available, or
otherwise falls back to another reader.
It supports a limited number of file-types, as identified by an extension in the path. By default, it supports:
- JPEG (.jpg or .jpeg)
- PNG (.png)
- Author:
- Owen Feehan
-
Constructor Summary
Constructors Constructor Description InferFromHeader()InferFromHeader(org.anchoranalysis.image.io.bean.stack.metadata.reader.ImageMetadataReader fallback, List<HeaderFormat> formats) -
Method Summary
Modifier and Type Method Description org.anchoranalysis.image.io.bean.stack.metadata.reader.ImageMetadataReadergetFallback()Fallback to use if EXIF information is non-existing or absent.List<HeaderFormat>getFormats()The formats whose headers will be searched, to find sufficient metadata to populateImageMetadata.org.anchoranalysis.image.core.stack.ImageMetadataopenFile(Path path, org.anchoranalysis.image.io.bean.stack.reader.StackReader defaultStackReader, org.anchoranalysis.core.time.OperationContext context)voidsetFallback(org.anchoranalysis.image.io.bean.stack.metadata.reader.ImageMetadataReader fallback)Fallback to use if EXIF information is non-existing or absent.voidsetFormats(List<HeaderFormat> formats)The formats whose headers will be searched, to find sufficient metadata to populateImageMetadata.
-
Constructor Details
-
InferFromHeader
public InferFromHeader() -
InferFromHeader
public InferFromHeader(org.anchoranalysis.image.io.bean.stack.metadata.reader.ImageMetadataReader fallback, List<HeaderFormat> formats)
-
-
Method Details
-
openFile
public org.anchoranalysis.image.core.stack.ImageMetadata openFile(Path path, org.anchoranalysis.image.io.bean.stack.reader.StackReader defaultStackReader, org.anchoranalysis.core.time.OperationContext context) throws org.anchoranalysis.image.io.ImageIOException- Specified by:
openFilein classorg.anchoranalysis.image.io.bean.stack.metadata.reader.ImageMetadataReader- Throws:
org.anchoranalysis.image.io.ImageIOException
-
getFallback
public org.anchoranalysis.image.io.bean.stack.metadata.reader.ImageMetadataReader getFallback()Fallback to use if EXIF information is non-existing or absent. -
setFallback
public void setFallback(org.anchoranalysis.image.io.bean.stack.metadata.reader.ImageMetadataReader fallback)Fallback to use if EXIF information is non-existing or absent. -
getFormats
The formats whose headers will be searched, to find sufficient metadata to populateImageMetadata. -
setFormats
The formats whose headers will be searched, to find sufficient metadata to populateImageMetadata.
-