|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectbunwarpj.Mask
public class Mask
This class is responsible for the mask preprocessing that takes place concurrently with user-interface events. It contains methods to compute the mask pyramids.
| Field Summary | |
|---|---|
private int |
height
mask height |
private boolean[] |
mask
mask flags |
private boolean |
mask_from_the_stack
flag to check if the mask comes from the stack of images |
private java.awt.Polygon |
polygon
polygon composing the flag |
private int |
width
mask width |
| Constructor Summary | |
|---|---|
Mask(ij.process.ImageProcessor ip,
boolean take_mask)
Empty 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. |
|
| Method Summary | |
|---|---|
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. |
java.awt.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(java.lang.String filename)
Read mask from file. |
void |
setMaskPoints(java.util.Vector<java.awt.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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private boolean[] mask
private int width
private int height
private java.awt.Polygon polygon
private boolean mask_from_the_stack
| Constructor Detail |
|---|
public Mask(ij.process.ImageProcessor ip,
boolean take_mask)
ip - imagetake_mask - flag to take the mask from the stack of images| Method Detail |
|---|
public 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 mask
public boolean getValue(double x,
double y)
x - x- coordinate of the pixely - y- coordinate of the pixel
public java.awt.Point getPoint(int i)
i - index of the point in the polygong
public boolean isFromStack()
public int numberOfMaskPoints()
public void readFile(java.lang.String filename)
filename - name of the mask filepublic void showMask()
public void setMaskPoints(java.util.Vector<java.awt.Point> listMaskPoints)
listMaskPoints - list of points composing the mask
public void setValue(int u,
int v,
boolean value)
u - x- coordinate of the pixelv - y- coordinate of the pixelvalue - mask value to be set
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||