public class BaseBlob
extends java.lang.Object
implements java.io.Serializable
ByteBlob
,
ShortBlob
,
FloatBlob
,
ColorBlob
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected java.awt.Rectangle |
bound |
protected ObjectLocation |
CoM |
protected Vector2D |
direction |
protected boolean[] |
mask |
protected java.lang.Double |
mean |
protected java.lang.Double |
sd |
protected int |
size |
Constructor and Description |
---|
BaseBlob(BaseBlob blob) |
BaseBlob(java.util.HashSet<java.awt.Point> points) |
Modifier and Type | Method and Description |
---|---|
java.awt.Rectangle |
getBound()
Returns the boundary rectangle of the blob.
|
protected java.awt.Rectangle |
getBound(java.util.HashSet<java.awt.Point> points) |
ObjectLocation |
getCoM()
Returns the center of mass of the blob.
|
protected ObjectLocation |
getCoM(java.util.HashSet<java.awt.Point> points) |
Vector2D |
getDirection()
Returns the magnitude and direction of displacement.
|
boolean[] |
getMask()
Returns the mask of the blob.
|
protected boolean[] |
getMask(java.util.HashSet<java.awt.Point> points)
Converts the set of points to a boolean mask for space reduction.
|
java.util.HashSet<java.awt.Point> |
getPoints()
Returns the blob's points.
|
int |
getSize()
Returns the number of the blob's points.
|
boolean |
isContain(int x,
int y)
Returns 'true' if the blob contains this point.
|
boolean |
isContain(java.awt.Point p)
Returns 'true' if the blob contains this point.
|
boolean |
isOverlap(BaseBlob b)
Returns 'true' if there is a common area.
|
int |
OverlapArea(BaseBlob b) |
void |
setDirection(BaseBlob blob)
Sets a displacement vector using another blob.
|
void |
setDirection(Vector2D direction)
Sets a displacement vector.
|
static BaseBlob |
setPixelInformation(ij.process.ImageProcessor raw,
BaseBlob blob)
Sets the original pixel values of the blob.
|
static java.util.List<BaseBlob> |
setPixelInformation(ij.process.ImageProcessor raw,
java.util.List<BaseBlob> blobs)
Sets the original pixel values of the blobs.
|
protected boolean[] mask
protected int size
protected ObjectLocation CoM
protected java.awt.Rectangle bound
protected Vector2D direction
protected java.lang.Double mean
protected java.lang.Double sd
public BaseBlob(java.util.HashSet<java.awt.Point> points)
public BaseBlob(BaseBlob blob)
protected boolean[] getMask(java.util.HashSet<java.awt.Point> points)
points
- public java.awt.Rectangle getBound()
protected java.awt.Rectangle getBound(java.util.HashSet<java.awt.Point> points)
public ObjectLocation getCoM()
protected ObjectLocation getCoM(java.util.HashSet<java.awt.Point> points)
public java.util.HashSet<java.awt.Point> getPoints()
public int getSize()
public boolean isOverlap(BaseBlob b)
b
- public boolean isContain(java.awt.Point p)
p
- public boolean isContain(int x, int y)
p
- public int OverlapArea(BaseBlob b)
public boolean[] getMask()
public Vector2D getDirection()
public void setDirection(Vector2D direction)
direction
- public void setDirection(BaseBlob blob)
direction
- public static java.util.List<BaseBlob> setPixelInformation(ij.process.ImageProcessor raw, java.util.List<BaseBlob> blobs)
raw
- original ImageProcessor object (contains pixels)blobs
- public static BaseBlob setPixelInformation(ij.process.ImageProcessor raw, BaseBlob blob)
raw
- original ImageProcessor object (contains pixels)blob
-