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 newRotateImageToMatchEXIFOrientation
instance. -
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.void
Reads the image that is subsequently flattened.Methods inherited from class org.anchoranalysis.image.io.bean.stack.reader.StackReader
readStack
Methods 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 newRotateImageToMatchEXIFOrientation
instance.- 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: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 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:StackReaderOrientationCorrection
Opens a file containing one or more images but does not read an image.- Specified by:
openFile
in 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.
-