Class RotateImageToMatchEXIFOrientation
Object
AnchorBean<StackReader>
StackReader
StackReaderOrientationCorrection
RotateImageToMatchEXIFOrientation
Rotates an image to match any EXIF orientation information, if it exists.
The EXIF orientation is read separately from the underlying StackReader.
If the metadata cannot be successfully read, no rotation occurs, and currently no error message is logged.
- Author:
- Owen Feehan
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a newRotateImageToMatchEXIFOrientationinstance. -
Method Summary
Modifier and TypeMethodDescriptionReads the image that is subsequently flattened.openFile(Path path, ExecutionTimeRecorder executionTimeRecorder) Opens a file containing one or more images.openFile(Path path, CalculateOrientationChange orientationCorrection, ExecutionTimeRecorder executionTimeRecorder) Opens a file containing one or more images but does not read an image.voidReads the image that is subsequently flattened.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
-
RotateImageToMatchEXIFOrientation
public RotateImageToMatchEXIFOrientation() -
RotateImageToMatchEXIFOrientation
Creates a newRotateImageToMatchEXIFOrientationinstance.- Parameters:
reader- Reads the image that is subsequently flattened.
-
-
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.
-
openFile
public OpenedImageFile openFile(Path path, CalculateOrientationChange orientationCorrection, ExecutionTimeRecorder executionTimeRecorder) throws ImageIOException Description copied from class:StackReaderOrientationCorrectionOpens a file containing one or more images but does not read an image.- Specified by:
openFilein classStackReaderOrientationCorrection- Parameters:
path- where the file is located.orientationCorrection- calculates any needed correction applied to the orientation as the image is loaded.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.
-
getReader
Reads the image that is subsequently flattened. -
setReader
Reads the image that is subsequently flattened.
-