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.ImageMetadataReader getFallback()
    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 populate ImageMetadata.
    org.anchoranalysis.image.core.stack.ImageMetadata openFile​(Path path, org.anchoranalysis.image.io.bean.stack.reader.StackReader defaultStackReader, org.anchoranalysis.core.time.OperationContext context)  
    void setFallback​(org.anchoranalysis.image.io.bean.stack.metadata.reader.ImageMetadataReader fallback)
    Fallback to use if EXIF information is non-existing or absent.
    void setFormats​(List<HeaderFormat> formats)
    The formats whose headers will be searched, to find sufficient metadata to populate ImageMetadata.

    Methods inherited from class org.anchoranalysis.bean.AnchorBean

    checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

  • 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:
      openFile in class org.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

      public List<HeaderFormat> getFormats()
      The formats whose headers will be searched, to find sufficient metadata to populate ImageMetadata.
    • setFormats

      public void setFormats​(List<HeaderFormat> formats)
      The formats whose headers will be searched, to find sufficient metadata to populate ImageMetadata.