Enum Class OrientationChange
- All Implemented Interfaces:
Serializable
,Comparable<OrientationChange>
,Constable
Changes orientation of an image in the XY plane.
The corrections refer to what rotation should be applied to the natural XY byte ordering in an image file, to present in the orientation expected in the eventual image.
It is also possible for a mirroring to occur (X coordinates flipped in direction, but not in the Y dimension) for each respective orientation change.
- Author:
- Owen Feehan
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionNo change in orientation.No change in orientation, but mirroring across the X dimension.Pixels should appear 180 degrees rotated in the clockwise direction.Pixels should appear 180 degrees rotated in the clockwise direction, and then mirrored across the X-dimension.Pixels should appear 90 degrees rotated in the anti-clockwise direction.Pixels should appear 90 degrees rotated in the anticlockwise direction, and then mirrored across the X-dimension.Pixels should appear 90 degrees rotated in the clockwise direction.Pixels should appear 90 degrees rotated clockwise, and then mirrored across the X-dimension. -
Method Summary
Modifier and TypeMethodDescriptiondimensions
(Dimensions dimensions) ADimensions
that describes {code dimensions} after the orientation change.abstract Extent
AExtent
that describesextent
after the orientation change.abstract int
Like {#link determineOutputIndex(int,int,Extent)} but also accepts an index.abstract int
Determines the index in a output-array to put an element after applying the orientation-change.abstract Resolution
resolution
(Resolution resolution) AResolution
that describesresolution
after the orientation change.static OrientationChange
Returns the enum constant of this class with the specified name.static OrientationChange[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
KEEP_UNCHANGED
No change in orientation. -
MIRROR_WITHOUT_ROTATION
No change in orientation, but mirroring across the X dimension. -
ROTATE_90_ANTICLOCKWISE
Pixels should appear 90 degrees rotated in the anti-clockwise direction. -
ROTATE_90_ANTICLOCKWISE_MIRROR
Pixels should appear 90 degrees rotated in the anticlockwise direction, and then mirrored across the X-dimension. -
ROTATE_180
Pixels should appear 180 degrees rotated in the clockwise direction. -
ROTATE_180_MIRROR
Pixels should appear 180 degrees rotated in the clockwise direction, and then mirrored across the X-dimension. -
ROTATE_90_CLOCKWISE
Pixels should appear 90 degrees rotated in the clockwise direction.This is equivalent to rotating 270 degrees anti-clockwise.
-
ROTATE_90_CLOCKWISE_MIRROR
Pixels should appear 90 degrees rotated clockwise, and then mirrored across the X-dimension.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
index
Determines the index in a output-array to put an element after applying the orientation-change.- Parameters:
x
- intended output voxel position on the x-axis, before any orientation-change.y
- intended output voxel position on the y-axis, before any orientation-change.extent
- image-size, before any orientation-change.- Returns:
- the changed index.
-
index
Like {#link determineOutputIndex(int,int,Extent)} but also accepts an index.- Parameters:
existingIndex
- an index that is already correct, if no orientation-change is applied.x
- intended output voxel position on the x-axis, before any orientation-change.y
- intended output voxel position on the y-axis, before any orientation-change.extent
- image-size, before any orientation-change.- Returns:
- the changed index.
-
extent
AExtent
that describesextent
after the orientation change.- Parameters:
extent
- the unchanged size.- Returns:
- either a newly created
Extent
if it is changed, or elseextent
if no change is needed.
-
resolution
AResolution
that describesresolution
after the orientation change.- Parameters:
resolution
- the unchanged resolution.- Returns:
- either a newly created
Resolution
if it is changed, or elseresolution
if no change is needed.
-
dimensions
ADimensions
that describes {code dimensions} after the orientation change.- Parameters:
dimensions
- the unchanged dimensions.- Returns:
- either a newly created
Dimensions
if it is changed, or elsedimensions
if no change is needed.
-