Package fr.igred.omero.roi
Interface Shape
-
- All Superinterfaces:
Annotatable,RemoteObject
- All Known Implementing Classes:
EllipseWrapper,LineWrapper,MaskWrapper,PointWrapper,PolygonWrapper,PolylineWrapper,RectangleWrapper,ShapeWrapper,TextWrapper
public interface Shape extends Annotatable
Generic interface to handle Shape objects.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ShapeDataasDataObject()Returns a ShapeData corresponding to the handled object.default java.awt.ShapecreateTransformedAWTShape()Returns a newShapedefined by the geometry of the specified Shape after it has been transformed by the transform.RectanglegetBoundingBox()Returns a newRectanglecorresponding to the bounding box of the shape, once the relatedAffineTransformhas been applied.intgetC()Gets the channel.default java.lang.StringgetCZT()Returns the C,Z,T positions as a comma-delimited String.java.awt.ColorgetFill()Gets ShapeData fill color.doublegetFontSize()Gets ShapeData font size.java.awt.ColorgetStroke()Gets the ShapeData stroke color.intgetT()Sets the time-point.java.lang.StringgetText()Gets the text on the ShapeData.intgetZ()Gets the z-section.default <A extends AnnotationData>
voidlink(DataManager dm, A annotation)Attach anAnnotationDatato this object.voidsetC(int c)Sets the channel.default voidsetCZT(int c, int z, int t)Sets the channel, z-section and time-point at once.voidsetFill(java.awt.Color fillColour)Sets the ShapeData fill color.voidsetFontSize(double value)Sets ShapeData font size.voidsetStroke(java.awt.Color strokeColour)Sets ShapeData stroke color.voidsetT(int t)Sets the time-point.voidsetText(java.lang.String text)Sets the text on the ShapeData.voidsetTransform(double a00, double a10, double a01, double a11, double a02, double a12)Sets the transform to the matrix specified by the 6 double precision values.default voidsetTransform(java.awt.geom.AffineTransform transform)Sets the transform from aAffineTransform.voidsetZ(int z)Sets the z-section.java.awt.ShapetoAWTShape()Converts the shape to anShape.java.awt.geom.AffineTransformtoAWTTransform()ConvertsAffineTransformtoAffineTransform.RoitoImageJ()Converts shape to ImageJ ROI.-
Methods inherited from interface fr.igred.omero.Annotatable
addAndReplaceFile, addAndReplaceFile, addAndReplaceTable, addAndReplaceTable, addFile, addKeyValuePair, addTable, addTag, addTag, addTags, copyAnnotationLinks, getAnnotationData, getAnnotations, getFileAnnotations, getKeyValuePairs, getMapAnnotations, getMyRating, getTable, getTables, getTags, getValues, isLinked, link, link, linkIfNotLinked, rate, unlink
-
Methods inherited from interface fr.igred.omero.RemoteObject
canAnnotate, canChgrp, canChown, canDelete, canEdit, canLink, getCreated, getGroupId, getId, getOwner, saveAndUpdate
-
-
-
-
Method Detail
-
asDataObject
ShapeData asDataObject()
Returns a ShapeData corresponding to the handled object.- Specified by:
asDataObjectin interfaceRemoteObject- Returns:
- See above.
-
getC
int getC()
Gets the channel.- Returns:
- the channel. -1 if the shape applies to all channels of the image.
-
setC
void setC(int c)
Sets the channel.- Parameters:
c- the channel. Pass -1 to remove z value, i.e. shape applies to all channels of the image.
-
getZ
int getZ()
Gets the z-section.- Returns:
- the z-section. -1 if the shape applies to all z-sections of the image.
-
setZ
void setZ(int z)
Sets the z-section.- Parameters:
z- the z-section. Pass -1 to remove z value, i.e. shape applies to all z-sections of the image.
-
getT
int getT()
Sets the time-point.- Returns:
- the time-point. -1 if the shape applies to all time-points of the image.
-
setT
void setT(int t)
Sets the time-point.- Parameters:
t- the time-point. Pass -1 to remove t value, i.e. shape applies to all time-points of the image.
-
setCZT
default void setCZT(int c, int z, int t)Sets the channel, z-section and time-point at once.- Parameters:
c- the channel. Pass -1 to remove z value, i.e. shape applies to all channels of the image.z- the z-section. Pass -1 to remove z value, i.e. shape applies to all z-sections of the image.t- the time-point. Pass -1 to remove t value, i.e. shape applies to all time-points of the image.
-
getCZT
default java.lang.String getCZT()
Returns the C,Z,T positions as a comma-delimited String.- Returns:
- See above.
-
getFontSize
double getFontSize()
Gets ShapeData font size.- Returns:
- The font size (in typography points)
-
setFontSize
void setFontSize(double value)
Sets ShapeData font size.- Parameters:
value- The font size (in typography points)
-
getStroke
java.awt.Color getStroke()
Gets the ShapeData stroke color.- Returns:
- The stroke color
-
setStroke
void setStroke(java.awt.Color strokeColour)
Sets ShapeData stroke color.- Parameters:
strokeColour- The stroke color
-
getFill
java.awt.Color getFill()
Gets ShapeData fill color.- Returns:
- The fill color
-
setFill
void setFill(java.awt.Color fillColour)
Sets the ShapeData fill color.- Parameters:
fillColour- The fill color
-
getText
java.lang.String getText()
Gets the text on the ShapeData.- Returns:
- the text
-
setText
void setText(java.lang.String text)
Sets the text on the ShapeData.- Parameters:
text- the text
-
toAWTShape
java.awt.Shape toAWTShape()
Converts the shape to anShape.- Returns:
- The converted AWT Shape.
-
setTransform
void setTransform(double a00, double a10, double a01, double a11, double a02, double a12)Sets the transform to the matrix specified by the 6 double precision values.- Parameters:
a00- the X coordinate scaling element of the 3x3 matrixa10- the Y coordinate shearing element of the 3x3 matrixa01- the X coordinate shearing element of the 3x3 matrixa11- the Y coordinate scaling element of the 3x3 matrixa02- the X coordinate translation element of the 3x3 matrixa12- the Y coordinate translation element of the 3x3 matrix
-
setTransform
default void setTransform(java.awt.geom.AffineTransform transform)
Sets the transform from aAffineTransform.- Parameters:
transform- A Java AffineTransform.
-
toAWTTransform
java.awt.geom.AffineTransform toAWTTransform()
ConvertsAffineTransformtoAffineTransform.- Returns:
- The converted affine transform.
-
createTransformedAWTShape
default java.awt.Shape createTransformedAWTShape()
Returns a newShapedefined by the geometry of the specified Shape after it has been transformed by the transform.- Returns:
- A new transformed
Shape.
-
getBoundingBox
Rectangle getBoundingBox()
Returns a newRectanglecorresponding to the bounding box of the shape, once the relatedAffineTransformhas been applied.- Returns:
- The bounding box.
-
toImageJ
Roi toImageJ()
Converts shape to ImageJ ROI.- Returns:
- An ImageJ ROI.
-
link
default <A extends AnnotationData> void link(DataManager dm, A annotation) throws ServiceException, AccessException, java.util.concurrent.ExecutionException
Attach anAnnotationDatato this object.- Specified by:
linkin interfaceAnnotatable- Type Parameters:
A- The type of the annotation.- Parameters:
dm- The data manager.annotation- TheAnnotationData.- Throws:
ServiceException- Cannot connect to OMERO.AccessException- Cannot access data.java.util.concurrent.ExecutionException- A Facility can't be retrieved or instantiated.
-
-