Package fr.igred.omero.roi
Class GenericShapeWrapper<T extends ShapeData>
- java.lang.Object
- 
- fr.igred.omero.GenericObjectWrapper<T>
- 
- fr.igred.omero.roi.GenericShapeWrapper<T>
 
 
- 
- Type Parameters:
- T- Subclass of- ShapeData
 - Direct Known Subclasses:
- EllipseWrapper,- LineWrapper,- MaskWrapper,- PointWrapper,- PolygonWrapper,- PolylineWrapper,- RectangleWrapper,- TextWrapper
 
 public abstract class GenericShapeWrapper<T extends ShapeData> extends GenericObjectWrapper<T> Generic class containing a ShapeData (or a subclass) object.
- 
- 
Field Summary- 
Fields inherited from class fr.igred.omero.GenericObjectWrapperdata
 
- 
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedGenericShapeWrapper(T object)Constructor of the GenericShapeWrapper class using a ShapeData.
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description TasShapeData()Gets the ShapeData object contained.protected voidcopy(Roi ijRoi)Copies details from an ImageJ ROI (position, stroke color, stroke width).ShapecreateTransformedAWTShape()Returns a newShapedefined by the geometry of the specified Shape after it has been transformed by the transform.RectangleWrappergetBoundingBox()Returns a newRectangleWrappercorresponding to the bounding box of the shape, once the relatedAffineTransformhas been applied.intgetC()Gets the channel.doublegetFontSize()Gets ShapeData font sizeColorgetStroke()Sets ShapeData stroke colorintgetT()Sets the time-point.abstract StringgetText()Gets the text on the ShapeData.intgetZ()Gets the z-section.voidsetC(int c)Sets the channel.voidsetCZT(int c, int z, int t)Sets the channel, z-section and time-point at once.voidsetFontSize(double value)Sets ShapeData font sizevoidsetStroke(Color color)Sets ShapeData stroke colorvoidsetT(int t)Sets the time-point.abstract voidsetText(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.voidsetTransform(AffineTransform transform)Sets the transform from aAffineTransform.voidsetZ(int z)Sets the z-section.abstract ShapetoAWTShape()Converts the shape to anShape.AffineTransformtoAWTTransform()ConvertsAffineTransformtoAffineTransform.RoitoImageJ()Converts shape to ImageJ ROI.- 
Methods inherited from class fr.igred.omero.GenericObjectWrappercanAnnotate, canChgrp, canChown, canDelete, canEdit, canLink, delete, getCreated, getGroupId, getId, getOwner, saveAndUpdate, toString, wrap, wrap
 
- 
 
- 
- 
- 
Constructor Detail- 
GenericShapeWrapperprotected GenericShapeWrapper(T object) Constructor of the GenericShapeWrapper class using a ShapeData.- Parameters:
- object- the shape
 
 
- 
 - 
Method Detail- 
copyprotected final void copy(Roi ijRoi) Copies details from an ImageJ ROI (position, stroke color, stroke width).- Parameters:
- ijRoi- An ImageJ Roi.
 
 - 
asShapeDatapublic T asShapeData() Gets the ShapeData object contained.- Returns:
- the shape.
 
 - 
getCpublic int getC() Gets the channel.- Returns:
- the channel. -1 if the shape applies to all channels of the image.
 
 - 
setCpublic 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.
 
 - 
getZpublic int getZ() Gets the z-section.- Returns:
- the z-section. -1 if the shape applies to all z-sections of the image.
 
 - 
setZpublic 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.
 
 - 
getTpublic int getT() Sets the time-point.- Returns:
- the time-point. -1 if the shape applies to all time-points of the image.
 
 - 
setTpublic 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.
 
 - 
setCZTpublic 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.
 
 - 
getFontSizepublic double getFontSize() Gets ShapeData font size- Returns:
- The font size (in typography points)
 
 - 
setFontSizepublic void setFontSize(double value) Sets ShapeData font size- Parameters:
- value- The font size (in typography points)
 
 - 
getStrokepublic Color getStroke() Sets ShapeData stroke color- Returns:
- The stroke color
 
 - 
setStrokepublic void setStroke(Color color) Sets ShapeData stroke color- Parameters:
- color- The stroke color
 
 - 
getTextpublic abstract String getText() Gets the text on the ShapeData.- Returns:
- the text
 
 - 
setTextpublic abstract void setText(String text) Sets the text on the ShapeData.- Parameters:
- text- the text
 
 - 
toAWTShapepublic abstract Shape toAWTShape() Converts the shape to anShape.- Returns:
- The converted AWT Shape.
 
 - 
setTransformpublic 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 matrix
- a10- the Y coordinate shearing element of the 3x3 matrix
- a01- the X coordinate shearing element of the 3x3 matrix
- a11- the Y coordinate scaling element of the 3x3 matrix
- a02- the X coordinate translation element of the 3x3 matrix
- a12- the Y coordinate translation element of the 3x3 matrix
 
 - 
setTransformpublic void setTransform(AffineTransform transform) Sets the transform from aAffineTransform.- Parameters:
- transform- A Java AffineTransform.
 
 - 
toAWTTransformpublic AffineTransform toAWTTransform() ConvertsAffineTransformtoAffineTransform.- Returns:
- The converted affine transform.
 
 - 
createTransformedAWTShapepublic 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.
 
 - 
getBoundingBoxpublic RectangleWrapper getBoundingBox() Returns a newRectangleWrappercorresponding to the bounding box of the shape, once the relatedAffineTransformhas been applied.- Returns:
- The bounding box.
 
 - 
toImageJpublic Roi toImageJ() Converts shape to ImageJ ROI.- Returns:
- An ImageJ ROI.
 
 
- 
 
-