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 SummaryConstructors Constructor Description TranslationOffset()TranslationOffset(double xOffset, double yOffset)TranslationOffset(double xOffset, double yOffset, double failure)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanequalDoubles(double a, double b)Method which compares to doublesprotected booleanequalToMaxValue(double d)Method which compares value with Double.MAX_VALUEprotected booleanequalToMinValue(double d)Method which compares value with Double.MIN_VALUEdoublegetFailure()Getter for failure-value which represents the correctness of the offset resultdoublegetXOffset()Getter pixel offset on x-axisdoublegetYOffset()Getter pixel offset on y-axisvoidsetFailure(double failure)Setter for failure-value which represents the correctness of the offset resultvoidsetXOffset(double xOffset)Setter for of x-axis offsetvoidsetYOffset(double yOffset)Setter for of y-axis offsetStringtoString()toString Overload for TranslationOffset class Printing the TranslationOffset with rounded values (6 digits after decimal point) Displays ? for not set values.
 
- 
- 
- 
Field Detail- 
EPSILONprotected static final double EPSILON - See Also:
- Constant Field Values
 
 - 
failureprotected double failure 
 - 
xOffsetprotected double xOffset 
 - 
yOffsetprotected double yOffset 
 
- 
 - 
Method Detail- 
getFailurepublic double getFailure() Getter for failure-value which represents the correctness of the offset result- Returns:
- failure
 
 - 
setFailurepublic void setFailure(double failure) Setter for failure-value which represents the correctness of the offset result- Parameters:
- failure- Value which should be set
 
 - 
getXOffsetpublic double getXOffset() Getter pixel offset on x-axis- Returns:
- Returns the offset on x-axis
 
 - 
setXOffsetpublic void setXOffset(double xOffset) Setter for of x-axis offset- Parameters:
- xOffset- Value which should be set
 
 - 
getYOffsetpublic double getYOffset() Getter pixel offset on y-axis- Returns:
- Returns the offset on y-axis
 
 - 
setYOffsetpublic void setYOffset(double yOffset) Setter for of y-axis offset- Parameters:
- yOffset- Value which should be set
 
 - 
equalDoublesprotected boolean equalDoubles(double a, double b)Method which compares to doubles- Parameters:
- a- First double to compare with second double
- b- Second double which should be compared
- Returns:
- True if a == b; else false
 
 - 
equalToMaxValueprotected 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
 
 - 
equalToMinValueprotected 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
 
 - 
toStringpublic 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
 
- 
 
-