Class RejectIfConditionXYResolution

Object
AnchorBean<StackReader>
StackReader
RejectIfConditionXYResolution

public class RejectIfConditionXYResolution extends StackReader
If the XY resolution of an opened-image meets a certain condition then the resolution is scaled by a factor.

This is useful for correcting situations where there has been a unit mixup by the StackReader.

It assumes the X and Y resolution are equal. Throws an error otherwise.

If no image-resolution is known, an error will be thrown.

Author:
Owen Feehan
  • Constructor Details

    • RejectIfConditionXYResolution

      public RejectIfConditionXYResolution()
  • Method Details

    • openFile

      public OpenedImageFile openFile(Path path, ExecutionTimeRecorder executionTimeRecorder) throws ImageIOException
      Description copied from class: StackReader
      Opens a file containing one or more images.

      This method should run as computationally quicky as possible. Image voxels should not yet be read.

      Specified by:
      openFile in class StackReader
      Parameters:
      path - where the file is located.
      executionTimeRecorder - records the execution-times of certain operations.
      Returns:
      an interface to the opened file that should be closed when no longer in use.
      Throws:
      ImageIOException - if the file cannot be read.
    • getStackReader

      public StackReader getStackReader()
      Reads an image before a resolution is imposed.
    • setStackReader

      public void setStackReader(StackReader stackReader)
      Reads an image before a resolution is imposed.
    • getRelation

      public RelationToThreshold getRelation()
      A predicate defined by the relationship of the XY-resolution to a constant threshold.
    • setRelation

      public void setRelation(RelationToThreshold relation)
      A predicate defined by the relationship of the XY-resolution to a constant threshold.