Class ImageSizePrereader

Object
org.anchoranalysis.plugin.image.task.stack.ImageSizePrereader

public class ImageSizePrereader
extends Object
Reads the size of each image initially, before normal (parallel) task execution.

It first attempts to do this through a imageMetadataReader as often this is much faster than opening the stack with StackReader.

Author:
Owen Feehan
  • Constructor Summary

    Constructors 
    Constructor Description
    ImageSizePrereader​(org.anchoranalysis.image.io.bean.stack.metadata.reader.ImageMetadataReader imageMetadataReader, org.anchoranalysis.image.io.bean.stack.reader.StackReader stackReader, org.anchoranalysis.core.time.OperationContext context)  
  • Method Summary

    Modifier and Type Method Description
    List<SizeMapping> imageSizesFor​(List<org.anchoranalysis.image.io.stack.input.StackSequenceInput> inputs)
    Extract the image-size for each StackSequenceInput.

    Methods inherited from class java.lang.Object

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

    • ImageSizePrereader

      public ImageSizePrereader​(org.anchoranalysis.image.io.bean.stack.metadata.reader.ImageMetadataReader imageMetadataReader, org.anchoranalysis.image.io.bean.stack.reader.StackReader stackReader, org.anchoranalysis.core.time.OperationContext context)
  • Method Details

    • imageSizesFor

      public List<SizeMapping> imageSizesFor​(List<org.anchoranalysis.image.io.stack.input.StackSequenceInput> inputs)
      Extract the image-size for each StackSequenceInput.
      Parameters:
      inputs - the input images.
      Returns:
      a newly created list of the image-sizes for each input. This may not be the size size as paths, as if an error occurs, the element is dropped.