Package fr.igred.omero.roi
Class ShapeWrapper<T extends ShapeData>
- java.lang.Object
-
- fr.igred.omero.ObjectWrapper<T>
-
- fr.igred.omero.AnnotatableWrapper<T>
-
- fr.igred.omero.roi.ShapeWrapper<T>
-
- Type Parameters:
T- Subclass ofShapeData
- All Implemented Interfaces:
Annotatable,RemoteObject,Shape
- Direct Known Subclasses:
EllipseWrapper,LineWrapper,MaskWrapper,PointWrapper,PolygonWrapper,PolylineWrapper,RectangleWrapper,TextWrapper
public abstract class ShapeWrapper<T extends ShapeData> extends AnnotatableWrapper<T> implements Shape
Generic class containing a ShapeData (or a subclass) object.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringANNOTATION_LINKAnnotation link name for this type of object-
Fields inherited from class fr.igred.omero.ObjectWrapper
data
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedShapeWrapper(T s)Constructor of the ShapeWrapper class using a ShapeData.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringannotationLinkType()Returns the type of annotation link for this object.protected voidcopyFromIJRoi(Roi ijRoi)Copies details from an ImageJ ROI (position, stroke color, stroke width).protected voidcopyToIJRoi(Roi ijRoi)Copies details to an ImageJ ROI (name, position, stroke color, fill color, stroke width).RectanglegetBoundingBox()Returns a newRectanglecorresponding to the bounding box of the shape, once the relatedAffineTransformhas been applied.intgetC()Gets the channel.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.intgetZ()Gets the z-section.voidsetC(int c)Sets the channel.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.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.voidsetZ(int z)Sets the z-section.java.awt.geom.AffineTransformtoAWTTransform()ConvertsAffineTransformtoAffineTransform.RoitoImageJ()Converts shape to ImageJ ROI.-
Methods inherited from class fr.igred.omero.AnnotatableWrapper
addAndReplaceFile, addAndReplaceTable, addKeyValuePair, addTag, addTag, getAnnotations, getFileAnnotations, getMapAnnotations, getMyRating, getTable, getTags, rate, removeLink, unlink
-
Methods inherited from class fr.igred.omero.ObjectWrapper
asDataObject, canAnnotate, canChgrp, canChown, canDelete, canEdit, canLink, getCreated, getGroupId, getId, getOwner, saveAndUpdate, toString, wrap, wrap
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
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
-
Methods inherited from interface fr.igred.omero.roi.Shape
asDataObject, createTransformedAWTShape, getCZT, getText, link, setCZT, setText, setTransform, toAWTShape
-
-
-
-
Field Detail
-
ANNOTATION_LINK
public static final java.lang.String ANNOTATION_LINK
Annotation link name for this type of object- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ShapeWrapper
protected ShapeWrapper(T s)
Constructor of the ShapeWrapper class using a ShapeData.- Parameters:
s- The shape.
-
-
Method Detail
-
copyFromIJRoi
protected void copyFromIJRoi(Roi ijRoi)
Copies details from an ImageJ ROI (position, stroke color, stroke width).- Parameters:
ijRoi- An ImageJ Roi.
-
copyToIJRoi
protected void copyToIJRoi(Roi ijRoi)
Copies details to an ImageJ ROI (name, position, stroke color, fill color, stroke width).- Parameters:
ijRoi- An ImageJ Roi.
-
getC
public int getC()
Gets the channel.
-
setC
public void setC(int c)
Sets the channel.
-
getZ
public int getZ()
Gets the z-section.
-
setZ
public void setZ(int z)
Sets the z-section.
-
getT
public int getT()
Sets the time-point.
-
setT
public void setT(int t)
Sets the time-point.
-
getFontSize
public double getFontSize()
Gets ShapeData font size.- Specified by:
getFontSizein interfaceShape- Returns:
- The font size (in typography points)
-
setFontSize
public void setFontSize(double value)
Sets ShapeData font size.- Specified by:
setFontSizein interfaceShape- Parameters:
value- The font size (in typography points)
-
getStroke
public java.awt.Color getStroke()
Gets the ShapeData stroke color.
-
setStroke
public void setStroke(java.awt.Color strokeColour)
Sets ShapeData stroke color.
-
getFill
public java.awt.Color getFill()
Gets ShapeData fill color.
-
setFill
public void setFill(java.awt.Color fillColour)
Sets the ShapeData fill color.
-
setTransform
public 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.- Specified by:
setTransformin interfaceShape- 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
-
toAWTTransform
public java.awt.geom.AffineTransform toAWTTransform()
ConvertsAffineTransformtoAffineTransform.- Specified by:
toAWTTransformin interfaceShape- Returns:
- The converted affine transform.
-
getBoundingBox
public Rectangle getBoundingBox()
Returns a newRectanglecorresponding to the bounding box of the shape, once the relatedAffineTransformhas been applied.- Specified by:
getBoundingBoxin interfaceShape- Returns:
- The bounding box.
-
toImageJ
public Roi toImageJ()
Converts shape to ImageJ ROI.
-
annotationLinkType
protected java.lang.String annotationLinkType()
Returns the type of annotation link for this object.- Specified by:
annotationLinkTypein classAnnotatableWrapper<T extends ShapeData>- Returns:
- See above.
-
-