Class TranslationOffsetInMM
- java.lang.Object
-
- science.aist.imaging.api.domain.offset.TranslationOffset
-
- science.aist.imaging.api.domain.offset.TranslationOffsetInMM
-
- All Implemented Interfaces:
Serializable
public class TranslationOffsetInMM extends TranslationOffset
Description: Class for representing translation offset of two images in pixels and millimeters.
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
-
-
Field Summary
Fields Modifier and Type Field Description protected double
xOffsetInMM
protected double
yOffsetInMM
-
Fields inherited from class science.aist.imaging.api.domain.offset.TranslationOffset
EPSILON, failure, xOffset, yOffset
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
TranslationOffsetInMM()
TranslationOffsetInMM(double xOffset, double yOffset, double xOffsetInMM, double yOffsetInMM)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TranslationOffsetInMM
create(TranslationOffset offset, double ratio)
Method for creating a TranslationOffsetInMM Objectstatic TranslationOffsetInMM
create(TranslationOffset offset, double dimensionInPixel, double dimensionInMM)
Method for creating a TranslationOffsetInMM Object (Dimension parameters must represent both the height or both the width!)double
getxOffsetInMM()
Getter for mm offset on x-axisdouble
getyOffsetInMM()
Getter for mm offset on y-axisvoid
setXOffset(double xOffset)
Setter for of x-axis offset (Also updates xOffsetInMM!)void
setxOffsetInMM(double xOffsetInMM)
Setter for of x-axis offset (Also updates xOffset!)void
setYOffset(double yOffset)
Setter for of y-axis offset (Also updates yOffsetInMM!)void
setyOffsetInMM(double yOffsetInMM)
Setter for of y-axis offset (Also updates yOffset!)String
toString()
toString Overload for TranslationOffset class Printing the TranslationOffset with rounded values (6 digits after decimal point) Displays ? for not set values.-
Methods inherited from class science.aist.imaging.api.domain.offset.TranslationOffset
equalDoubles, equalToMaxValue, equalToMinValue, getFailure, getXOffset, getYOffset, setFailure
-
-
-
-
Method Detail
-
create
public static TranslationOffsetInMM create(TranslationOffset offset, double ratio)
Method for creating a TranslationOffsetInMM Object- Parameters:
offset
- The pixel based Offsetratio
- The ratio between width or height in pixels to width in millimeters- Returns:
- Returns new TranslationOffsetInMM object.
-
create
public static TranslationOffsetInMM create(TranslationOffset offset, double dimensionInPixel, double dimensionInMM)
Method for creating a TranslationOffsetInMM Object (Dimension parameters must represent both the height or both the width!)- Parameters:
offset
- The pixel based OffsetdimensionInPixel
- The height/width in pixelsdimensionInMM
- The height/width in millimeters- Returns:
- Returns new TranslationOffsetInMM object.
-
setXOffset
public void setXOffset(double xOffset)
Setter for of x-axis offset (Also updates xOffsetInMM!)- Overrides:
setXOffset
in classTranslationOffset
- Parameters:
xOffset
- Value which should be set
-
setYOffset
public void setYOffset(double yOffset)
Setter for of y-axis offset (Also updates yOffsetInMM!)- Overrides:
setYOffset
in classTranslationOffset
- Parameters:
yOffset
- Value which should be set
-
getxOffsetInMM
public double getxOffsetInMM()
Getter for mm offset on x-axis- Returns:
- Returns the offset on x-axis
-
setxOffsetInMM
public void setxOffsetInMM(double xOffsetInMM)
Setter for of x-axis offset (Also updates xOffset!)- Parameters:
xOffsetInMM
- Value which should be set
-
getyOffsetInMM
public double getyOffsetInMM()
Getter for mm offset on y-axis- Returns:
- Returns the offset on y-axis
-
setyOffsetInMM
public void setyOffsetInMM(double yOffsetInMM)
Setter for of y-axis offset (Also updates yOffset!)- Parameters:
yOffsetInMM
- Value which should be set
-
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- Overrides:
toString
in classTranslationOffset
- Returns:
- the string representation of offset
-
-