Class OrientationReader
Object
OrientationReader
Reads the image-orientation from EXIF metadata, if specified in an image-file.
- Author:
- Owen Feehan
-
Method Summary
Modifier and TypeMethodDescriptionstatic Optional
<OrientationChange> determineOrientationCorrection
(com.drew.metadata.Metadata metadata) Determines the needed correction to orientation for the voxels if an EXIF orientation tag is present.static Optional
<OrientationChange> Determines the needed correction to orientation for the voxels if an EXIF orientation tag is present.
-
Method Details
-
determineOrientationCorrection
public static Optional<OrientationChange> determineOrientationCorrection(Path path) throws ImageIOException Determines the needed correction to orientation for the voxels if an EXIF orientation tag is present.- Parameters:
path
- the path to the image, which possibly has EXIF metadata.- Returns:
- the needed correction, if it can be determined, or
Optional.empty()
if no EXIF orientation tag is present. - Throws:
ImageIOException
- if the EXIF orientation tag is present, but unsupported.
-
determineOrientationCorrection
public static Optional<OrientationChange> determineOrientationCorrection(com.drew.metadata.Metadata metadata) throws ImageIOException Determines the needed correction to orientation for the voxels if an EXIF orientation tag is present.- Parameters:
metadata
- the metadata for the image.- Returns:
- the needed correction, if it can be determined, or
Optional.empty()
if no EXIF orientation tag is present. - Throws:
ImageIOException
- if the EXIF orientation tag is present, but unsupported.
-