Package fr.igred.omero.roi
Class MaskWrapper
- java.lang.Object
-
- fr.igred.omero.ObjectWrapper<T>
-
- fr.igred.omero.AnnotatableWrapper<T>
-
- fr.igred.omero.roi.ShapeWrapper<MaskData>
-
- fr.igred.omero.roi.MaskWrapper
-
- All Implemented Interfaces:
Annotatable
,RemoteObject
,Mask
,Rectangular
,Shape
public class MaskWrapper extends ShapeWrapper<MaskData> implements Mask
Class containing an MaskData.Wraps function calls to the MaskData contained.
-
-
Field Summary
-
Fields inherited from class fr.igred.omero.roi.ShapeWrapper
ANNOTATION_LINK
-
Fields inherited from class fr.igred.omero.ObjectWrapper
data
-
-
Constructor Summary
Constructors Constructor Description MaskWrapper()
Constructor of the MaskWrapper class using a new empty MaskData.MaskWrapper(double x, double y, double width, double height, byte[] mask)
Constructor of the MaskWrapper class using a new MaskData.MaskWrapper(MaskData mask)
Constructor of the MaskWrapper class using a MaskData.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getHeight()
Returns the height of the rectangular shape.byte[]
getMask()
Returns the mask as a byte array.int[][]
getMaskAsBinaryArray()
Returns the mask image.java.lang.String
getText()
Gets the text on the ShapeData.double
getWidth()
Returns the width of the rectangular shape.double
getX()
Returns the x-coordinate of the rectangular shape.double
getY()
Returns the y coordinate of the rectangular shape.void
setHeight(double height)
Sets the height of the rectangular shape.void
setMask(boolean[][] mask)
Sets the maskvoid
setMask(byte[] mask)
Sets the mask image.void
setMask(int[][] mask)
Sets the maskvoid
setText(java.lang.String text)
Sets the text on the ShapeData.void
setWidth(double width)
Sets width of the rectangular shape.void
setX(double x)
Sets the x-coordinate of the rectangular shape.void
setY(double y)
Sets the y-coordinate of the rectangular shape.Roi
toImageJ()
Converts shape to ImageJ ROI.-
Methods inherited from class fr.igred.omero.roi.ShapeWrapper
annotationLinkType, copyFromIJRoi, copyToIJRoi, getBoundingBox, getC, getFill, getFontSize, getStroke, getT, getZ, setC, setFill, setFontSize, setStroke, setT, setTransform, setZ, toAWTTransform
-
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.roi.Mask
asDataObject, toAWTShape
-
Methods inherited from interface fr.igred.omero.roi.Rectangular
getCoordinates, setCoordinates, setCoordinates
-
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
createTransformedAWTShape, getBoundingBox, getC, getCZT, getFill, getFontSize, getStroke, getT, getZ, link, setC, setCZT, setFill, setFontSize, setStroke, setT, setTransform, setTransform, setZ, toAWTTransform
-
-
-
-
Constructor Detail
-
MaskWrapper
public MaskWrapper(MaskData mask)
Constructor of the MaskWrapper class using a MaskData.- Parameters:
mask
- The MaskData to wrap.
-
MaskWrapper
public MaskWrapper()
Constructor of the MaskWrapper class using a new empty MaskData.
-
MaskWrapper
public MaskWrapper(double x, double y, double width, double height, byte[] mask)
Constructor of the MaskWrapper class using a new MaskData.- Parameters:
x
- The x-coordinate of the top-left corner of the image.y
- The y-coordinate of the top-left corner of the image.width
- The width of the image.height
- The height of the image.mask
- The mask image.
-
-
Method Detail
-
getText
public java.lang.String getText()
Gets the text on the ShapeData.
-
setText
public void setText(java.lang.String text)
Sets the text on the ShapeData.
-
getX
public double getX()
Returns the x-coordinate of the rectangular shape.- Specified by:
getX
in interfaceRectangular
- Returns:
- See above.
-
setX
public void setX(double x)
Sets the x-coordinate of the rectangular shape.- Specified by:
setX
in interfaceRectangular
- Parameters:
x
- See above.
-
getY
public double getY()
Returns the y coordinate of the rectangular shape.- Specified by:
getY
in interfaceRectangular
- Returns:
- See above.
-
setY
public void setY(double y)
Sets the y-coordinate of the rectangular shape.- Specified by:
setY
in interfaceRectangular
- Parameters:
y
- See above.
-
getWidth
public double getWidth()
Returns the width of the rectangular shape.- Specified by:
getWidth
in interfaceRectangular
- Returns:
- See above.
-
setWidth
public void setWidth(double width)
Sets width of the rectangular shape.- Specified by:
setWidth
in interfaceRectangular
- Parameters:
width
- See above.
-
getHeight
public double getHeight()
Returns the height of the rectangular shape.- Specified by:
getHeight
in interfaceRectangular
- Returns:
- See above.
-
setHeight
public void setHeight(double height)
Sets the height of the rectangular shape.- Specified by:
setHeight
in interfaceRectangular
- Parameters:
height
- See above.
-
getMaskAsBinaryArray
public int[][] getMaskAsBinaryArray()
Returns the mask image.- Specified by:
getMaskAsBinaryArray
in interfaceMask
- Returns:
- See above.
-
getMask
public byte[] getMask()
Returns the mask as a byte array.
-
setMask
public void setMask(byte[] mask)
Sets the mask image.
-
setMask
public void setMask(int[][] mask)
Sets the mask
-
setMask
public void setMask(boolean[][] mask)
Sets the mask
-
-