public class Mask extends Object
Constructor and Description |
---|
Mask(ij.process.ImageProcessor ip,
boolean take_mask)
Constructor, the input image is used only to take the
image size if take_mask is false, otherwise, it is used as the
mask information.
|
Mask(int width,
int height)
Create mask of specific size (all pixels set to true)
|
Modifier and Type | Method and Description |
---|---|
void |
BoundingBox(int[] corners)
Bounding box for the mask.
|
void |
clearMask()
Set to true every pixel of the full-size mask.
|
void |
fillMask(int tool)
Fill the mask associated to the mask points.
|
Point |
getPoint(int i)
Get a point from the mask.
|
boolean |
getValue(double x,
double y)
Get the value of the mask at a certain pixel.
|
boolean |
isFromStack()
Check if the mask was taken from the stack.
|
int |
numberOfMaskPoints()
Get the number of points in the mask.
|
void |
readFile(String filename)
Read mask from file.
|
void |
setMaskPoints(Vector<Point> listMaskPoints)
Set the mask points.
|
void |
setValue(int u,
int v,
boolean value)
Sets the value of the mask at a certain pixel.
|
void |
showMask()
Show mask.
|
public Mask(ij.process.ImageProcessor ip, boolean take_mask)
ip
- imagetake_mask
- flag to take the mask information from input image processorpublic Mask(int width, int height)
width
- mask widthheight
- mask heightpublic void BoundingBox(int[] corners)
corners
- array of coordinates of the bounding boxpublic void clearMask()
public void fillMask(int tool)
tool
- option to invert or not the maskpublic boolean getValue(double x, double y)
x
- x- coordinate of the pixely
- y- coordinate of the pixelpublic Point getPoint(int i)
i
- index of the point in the polygongpublic boolean isFromStack()
public int numberOfMaskPoints()
public void readFile(String filename)
filename
- name of the mask filepublic void showMask()
public void setMaskPoints(Vector<Point> listMaskPoints)
listMaskPoints
- list of points composing the maskpublic void setValue(int u, int v, boolean value)
u
- x- coordinate of the pixelv
- y- coordinate of the pixelvalue
- mask value to be setCopyright © 2015–2021 Fiji. All rights reserved.