Package fr.igred.omero.roi
Class PointWrapper
- java.lang.Object
-
- fr.igred.omero.GenericObjectWrapper<T>
-
- fr.igred.omero.roi.GenericShapeWrapper<PointData>
-
- fr.igred.omero.roi.PointWrapper
-
public class PointWrapper extends GenericShapeWrapper<PointData>
-
-
Field Summary
-
Fields inherited from class fr.igred.omero.GenericObjectWrapper
data
-
-
Constructor Summary
Constructors Constructor Description PointWrapper()
Constructor of the PointWrapper class using a new empty PointData.PointWrapper(double x, double y)
Constructor of the PointWrapper class using a new empty ShapeData.PointWrapper(PointData shape)
Constructor of the PointWrapper class using a PointData.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double[]
getCoordinates()
Gets the coordinates of the PointData shape.String
getText()
Gets the text on the ShapeData.double
getX()
Returns the x-coordinate of the shape.double
getY()
Returns the y coordinate of the shape.void
setCoordinates(double[] coordinates)
Sets the coordinates of the PointData shape.void
setCoordinates(double x, double y)
Sets the coordinates the PointData shape.void
setText(String text)
Sets the text on the ShapeData.void
setX(double x)
Sets the x-coordinate of the shape.void
setY(double y)
Sets the y-coordinate of the shape.Shape
toAWTShape()
Converts the shape to anShape
.Roi
toImageJ()
Converts shape to ImageJ ROI.-
Methods inherited from class fr.igred.omero.roi.GenericShapeWrapper
asShapeData, copy, createTransformedAWTShape, getBoundingBox, getC, getFontSize, getStroke, getT, getZ, setC, setCZT, setFontSize, setStroke, setT, setTransform, setTransform, setZ, toAWTTransform
-
Methods inherited from class fr.igred.omero.GenericObjectWrapper
canAnnotate, canChgrp, canChown, canDelete, canEdit, canLink, delete, distinct, getCreated, getGroupId, getId, getOwner, saveAndUpdate, toString, wrap, wrap
-
-
-
-
Constructor Detail
-
PointWrapper
public PointWrapper(PointData shape)
Constructor of the PointWrapper class using a PointData.- Parameters:
shape
- the shape
-
PointWrapper
public PointWrapper()
Constructor of the PointWrapper class using a new empty PointData.
-
PointWrapper
public PointWrapper(double x, double y)
Constructor of the PointWrapper class using a new empty ShapeData.- Parameters:
x
- x-coordinate of the shape.y
- y-coordinate of the shape.
-
-
Method Detail
-
getText
public String getText()
Gets the text on the ShapeData.- Specified by:
getText
in classGenericShapeWrapper<PointData>
- Returns:
- the text
-
setText
public void setText(String text)
Sets the text on the ShapeData.- Specified by:
setText
in classGenericShapeWrapper<PointData>
- Parameters:
text
- the text
-
toAWTShape
public Shape toAWTShape()
Converts the shape to anShape
.- Specified by:
toAWTShape
in classGenericShapeWrapper<PointData>
- Returns:
- The converted AWT Shape.
-
getX
public double getX()
Returns the x-coordinate of the shape.- Returns:
- See above.
-
setX
public void setX(double x)
Sets the x-coordinate of the shape.- Parameters:
x
- See above.
-
getY
public double getY()
Returns the y coordinate of the shape.- Returns:
- See above.
-
setY
public void setY(double y)
Sets the y-coordinate of the shape.- Parameters:
y
- See above.
-
setCoordinates
public void setCoordinates(double x, double y)
Sets the coordinates the PointData shape.- Parameters:
x
- x-coordinate of the PointData shape.y
- y-coordinate of the PointData shape.
-
getCoordinates
public double[] getCoordinates()
Gets the coordinates of the PointData shape.- Returns:
- Array of coordinates containing {X,Y}.
-
setCoordinates
public void setCoordinates(double[] coordinates)
Sets the coordinates of the PointData shape.- Parameters:
coordinates
- Array of coordinates containing {X,Y}.
-
toImageJ
public Roi toImageJ()
Converts shape to ImageJ ROI.- Overrides:
toImageJ
in classGenericShapeWrapper<PointData>
- Returns:
- An ImageJ ROI.
-
-