|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectSeg2Dgel.Sg2glb
Seg2Dgel.Sg2fbl
public class Sg2fbl
Class Sg2fbl specifies methods for manipulating the Final Blob List (FBL) used by the 2D gel spot segmenter. There is only one FBL instance that is ever created and it is reused as we parse each spot in the image. The initial list will grow if needed and the data in the FBL is also saved in a hash table for rapid determination of FBL membership.
This code was derived and refactored from GELLAB-II sg2gii C language files.
This work was produced by Peter Lemkin of the National Cancer Institute, an agency of the United States Government. As a work of the United States Government there is no associated copyright. It is offered as open source software under the Mozilla Public License (version 1.1) subject to the limitations noted in the accompanying LEGAL file. This notice must be included with the code. The Open2Dprot Mozilla and Legal files are available on http://Open2Dprot.sourceforge.net/.
| Field Summary | |
|---|---|
(package private) int |
cc
FBL instance: cc central core value |
static int |
ccTopFBL
Top (i.e. |
static java.awt.Point |
centroid
Centroid of FBL when computed |
static Sg2fbl[] |
fblList
List of FBL points [0:topfbl-1] but allocated to max size [0:sizeMaxFBL-1] |
(package private) int |
g
FBL instance: g gray value |
static int |
maxX
minimum max X enclosing rectangle if used |
static int |
maxY
minimum max Y enclosing rectangle if used |
static int |
minX
minimum min X enclosing rectangle if used |
static int |
minY
minimum min Y enclosing rectangle if used |
static int |
sizeMaxFBL
Max # of FBLs. |
static int |
topfbl
Top of the current FBL stack. |
(package private) short |
x
FBL instance: x coordinate |
(package private) short |
y
FBL instance: y coordinate |
| Constructor Summary | |
|---|---|
Sg2fbl()
Sg2wrk() - Create WorkingStack instance |
|
Sg2fbl(int initialStackSize)
Sg2fbl() - Create Final Blob List (FBL) database Note: we will put data into this instance as required. |
|
| Method Summary | |
|---|---|
static boolean |
calcFBLrectangle()
calcFBLrectangle() - compute rectangle from the FBL (x,y) stack The data is saved in the static [minX:maxX, minY:maxY]. |
boolean |
calcMinEnclosingRectangle()
calcMinEnclosingRectangle() - compute the minimum enclosing rectangle for the FBL and save it in [minX, maxX, minY, maxY]. |
static void |
clearFBL()
clearFBL() - clear the FBL data counters and hash table but not the data in the arrays (to save time). |
DbBoundary |
cvtFBLdataToBoundary(DbBoundary bnd)
cvtFBLdataToBoundary() - convert a FBL to a dynamic boundary object with the size of FBL being topfbl. |
java.awt.Point[] |
cvtFBLdataToXYlist()
cvtFBLdataToXYlist() - convert a FBL to a xyList[] pf Points. |
static java.lang.String |
cvtFBLtoStr(java.lang.String msg)
cvtFBLtoStr() - convert the current FBL and INTERIOR_FBL into a string |
static java.lang.String |
cvtFblXYListToStr(int[] xyList,
java.lang.String msg)
cvtFblXYListToStr() - convert the compressed FBL XY list into a string |
java.awt.Point |
getCentroidFBL()
getCentroidFBL() - compute the centroid of the FBL if not null |
static Sg2fbl |
getFBL(int n)
getFBL() - get n'th FBL value instance |
int[] |
getFblXYlist()
getFblXYlist() - get a compressed array of FBL (x,y) coordinates. |
int |
growFBL(int newSize)
growFBL() - grow the fblList[] Final Blob List (FBL) tables currently set to sizeMaxFBL if the new size is less than sizeMaxFBL. |
void |
initFBL(int maxFBLsize,
boolean resetFlag)
initFBL() - initialize the FBL data structures |
DbBoundary |
mapFBLtoBnd(DbBoundary bnd,
boolean useMER_RLM2BNDflag)
mapFBLtoBnd() - compute the spot boundary given the FBL. |
static Sg2fbl |
popFBL()
popFBL() - pop top FBL value if not empty |
void |
pushFBL(int x,
int y,
int g,
int cc)
pushFBL() - if (x,y) is not in the FBL, then push (x,y,g,cc) into the working FBL. |
int |
pushXYintoFBL(int x,
int y)
pushXYintoFBL() - push (x,y) into FBL if (x,y) NEQ top pixel. |
static void |
reset()
reset() - reset any resources that must be reset for the next run of the segmenter. |
static void |
setFBL(int n,
int x,
int y,
int g,
int cc)
setFBL() - save (x,y,g,cc) in the current FBL instance n'th entry Also build the MER [merxp1:merxp2, meryp1:meryp2] |
static void |
setFBLC(int n,
int cc)
setFBLC() - set (cc) in the current FBL instance n'th entry |
static void |
setFBLG(int n,
int g)
setFBLG() - set (g) in the current FBL instance n'th entry |
static void |
setFBLGC(int n,
int g,
int cc)
setFBLGC() - set (g,cc) in the current FBL instance n'th entry |
static void |
setFBLXY(int n,
int x,
int y)
setFBLXY() - save (x,y) in the current FBL instance n'th entry Also build the MER [merxp1:merxp2, meryp1:meryp2] |
int |
setFblXYlist(int[] xyList,
boolean addGCCfromPixFlag)
setFblXYlist() - set the FBL from a compressed array of FBL (x,y) coordinates generated with getFblXYlist. |
| Methods inherited from class Seg2Dgel.Sg2glb |
|---|
get2D, get2D, getPixLineBuf, getPixLineBuf, initGlb, isDBwindow, isDBwindow, put2Dbuf, resetGlb, set2D, set2D, setPixLineBuf, setPixLineBuf, showReportStatus |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static Sg2fbl[] fblList
public static int sizeMaxFBL
public static int topfbl
public static int ccTopFBL
public static int minX
public static int maxX
public static int minY
public static int maxY
public static java.awt.Point centroid
short x
short y
int g
int cc
| Constructor Detail |
|---|
public Sg2fbl(int initialStackSize)
public Sg2fbl()
| Method Detail |
|---|
public static void reset()
public void initFBL(int maxFBLsize,
boolean resetFlag)
public static void clearFBL()
public final int growFBL(int newSize)
newSize - of the FBL
public static final void setFBLGC(int n,
int g,
int cc)
n - is the n'th FBL instanceg - is the gray value to setcc - is the central core value to set
public static final void setFBLG(int n,
int g)
n - is the n'th FBL instanceg - is the gray value to set
public static final void setFBLC(int n,
int cc)
n - is the n'th FBL instancecc - is the central core value to set
public static final void setFBL(int n,
int x,
int y,
int g,
int cc)
n - is the nth value in the FBL list to save the valuesx - is the x value to savey - is the y value to saveg - is the gray value to savecc - is the central core value to save
public static final void setFBLXY(int n,
int x,
int y)
n - is the nth value in the FBL list to save the valuesx - is the x value to savey - is the y value to save
public final void pushFBL(int x,
int y,
int g,
int cc)
x - is the x value to savey - is the y value to saveg - is the gray value to savecc - is the central core value to savepublic static final Sg2fbl popFBL()
public static final Sg2fbl getFBL(int n)
n - is the n'th FBL instance
public int pushXYintoFBL(int x,
int y)
x - is the X coordinate to pushy - is the Y coordinate to push
public static boolean calcFBLrectangle()
public static java.lang.String cvtFBLtoStr(java.lang.String msg)
public java.awt.Point getCentroidFBL()
public int[] getFblXYlist()
public int setFblXYlist(int[] xyList,
boolean addGCCfromPixFlag)
xyList - data [0:topfbl-1] contains entries of the form
( (x << 16) | y) )addGCCfromPixFlag - to get the g and cc data from pix1 and pix3.
public static java.lang.String cvtFblXYListToStr(int[] xyList,
java.lang.String msg)
xyList - data [0:topfbl-1] contains entries of the form
( (x << 16) | y) )msg - to add to printout
public boolean calcMinEnclosingRectangle()
public DbBoundary cvtFBLdataToBoundary(DbBoundary bnd)
bnd - is the boundary generated from the FBL.
public java.awt.Point[] cvtFBLdataToXYlist()
public DbBoundary mapFBLtoBnd(DbBoundary bnd,
boolean useMER_RLM2BNDflag)
bnd - to generateuseMER_RLM2BNDflag - if true cvt from existing M.E.R.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||