public class MaskWrapper extends ShapeWrapper<MaskData> implements Mask
Wraps function calls to the MaskData contained.
ANNOTATION_LINK
data
Constructor and 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.
|
Modifier and Type | Method and 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.
|
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 mask
|
void |
setMask(byte[] mask)
Sets the mask image.
|
void |
setMask(int[][] mask)
Sets the mask
|
void |
setText(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.
|
annotationLinkType, copyFromIJRoi, copyToIJRoi, getBoundingBox, getC, getFill, getFontSize, getStroke, getT, getZ, setC, setFill, setFontSize, setStroke, setT, setTransform, setZ, toAWTTransform
addAndReplaceFile, addAndReplaceTable, addKeyValuePair, addTag, addTag, getAnnotations, getFileAnnotations, getMapAnnotations, getMyRating, getTable, getTags, rate, removeLink, unlink
asDataObject, canAnnotate, canChgrp, canChown, canDelete, canEdit, canLink, getCreated, getGroupId, getId, getOwner, getUpdated, saveAndUpdate, toString, wrap, wrap
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
asDataObject, toAWTShape
createTransformedAWTShape, getBoundingBox, getC, getCZT, getFill, getFontSize, getStroke, getT, getZ, link, setC, setCZT, setFill, setFontSize, setStroke, setT, setTransform, setTransform, setZ, toAWTTransform
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
getCoordinates, setCoordinates, setCoordinates
public MaskWrapper(MaskData mask)
mask
- The MaskData to wrap.public MaskWrapper()
public MaskWrapper(double x, double y, double width, double height, byte[] mask)
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.public String getText()
public void setText(String text)
public double getX()
getX
in interface Rectangular
public void setX(double x)
setX
in interface Rectangular
x
- See above.public double getY()
getY
in interface Rectangular
public void setY(double y)
setY
in interface Rectangular
y
- See above.public double getWidth()
getWidth
in interface Rectangular
public void setWidth(double width)
setWidth
in interface Rectangular
width
- See above.public double getHeight()
getHeight
in interface Rectangular
public void setHeight(double height)
setHeight
in interface Rectangular
height
- See above.public int[][] getMaskAsBinaryArray()
getMaskAsBinaryArray
in interface Mask
public byte[] getMask()
public void setMask(byte[] mask)
public void setMask(int[][] mask)
public void setMask(boolean[][] mask)
Copyright © 2020–2023 GReD. All rights reserved.