|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSeg2Dgel.Sg2glb
Seg2Dgel.Sg2wrk
public class Sg2wrk
Class Sg2wrk specifies WorkingStack used by the 2D gel segmenter in blob finding. Pixels that are determined to be 4 neighbor connected are pushed into the WorkingStack. This in turn is popped, pushed into the FBL, and then tested to see which 4-neighbors are candidates for the WorkingStack. The initial list will grow if needed and the data in the WorkingStack is also saved in a hash table for rapid determination of WorkingStack 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 note 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 | |
---|---|
static int |
sizeHashWSprimeDefault
current hash table size of wsList[] |
static int |
sizeMaxWS
current allocation size of wsList[] |
static int |
topws
top of the current WorkingStack |
static Sg2wrk[] |
wsList
Static WorkingStack variables |
short |
x
WorkingStack instance: x coordinate |
short |
y
WorkingStack instance: y coordinate |
Constructor Summary | |
---|---|
Sg2wrk()
Sg2wrk() - Create WorkingStack instance |
|
Sg2wrk(int initialStackSize)
Sg2wrk() - Create WorkingStack database Note: we will put data into this instance as required. |
Method Summary | |
---|---|
static void |
clearWS()
clearWS() - clear the WS data counter and hash table, but not the data in the arrays (to save time). |
static java.lang.String |
cvtWStoStr(java.lang.String msg)
cvtWStoStr() - convert the current WS into a string |
static Sg2wrk |
getWS(int n)
getWS() - get n'th WorkingStack value instance |
static int |
growWS(int newSizeMaxWS)
growWS() - grow the wsList[] working stack tables to Sg2fbl.sizeMaxFBL. |
void |
initWS(int maxWSsize,
boolean resetFlag)
initWS() - initialize the WorkingStack data structures |
static Sg2wrk |
popWS()
popWS() - pop WorkingStack value instance if not empty |
static void |
pushWS(int x,
int y)
pushWS() - If not already in the WorkingStack, then push the (x,y) pair onto the existing WS and regrow the stack if needed. |
static void |
reset()
reset() - reset any resources that must be reset for the next run of the segmenter. |
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 int sizeMaxWS
public static int sizeHashWSprimeDefault
public static Sg2wrk[] wsList
public static int topws
public short x
public short y
Constructor Detail |
---|
public Sg2wrk(int initialStackSize)
public Sg2wrk()
Method Detail |
---|
public static void reset()
public void initWS(int maxWSsize, boolean resetFlag)
maxWSsize
- is the new working stack sizepublic static Sg2wrk getWS(int n)
p
- is the p'th WorkingStack instance
public static Sg2wrk popWS()
public static void pushWS(int x, int y)
public static int growWS(int newSizeMaxWS)
newSizeMaxWS
- new size to grow the WS stackreturn
- the new size of the working starckpublic static void clearWS()
public static java.lang.String cvtWStoStr(java.lang.String msg)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |