Class RejectIfConditionXYResolution
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionA predicate defined by the relationship of the XY-resolution to a constant threshold.Reads an image before a resolution is imposed.openFile(Path path, ExecutionTimeRecorder executionTimeRecorder) Opens a file containing one or more images.voidsetRelation(RelationToThreshold relation) A predicate defined by the relationship of the XY-resolution to a constant threshold.voidsetStackReader(StackReader stackReader) Reads an image before a resolution is imposed.Methods inherited from class org.anchoranalysis.image.io.bean.stack.reader.StackReader
readStackMethods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
RejectIfConditionXYResolution
public RejectIfConditionXYResolution()
-
-
Method Details
-
openFile
public OpenedImageFile openFile(Path path, ExecutionTimeRecorder executionTimeRecorder) throws ImageIOException Description copied from class:StackReaderOpens 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:
openFilein classStackReader- 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
Reads an image before a resolution is imposed. -
setStackReader
Reads an image before a resolution is imposed. -
getRelation
A predicate defined by the relationship of the XY-resolution to a constant threshold.
-