Class TranslationOffset
- java.lang.Object
-
- science.aist.imaging.api.domain.offset.TranslationOffset
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
RotationOffset
,TranslationOffsetInMM
public class TranslationOffset extends Object implements Serializable
Class for representing translation offset of two images in pixels.
Also contains a failure-value representing the correctness of the result.
- Failure < 0 means that correctness of the offsets was not determined
- Failure = 0 means offset is accurate.
- Failure > 0 means offset is not total accurate (the higher this value, the less it is sure that the offset is correct).
- Since:
- 1.0
- Author:
- Christoph Praschl
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TranslationOffset()
TranslationOffset(double xOffset, double yOffset)
TranslationOffset(double xOffset, double yOffset, double failure)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
equalDoubles(double a, double b)
Method which compares to doublesprotected boolean
equalToMaxValue(double d)
Method which compares value with Double.MAX_VALUEprotected boolean
equalToMinValue(double d)
Method which compares value with Double.MIN_VALUEdouble
getFailure()
Getter for failure-value which represents the correctness of the offset resultdouble
getXOffset()
Getter pixel offset on x-axisdouble
getYOffset()
Getter pixel offset on y-axisvoid
setFailure(double failure)
Setter for failure-value which represents the correctness of the offset resultvoid
setXOffset(double xOffset)
Setter for of x-axis offsetvoid
setYOffset(double yOffset)
Setter for of y-axis offsetString
toString()
toString Overload for TranslationOffset class Printing the TranslationOffset with rounded values (6 digits after decimal point) Displays ? for not set values.
-
-
-
Field Detail
-
EPSILON
protected static final double EPSILON
- See Also:
- Constant Field Values
-
failure
protected double failure
-
xOffset
protected double xOffset
-
yOffset
protected double yOffset
-
-
Method Detail
-
getFailure
public double getFailure()
Getter for failure-value which represents the correctness of the offset result- Returns:
- failure
-
setFailure
public void setFailure(double failure)
Setter for failure-value which represents the correctness of the offset result- Parameters:
failure
- Value which should be set
-
getXOffset
public double getXOffset()
Getter pixel offset on x-axis- Returns:
- Returns the offset on x-axis
-
setXOffset
public void setXOffset(double xOffset)
Setter for of x-axis offset- Parameters:
xOffset
- Value which should be set
-
getYOffset
public double getYOffset()
Getter pixel offset on y-axis- Returns:
- Returns the offset on y-axis
-
setYOffset
public void setYOffset(double yOffset)
Setter for of y-axis offset- Parameters:
yOffset
- Value which should be set
-
equalDoubles
protected boolean equalDoubles(double a, double b)
Method which compares to doubles- Parameters:
a
- First double to compare with second doubleb
- Second double which should be compared- Returns:
- True if a == b; else false
-
equalToMaxValue
protected boolean equalToMaxValue(double d)
Method which compares value with Double.MAX_VALUE- Parameters:
d
- double which should be compared- Returns:
- Returns true if d is equal to Double.MAX_Value
-
equalToMinValue
protected boolean equalToMinValue(double d)
Method which compares value with Double.MIN_VALUE- Parameters:
d
- double which should be compared- Returns:
- Returns true if d is equal to Double.MIN_VALUE
-
toString
public String toString()
toString Overload for TranslationOffset class Printing the TranslationOffset with rounded values (6 digits after decimal point) Displays ? for not set values. Excludes offset areas if no value in area is set
-
-