public interface Shape extends Annotatable
Modifier and Type | Method and Description |
---|---|
ShapeData |
asDataObject()
Returns a ShapeData corresponding to the handled object.
|
default Shape |
createTransformedAWTShape()
Returns a new
Shape defined by the geometry of the specified Shape after it has been transformed
by the transform. |
Rectangle |
getBoundingBox()
Returns a new
Rectangle corresponding to the bounding box of the shape, once the related
AffineTransform has been applied. |
int |
getC()
Gets the channel.
|
default String |
getCZT()
Returns the C,Z,T positions as a comma-delimited String.
|
Color |
getFill()
Gets ShapeData fill color.
|
double |
getFontSize()
Gets ShapeData font size.
|
Color |
getStroke()
Gets the ShapeData stroke color.
|
int |
getT()
Sets the time-point.
|
String |
getText()
Gets the text on the ShapeData.
|
int |
getZ()
Gets the z-section.
|
default <A extends AnnotationData> |
link(DataManager dm,
A annotation)
Attach an
AnnotationData to this object. |
void |
setC(int c)
Sets the channel.
|
default void |
setCZT(int c,
int z,
int t)
Sets the channel, z-section and time-point at once.
|
void |
setFill(Color fillColour)
Sets the ShapeData fill color.
|
void |
setFontSize(double value)
Sets ShapeData font size.
|
void |
setStroke(Color strokeColour)
Sets ShapeData stroke color.
|
void |
setT(int t)
Sets the time-point.
|
void |
setText(String text)
Sets the text on the ShapeData.
|
default void |
setTransform(AffineTransform transform)
Sets the transform from a
AffineTransform . |
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.
|
void |
setZ(int z)
Sets the z-section.
|
Shape |
toAWTShape()
Converts the shape to an
Shape . |
AffineTransform |
toAWTTransform()
Converts
AffineTransform to AffineTransform . |
Roi |
toImageJ()
Converts shape to ImageJ ROI.
|
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
canAnnotate, canChgrp, canChown, canDelete, canEdit, canLink, distinct, flatten, getCreated, getElementsOf, getGroupId, getId, getOwner, getUpdated, saveAndUpdate
ShapeData asDataObject()
asDataObject
in interface RemoteObject
int getC()
void setC(int c)
c
- the channel. Pass -1 to remove z value, i.e. shape applies to all channels of the image.int getZ()
void setZ(int z)
z
- the z-section. Pass -1 to remove z value, i.e. shape applies to all z-sections of the image.int getT()
void setT(int t)
t
- the time-point. Pass -1 to remove t value, i.e. shape applies to all time-points of the image.default void setCZT(int c, int z, int t)
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.default String getCZT()
double getFontSize()
void setFontSize(double value)
value
- The font size (in typography points)Color getStroke()
void setStroke(Color strokeColour)
strokeColour
- The stroke colorColor getFill()
void setFill(Color fillColour)
fillColour
- The fill colorString getText()
void setText(String text)
text
- the textvoid setTransform(double a00, double a10, double a01, double a11, double a02, double a12)
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 matrixdefault void setTransform(AffineTransform transform)
AffineTransform
.transform
- A Java AffineTransform.AffineTransform toAWTTransform()
AffineTransform
to AffineTransform
.default Shape createTransformedAWTShape()
Shape
defined by the geometry of the specified Shape after it has been transformed
by the transform.Shape
.Rectangle getBoundingBox()
Rectangle
corresponding to the bounding box of the shape, once the related
AffineTransform
has been applied.Roi toImageJ()
default <A extends AnnotationData> void link(DataManager dm, A annotation) throws ServiceException, AccessException, ExecutionException
AnnotationData
to this object.link
in interface Annotatable
A
- The type of the annotation.dm
- The data manager.annotation
- The AnnotationData
.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.Copyright © 2020–2023 GReD. All rights reserved.