Seg2Dgel
Class Sg2fnd

java.lang.Object
  extended by Seg2Dgel.Sg2glb
      extended by Seg2Dgel.Sg2fnd

public class Sg2fnd
extends Sg2glb

Class Sg2fnd finds the next spot for the 2D Gel Spot segmenter using a 4-neighbor definition of a spot. The algorithm uses a variety of theoretical (Laplacian of Gaussian) as well as heuristic methods to define the spot.

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/.

Version:
$Date: 2005/10/23 12:44:55 $ $Revision: 1.17 $
Author:
P. Lemkin, NCI-Frederick, Frederick, MD, 21702
See Also:
Open2Dprot Home

Field Summary
private static java.lang.String dirCode
          Direction codes for debugging
private static java.lang.String EAST
          Direction codes for debugging
private static int[] exteriorFBLg
          Exterior pixel FBL stack g value
private static int[] exteriorFBLx
          Exterior pixel FBL stack x coordinate
private static int[] exteriorFBLy
          Exterior pixel FBL stack y coordinate
private static int exteriorTopFBL
          Size of the exterior pixel FBL stack
static int interiorFBLcc
          The interior FBL CC is constant so don't do a list
static int[] interiorFBLg
          This is the list of FBL G values[0:interiorTopFBL-1] used if optimizing the FBL.
static int[] interiorFBLx
          This is the list of FBL X values[0:interiorTopFBL-1] used if optimizing the FBL.
static int[] interiorFBLy
          This is the list of FBL Y values[0:interiorTopFBL-1] used if optimizing the FBL.
static int interiorTopFBL
          top of interiorFBL?[]'s stacks
static int maxInteriorFBLsize
          Actual allocation size of Interior stacks that are initialized when they are used
static int maxInteriorTopFBL
          max of interiorTopFBL
private static int maxSizeExteriorFBL
          Exterior pixel FBL stack size
private static java.lang.String NONE
          Direction codes for debugging
private static java.lang.String NORTH
          Direction codes for debugging
static int[] propLineBuf
          Temporary propagation line buffer [0:pixWidth].
private static java.lang.String SOUTH
          Direction codes for debugging
private static java.lang.String WEST
          Direction codes for debugging
 
Fields inherited from class Seg2Dgel.Sg2glb
acc, accDatabaseFile, accDatabaseSwitch, accFile, accFormatMode, allowTouchingEdgesSwitch, applicationName, argsV, averageODSwitch, avg, avgPixFile, banner, bannerTitle, baseImageFileName, baseStatusTime, batchDir, bfav, bfavm, bfavm1, bfavp, bfavp1, bfog, bfogm, bfogm1, bfogm2, bfogm3, bfogm4, bfogm5, bfogp, bfogp1, bfogp2, bfogp3, bfogp4, bfogp5, bkg, BKGRD_CODE, bkgrdCorrectionSwitch, bkgrdPixFile, bkgrdSizeFlag, BLACK, boundaryInSSFSwitch, bufbkg, bufcc, bufmag, bufrest, c11, c12, c13, c14, c15, c16, c17, c18, c19, c1a, c1b, c1c, c1d, c1e, c1f, c1g, c1h, c21, c22, c23, c24, c25, c26, c27, c28, c29, c2a, c2b, c2c, c2d, c2e, c2f, c2g, c2h, c31, c32, c33, c34, c35, c36, c37, c38, c39, c3a, c3b, c3c, c3d, c3e, c3f, c3g, c3h, c41, c42, c43, c44, c45, c46, c47, c48, c49, c4a, c4b, c4c, c4d, c4e, c4f, c4g, c4h, c51, c52, c53, c54, c55, c56, c57, c58, c59, c5a, c5b, c5c, c5d, c5e, c5f, c5g, c5h, c61, c62, c63, c64, c65, c66, c67, c68, c69, c6a, c6b, c6c, c6d, c6e, c6f, c6g, c6h, c71, c72, c73, c74, c75, c76, c77, c78, c79, c7a, c7b, c7c, c7d, c7e, c7f, c7g, c7h, c81, c82, c83, c84, c85, c86, c87, c88, c89, c8a, c8b, c8c, c8d, c8e, c8f, c8g, c8h, c91, c92, c93, c94, c95, c96, c97, c98, c99, c9a, c9b, c9c, c9d, c9e, c9f, c9g, c9h, ca1, ca2, ca3, ca4, ca5, ca6, ca7, ca8, ca9, caa, cab, cac, cacheDir, cad, cae, caf, cag, cah, cal, cal2gray, calFile, cb1, cb2, cb3, cb4, cb5, cb6, cb7, cb8, cb9, cba, cbb, cbc, cbd, cbe, cbf, cbg, cbh, cc, cc1, cc2, cc3, cc4, cc5, cc6, cc7, cc8, cc9, cca, ccb, ccc, ccd, cce, ccf, ccg, cch, ccMinSize, ccMinSizeSwitch, ccNum, ccPixFile, cd1, cd2, cd3, cd4, cd5, cd6, cd7, cd8, cd9, cda, cdb, cdc, cdd, cde, cdf, cdg, cdh, computingWindowSwitch, coneOfSilenceMode, CONSOLE_FLAG, ctlCorePixSwitch, cwx1, cwx2, cwy1, cwy2, data, DATE, dbSample, dbSpot, dbug, DBUG_ADD_INTERIOR_CC_PIXELS, DBUG_BND_ANALYSIS, DBUG_CALC_FEATURES, DBUG_CHAIN_CODE_RLM_ANALYSIS, DBUG_CONSOLE, DBUG_CVT_BND_TO_CHAINCODE, DBUG_DRAW_NOTCH_PAIR_LINE, DBUG_DRAW_SAT_SPOT_BND, DBUG_DUMP_CC_PPX, DBUG_FILL_CORNERS, DBUG_FILL_HOLES_IN_PCC_CONCAVITIES, DBUG_FIND_BND_NOTCHES_IN_CHAIN_CODE, DBUG_FIND_SPOT_LIST, DBUG_INNER_LOOP_FIND_SPOT, DBUG_MAX_PROPAGATE, DBUG_NBR_COMPONENTS, DBUG_PIX_DBCODE, DBUG_PRINT_GRAY2CAL_MAP, DBUG_PROP_SAT_SPOTS, DBUG_PROP_SPOT_TO_2ND_MAXIMA, DBUG_PUSH_XY_INTO_FBL, DBUG_RMV_CONCAVITIES, DBUG_RMV_INTERIOR_CC_PIXELS, DBUG_ROUND_CORNERS, DBUG_SPLIT_CHECK_SPOT, DBUG_SPLIT_PIX_BY_FBL_BND_ANALSIS, DBUG_SWITCHES, dbugBits, dbugBitsHelpStr, dbugBitsPixFlag, dbx1, dbx2, dby1, dby2, debugSwitch, defaultSwitch, defaultTypeCode, deleteIsolatedPixelsSwitch, demoFileList, demoSwitch, DFT_2D_GEL, DFT_2D_LC_MS, DFT_NO_DB, didPropSaturatedSpots, didSplitSpotFlag, diffODSwitch, docFileList, dotsSwitch, dpx1, dpx2, dpy1, dpy2, draw, drawBoundaryOverlayType, drawBoundarySwitch, drawDotOverlayType, drawMEROverlayType, drawMERSwitch, drawPlusOverlayType, drawPlusSwitch, drawSxSyEllipseSwitch, drawSxSyOverlayType, drawTitleSwitch, dtdSwitch, ENABLE_DEVELOPER_DEBUGGING, ENABLE_SATURATED_SPOTS, ENABLE_SPOT_SPLITTING, fbl, fileSeparator, fio, fnd, fourSqrtPi, gHist, glbPercentThr, gray2cal, gridSize, hashFBL, HASHFBLPRIME, hashWS, histThreshold, i0R, i10, i11, i12, i13, i14, i15, i16, i17, i18, i2U, i4L, i6D, ini, inPixFile, ISOLATED_PIXEL_CODE, j11, j12, j13, j14, j15, j16, j17, j18, j19, j1a, j1b, j1c, j1d, j1e, j1f, j1g, j1h, j21, j22, j23, j24, j25, j26, j27, j28, j29, j2a, j2b, j2c, j2d, j2e, j2f, j2g, j2h, j31, j32, j33, j34, j35, j36, j37, j38, j39, j3a, j3b, j3c, j3d, j3e, j3f, j3g, j3h, j41, j42, j43, j44, j45, j46, j47, j48, j49, j4a, j4b, j4c, j4d, j4e, j4f, j4g, j4h, j51, j52, j53, j54, j55, j56, j57, j58, j59, j5a, j5b, j5c, j5d, j5e, j5f, j5g, j5h, j61, j62, j63, j64, j65, j66, j67, j68, j69, j6a, j6b, j6c, j6d, j6e, j6f, j6g, j6h, j71, j72, j73, j74, j75, j76, j77, j78, j79, j7a, j7b, j7c, j7d, j7e, j7f, j7g, j7h, j81, j82, j83, j84, j85, j86, j87, j88, j89, j8a, j8b, j8c, j8d, j8e, j8f, j8g, j8h, j91, j92, j93, j94, j95, j96, j97, j98, j99, j9a, j9b, j9c, j9d, j9e, j9f, j9g, j9h, ja1, ja2, ja3, ja4, ja5, ja6, ja7, ja8, ja9, jaa, jab, jac, jad, jae, jaf, jag, jah, jarFileList, jarLibrFileList, jb1, jb2, jb3, jb4, jb5, jb6, jb7, jb8, jb9, jba, jbb, jbc, jbd, jbe, jbf, jbg, jbh, jc1, jc2, jc3, jc4, jc5, jc6, jc7, jc8, jc9, jca, jcb, jcc, jcd, jce, jcf, jcg, jch, jd1, jd2, jd3, jd4, jd5, jd6, jd7, jd8, jd9, jda, jdb, jdc, jdd, jde, jdf, jdg, jdh, keepInputImageSwitch, KILL_SPOT_CODE, killSpotColor, laplacianSwitch, legalImageFileExtens, lineLaplacianHeight, lineLaplacianWidth, lowPassSize, lowpassSwitch, lp13xZZSwitch, lp3x3Switch, lp5x5Switch, lp7x7Switch, mag2ndPixFile, MAX_BUFFERED_SPOTS, MAX_CC_CODE, MAX_INTERIOR_FBL_SIZE, MAX_PCC_CODE, maxColsToPrint, maxGhist, maxGrayPixel, MAXSUBSPOTS, meanGhist, merx1, merx2, merxp1, merxp2, mery1, mery2, meryp1, meryp2, MHISTSIZE, MIN_CC_CODE, MIN_PCC_CODE, MINBLOBAREA, minGhist, MINSPLITSPOTSIZE, nBitsPerPixel, nBkgrdSize, nBytesPerPixel, NEVER, ngh, notch, nPixels, nStatusName, nSwitches, optimizeInteriorFBLSwitch, osName, paramH, PCC_BASE_CODE, pix, pix1, pix2, pix3, pix4, pix5, pix6, pix7, pixDir, pixDumpSwitch, pixelSizeMicrons, pixFileExtn, pixHeight, pixWidth, ppxDir, pra, projDir, projDirSwitch, propertiesFile, propertiesFileSwitch, pTileGhist, PUBLISH, quickEstimateSwitch, rdbmsDir, rest, restOfPixFile, restOfPixSwitch, REVISION, rlmCWfile, rmvDprimeSizingSwitch, sampleSwitch, sat, saturatedSpotSwitch, scaledMaxOD, seg2dgelURL, segPixFile, segPixSwitch, sg2, simpleFileName, sizeFractionGaussianWidth, sort, split, splitLargeCCfblByBndAnalSwitch, splitLargeCCfblByRLManalSwitch, splitLargeCCfblByThreshAnalSwitch, splitMinCCsize, splitSpotSwitch, spotNumber, ssfFormatMode, ssfFormatSwitch, ssfOutputEpilogueFile, ssfOutputFile, ssfOutputPrefaceFile, startTime, statusMemoryFree, statusMemoryTot, statusName, statusStartTime, sw, switchOptCBvalue, switchOptData, switchOptValue, t1Area, t1Density, t1Range, t1SxSyRatio, t2Area, t2Density, t2Range, t2SxSyRatio, TEST_LARGE_IMAGE, thrAreaSwitch, thrDensitySwitch, thrRangeSwitch, thrSxSyRatioSwitch, timerSwitch, tmpDir, UNLABELED_CC_CODE, updateSwitch, usageSwitch, USE_13X13, USE_BKGD_AND_ISOLATED_PIXEL_BACKGROUND, USE_DEMO_DATA, USE_DOM_XML_SSF, use3x3laplacianSwitch, use5x5laplacianSwitch, useBkgdAndIsolatedPixelFlag, useBusseLaplacianSwitch, useCopyOfPix1ForPix5Switch, useHistGUISwitch, useHorizLineLaplacianSwitch, usePopupGUISwitch, userDir, useVertLineLaplacianSwitch, util, VERSION, WHITE, widthWindmp, windmpStepSize, wrk, wXsize, wYsize, xDbug, xmlDir, xPentrance, xPexit, yDbug, yPentrance, yPexit, yTitle
 
Constructor Summary
Sg2fnd()
          Sg2fnd() - Constructor
 
Method Summary
private static void addInteriorCCtoFBL()
          addInteriorCCtoFBL() - add the pixels in the INTERIOR FBL back to the FBL so we can do the feature calculations correctly.
 java.lang.String cvtInteriorFBLtoStr()
          cvtInteriorFBLtoStr() - convert the interiorFBL to a string
private static void fillCorners()
          fillCorners() - fill corners such that the central pixel (C) is in [2:MAX_CC_CODE] and the 4-ngh pixels (N) are cc+PCC_BASE_CODE and the diagonal (E) to be filled is either BKGRD_CODE (i.e., 0), or KILL_SPOT_CODE, or ISOLATED_PIXEL_CODE in the central core image.
private static void fillHolesInPCCconcavities()
          fillHolesInPCCconcavities() - Fill HOLES in the propagated central core such that central pixels with (BKGRD_CODE (i.e.
private static void fillIt(int x, int y, int propVal)
          fillIt() - fill the blob corners at (x,y).
private static void fillPCC(int x, int y, int propVal)
          fillPCC() - fill the blob PCC concavities at (x,y).
static int findAllSpots()
          findAllSpots() - Find and segment all the spots in the image marking both the various images central-core and propagated-central-core and output image as well as computing the features which are saved in the next spot record.
static int findSpot(int xstart, int ystart, int ccLookForCode, DbSpot r)
          findSpot() - Given a new spot pixel (x,y,ccLookForCode) find all (x,y) pairs that are 4-neighbor connected to this spot with central core pixel ccLookForCode.
static void killSpotPCCandZimages()
          killSpotPCCandZimages() - kill spot in FBL by writing killSpotColor codes to PCC image pix3 and output image pix5.
static void killSpotPCCimage()
          killSpotPCCimage() - kill spot in FBL by writing killSpotColor codes to PCC image pix3.
static void killSpotZimage()
          killSpotZimage() - kill spot in FBL by writing 0's to output image pix5.
private static void maxPropagate()
          maxPropagate() - Do 4-neighbor propagation of all CC's in Final Blob List to to PCCs to fill in any concavities on the edge of the spot so the spot is round as would be expected.
static void numberComponents()
          numberComponents() - Label the central core image pixels [MIN_CC_CODE : MAX_CC_CODE] mod PCC_BASE_CODE for all pixels in the Final Blob List.
private static int propSpotTo2ndDrivMaxima(int x1, int y1, int dx, int dy, java.lang.String directionCode)
          propSpotTo2ndDrivMaxima() - Propagate the value CC+PCC_BASE_CODE in the central core image (with pixel value CC) from (x1,y1) using (dx,dy) as the propagated central core image starting position until either see a UNLABELED_CC_CODE (i.e.
static void reset()
          reset() - reset any resources that must be reset for the next run of the segmenter.
static boolean rmvConcavities()
          rmvConcavities() - Remove UNLABELED_CC_CODE's concavities of the central core image by searching for the following pattern (in four 90-degree combinations) and replacing it with another pattern.
static void rmvInteriorCCpixels()
          rmvInteriorCCpixels() - remove the interior FBL cc pixels and save them in the interiorFBX[x,y,g] PDLs indexed by interiorTopFBL.
private static void roundCorners()
          roundCorners() - Fill corners such that the central pixel is
private static void roundIt(int x, int y, int propVal)
          roundIt() - round it in pix4 and the FBL.
 
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

maxSizeExteriorFBL

private static int maxSizeExteriorFBL
Exterior pixel FBL stack size


exteriorFBLx

private static int[] exteriorFBLx
Exterior pixel FBL stack x coordinate


exteriorFBLy

private static int[] exteriorFBLy
Exterior pixel FBL stack y coordinate


exteriorFBLg

private static int[] exteriorFBLg
Exterior pixel FBL stack g value


exteriorTopFBL

private static int exteriorTopFBL
Size of the exterior pixel FBL stack


maxInteriorFBLsize

public static int maxInteriorFBLsize
Actual allocation size of Interior stacks that are initialized when they are used


interiorFBLx

public static int[] interiorFBLx
This is the list of FBL X values[0:interiorTopFBL-1] used if optimizing the FBL.


interiorFBLy

public static int[] interiorFBLy
This is the list of FBL Y values[0:interiorTopFBL-1] used if optimizing the FBL.


interiorFBLg

public static int[] interiorFBLg
This is the list of FBL G values[0:interiorTopFBL-1] used if optimizing the FBL.


interiorFBLcc

public static int interiorFBLcc
The interior FBL CC is constant so don't do a list


interiorTopFBL

public static int interiorTopFBL
top of interiorFBL?[]'s stacks


maxInteriorTopFBL

public static int maxInteriorTopFBL
max of interiorTopFBL


propLineBuf

public static int[] propLineBuf
Temporary propagation line buffer [0:pixWidth]. Reset between images


NONE

private static java.lang.String NONE
Direction codes for debugging


WEST

private static java.lang.String WEST
Direction codes for debugging


EAST

private static java.lang.String EAST
Direction codes for debugging


SOUTH

private static java.lang.String SOUTH
Direction codes for debugging


NORTH

private static java.lang.String NORTH
Direction codes for debugging


dirCode

private static java.lang.String dirCode
Direction codes for debugging

Constructor Detail

Sg2fnd

public Sg2fnd()
Sg2fnd() - Constructor

Method Detail

reset

public static void reset()
reset() - reset any resources that must be reset for the next run of the segmenter.


findAllSpots

public static final int findAllSpots()
findAllSpots() - Find and segment all the spots in the image marking both the various images central-core and propagated-central-core and output image as well as computing the features which are saved in the next spot record. The 10 steps in doing this are denoted by "[j]" to facilitate reading the algorithm.

Returns:
error code. 0 if succeed, non-zero if problems

findSpot

public static int findSpot(int xstart,
                           int ystart,
                           int ccLookForCode,
                           DbSpot r)
findSpot() - Given a new spot pixel (x,y,ccLookForCode) find all (x,y) pairs that are 4-neighbor connected to this spot with central core pixel ccLookForCode. The ccLookForCode value must be either UNLABELED_CC_CODE, or a CC value in [MIN_CC_CODE : MAX_CC_CODE], or a PCC value in [MIN_PCC_CODE : MAX_PCC_CODE] ranges. Set this list of pixels into the Final Blob List FBL. The algorithm first puts any new (i.e. pixels which are not already in the WS or FBL lists) 4-connected neighbor of a spot into the working stack and then puts them into the final list as it evaluates them. The algorithm terminates when the working stack is null or aborts if the size of the FBL > t2Area.

If the image has saturated regions, then the CC may be incorrect and several (many) spots are glombed together which is bogus and may result in spots 10000 or 1000000 pixels in area and make the segmenter run a VERY long time or run out of memory. The only reasonable solution is to abort the spot finding and kill the spot. Since spots will be sized out if the area > t2Area, this is not too unreasonable. Note that the remaining connected pixels will not be caught and will result in additional bogus spots. Garbage in Garbage out...

Parameters:
xstart - x coord where start looking for a spot
ystart - y coord where start looking for a spot
ccLookForCode - is the code where we start looking for a spot
r - is the current spot if calling this method on an existing spot otherwise it is null
Returns:
fbl.topfbl size of the FBL. If aborting the spot finding, then return -fbl.topfbl size of the FBL.

rmvInteriorCCpixels

public static void rmvInteriorCCpixels()
rmvInteriorCCpixels() - remove the interior FBL cc pixels and save them in the interiorFBX[x,y,g] PDLs indexed by interiorTopFBL. Remove them from the FBL by a copy and compress algorithm after marking them using the CC field (which will be reset later). This makes it easier to analyze the rest of the FBL stack to cut down the computations on the edge pixels.


cvtInteriorFBLtoStr

public java.lang.String cvtInteriorFBLtoStr()
cvtInteriorFBLtoStr() - convert the interiorFBL to a string

Returns:
converted string

rmvConcavities

public static final boolean rmvConcavities()
rmvConcavities() - Remove UNLABELED_CC_CODE's concavities of the central core image by searching for the following pattern (in four 90-degree combinations) and replacing it with another pattern.
 Note that it would be faster if did this on edge pixels only, but
 the computation to find these is about the same as doing this on all
 of FBL. In the following, c is UNLABELED_CC_CODE. The following
 illustrates the remapping algorithm.

 c c c     c c -     - - -     - c c
 c 0 c  or c 0 -  or c 0 c  or - 0 c
 - - -     c c -     c c c     - c c
 WEST      EAST      SOUTH     NORTH

 is changed to

 c c c     c c -     - - -     - c c
 c 0 c  or c c -  or c c c  or - c c
 - - -     c c -     c c c     - c c

Returns:
true if terminated successfully, false if any errors.

numberComponents

public static final void numberComponents()
numberComponents() - Label the central core image pixels [MIN_CC_CODE : MAX_CC_CODE] mod PCC_BASE_CODE for all pixels in the Final Blob List. Note: there is a very small but finite probability that two adjacent (i.e. touching) spots will have the same label - and thus will be merged.


propSpotTo2ndDrivMaxima

private static final int propSpotTo2ndDrivMaxima(int x1,
                                                 int y1,
                                                 int dx,
                                                 int dy,
                                                 java.lang.String directionCode)
propSpotTo2ndDrivMaxima() - Propagate the value CC+PCC_BASE_CODE in the central core image (with pixel value CC) from (x1,y1) using (dx,dy) as the propagated central core image starting position until either see a UNLABELED_CC_CODE (i.e. 1) or another spot's central core or a 2nd derivative maximum at least one pixel away from the initial (x,y). The latter spacing is used since the starting magnitude is at the valley is noisy.

Parameters:
x1 -
y1 -
dx -
dy -
directionCode -
Returns:
# of pixels propagated

maxPropagate

private static final void maxPropagate()
maxPropagate() - Do 4-neighbor propagation of all CC's in Final Blob List to to PCCs to fill in any concavities on the edge of the spot so the spot is round as would be expected.


fillIt

private static final void fillIt(int x,
                                 int y,
                                 int propVal)
fillIt() - fill the blob corners at (x,y). Don't fill if already in the FBL.

Parameters:
x -
y -
propVal -

fillCorners

private static final void fillCorners()
fillCorners() - fill corners such that the central pixel (C) is in [2:MAX_CC_CODE] and the 4-ngh pixels (N) are cc+PCC_BASE_CODE and the diagonal (E) to be filled is either BKGRD_CODE (i.e., 0), or KILL_SPOT_CODE, or ISOLATED_PIXEL_CODE in the central core image. Update the output image (if being generated).


fillPCC

private static final void fillPCC(int x,
                                  int y,
                                  int propVal)
fillPCC() - fill the blob PCC concavities at (x,y). Don't fill if already in the FBL.

Parameters:
x -
y -
propVal -

fillHolesInPCCconcavities

private static final void fillHolesInPCCconcavities()
fillHolesInPCCconcavities() - Fill HOLES in the propagated central core such that central pixels with (BKGRD_CODE (i.e. 0), KILL_SPOT_CODE, ISOLATED_PIXEL_CODE) values be filled is in between central core pixels with PCC value. Also fill in between vertical hairs, PCC concavities, which are not in the central core with propagated CC values. Note: we must recreate the Run Projection Map to do the propagations.


roundIt

private static final void roundIt(int x,
                                  int y,
                                  int propVal)
roundIt() - round it in pix4 and the FBL. Don't fill if already in the FBL.

Parameters:
x -
y -
propVal -

roundCorners

private static final void roundCorners()
roundCorners() - Fill corners such that the central pixel is
 - x 0
 - x x
 - - - or the other 3 permutations.
 Then check:
 x - -
 x 0 -
 x x x.
 The diagonal is then filled with the value x.

 NOTE: this algorithm must operate on the FBL iteratively in a
   relaxation scheme since pixels added could contribute to new pixels. 
 NOTE: it has a tendency to "square up" corners.
 Then, update output picture (if being generated).


addInteriorCCtoFBL

private static final void addInteriorCCtoFBL()
addInteriorCCtoFBL() - add the pixels in the INTERIOR FBL back to the FBL so we can do the feature calculations correctly. NOTE: order of pixels in the FBL does not matter!


killSpotPCCimage

public static void killSpotPCCimage()
killSpotPCCimage() - kill spot in FBL by writing killSpotColor codes to PCC image pix3.


killSpotZimage

public static void killSpotZimage()
killSpotZimage() - kill spot in FBL by writing 0's to output image pix5.


killSpotPCCandZimages

public static void killSpotPCCandZimages()
killSpotPCCandZimages() - kill spot in FBL by writing killSpotColor codes to PCC image pix3 and output image pix5.