Package omero.gateway.model
Class ShapeData
- java.lang.Object
-
- omero.gateway.model.DataObject
-
- omero.gateway.model.ShapeData
-
- Direct Known Subclasses:
EllipseData,LineData,MaskData,PointData,PolygonData,PolylineData,RectangleData,TextData
public abstract class ShapeData extends DataObject
Hosts a shape.- Since:
- 3.0-Beta4
-
-
Field Summary
Fields Modifier and Type Field Description static booleanREADONLY_FLAGFlag stating that the ROI is read only.protected ShapeSettingsDatasettingsThe representation of the shape.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringfromPoints(java.lang.String type)Parses out the type from the points string.intgetC()Returns the channel.ROICoordinategetROICoordinate()Returns the ROICoordinate for the ShapeData.ShapeSettingsDatagetShapeSettings()Returns the settings associated to the shape.intgetT()Returns the time-point.omero.model.AffineTransformgetTransform()Returns the transformation.intgetZ()Returns the z-section.booleanisClientObject()Returnstrueif the object one that has been created client side.booleanisReadOnly()Returnstrueif the object a read-only object,falseotherwise.protected java.util.List<java.lang.Integer>parsePointsToIntegerList(java.lang.String str)Parses the points list from the string to a list of integer objects.protected java.util.List<java.awt.geom.Point2D.Double>parsePointsToPoint2DList(java.lang.String str)Parses the points list from the string to a list of point2d objects.voidsetC(int c)Sets the channel.voidsetClientObject(boolean clientObject)Sets totrueif the object one that has been created client side,falseotherwise.voidsetDirty(boolean dirty)Sets totrueif the figure been changed from the server side version,falseotherwise.voidsetReadOnly(boolean readOnly)Sets totrueif the object is a read-only object,falseotherwise.voidsetROICoordinate(ROICoordinate coord)Sets the ROICoordinate for the ShapeData.protected voidsetShapeSettings(omero.model.Shape shape)Set the settings associated to the shape.voidsetT(int t)Sets the time-point.voidsetTransform(omero.model.AffineTransform transform)Sets the Affine transform of the shape.voidsetZ(int z)Sets the z-section.protected static java.lang.StringtoNumber(double number)Returns a double array as a number attribute value.protected static java.lang.StringtoPoints(java.awt.geom.Point2D.Double[] points)Returns a Point2D.Double array as a Points attribute value.-
Methods inherited from class omero.gateway.model.DataObject
asAnnotation, asChannel, asDataset, asExperimenter, asFolder, asGroup, asIAnnotated, asImage, asIObject, asPixels, asPlaneInfo, asPlate, asPojo, asPojos, asPojos, asProject, asScreen, asWell, asWellSample, canAnnotate, canChgrp, canChown, canDelete, canEdit, canLink, getCreated, getDetails, getGroupId, getId, getOwner, getPermissions, getUpdated, getVersion, isDirty, isLoaded, nullDetails, nullSafe, nullSafe, nullSafe, nullSafe, nullSafe, nullSafe, nullSafe, nullSafe, setId, setValue, setVersion, timeOfEvent, toString
-
-
-
-
Field Detail
-
READONLY_FLAG
public static boolean READONLY_FLAG
Flag stating that the ROI is read only.
-
settings
protected ShapeSettingsData settings
The representation of the shape.
-
-
Constructor Detail
-
ShapeData
protected ShapeData(omero.model.Shape shape, boolean clientObject)Creates a new instance.- Parameters:
shape- The shape to host.clientObject- Passtrueif it is a client object,falseotherwise.
-
ShapeData
protected ShapeData(omero.model.Shape shape)
Creates a new instance.- Parameters:
shape- The shape to host.
-
-
Method Detail
-
fromPoints
protected java.lang.String fromPoints(java.lang.String type)
Parses out the type from the points string.- Parameters:
type- The value in the list to parse.- Returns:
- See above.
-
parsePointsToPoint2DList
protected java.util.List<java.awt.geom.Point2D.Double> parsePointsToPoint2DList(java.lang.String str)
Parses the points list from the string to a list of point2d objects.- Parameters:
str- the string to convert to points.
-
parsePointsToIntegerList
protected java.util.List<java.lang.Integer> parsePointsToIntegerList(java.lang.String str)
Parses the points list from the string to a list of integer objects.- Parameters:
str- the string to convert to points.
-
toPoints
protected static java.lang.String toPoints(java.awt.geom.Point2D.Double[] points)
Returns a Point2D.Double array as a Points attribute value. as specified in http://www.w3.org/TR/SVGMobile12/shapes.html#PointsBNF
-
toNumber
protected static java.lang.String toNumber(double number)
Returns a double array as a number attribute value.
-
getShapeSettings
public ShapeSettingsData getShapeSettings()
Returns the settings associated to the shape.- Returns:
- See above.
-
setShapeSettings
protected void setShapeSettings(omero.model.Shape shape)
Set the settings associated to the shape.- Parameters:
shape- See above.
-
isReadOnly
public boolean isReadOnly()
Returnstrueif the object a read-only object,falseotherwise.- Returns:
- See above.
-
setReadOnly
public void setReadOnly(boolean readOnly)
Sets totrueif the object is a read-only object,falseotherwise.- Parameters:
readOnly- The value to set.
-
isClientObject
public boolean isClientObject()
Returnstrueif the object one that has been created client side. If so the id will benull, or invalid.- Returns:
- See above.
-
setClientObject
public void setClientObject(boolean clientObject)
Sets totrueif the object one that has been created client side,falseotherwise.- Parameters:
clientObject- The value to set..
-
getZ
public int getZ()
Returns the z-section. -1 if the shape applies to all z-sections of the image.- Returns:
- See above.
-
setZ
public void setZ(int z)
Sets the z-section.- Parameters:
z- The value to set. Pass -1 to remove z value, i. e. shape applies to all z-sections of the image.
-
getC
public int getC()
Returns the channel. -1 if the shape applies to all channels of the image.- Returns:
- See above.
-
setC
public void setC(int c)
Sets the channel.- Parameters:
c- The value to set. Pass -1 to remove c value, i. e. shape applies to all channels of the image.
-
getT
public int getT()
Returns the time-point. -1 if the shape applies to all time-points of the image.- Returns:
- See above.
-
setT
public void setT(int t)
Sets the time-point.- Parameters:
t- The value to set. Pass -1 to remove t value, i. e. shape applies to all time-points of the image.
-
setROICoordinate
public void setROICoordinate(ROICoordinate coord)
Sets the ROICoordinate for the ShapeData.- Parameters:
coord- The value to set.
-
getROICoordinate
public ROICoordinate getROICoordinate()
Returns the ROICoordinate for the ShapeData.- Returns:
- See above.
-
getTransform
public omero.model.AffineTransform getTransform()
Returns the transformation.- Returns:
- See above.
-
setTransform
public void setTransform(omero.model.AffineTransform transform)
Sets the Affine transform of the shape.- Parameters:
transform- The transform to set.
-
setDirty
public void setDirty(boolean dirty)
Sets totrueif the figure been changed from the server side version,falseotherwise.- Overrides:
setDirtyin classDataObject- Parameters:
dirty- The value to set.
-
-