Seg2Dgel
Class Sg2ngh

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

public class Sg2ngh
extends Sg2glb

Class Sg2ngh gets neighborhhod data and gaussian filter neighborhood data for 3x3, 5x5, 7x7, 13x13(17) size neighbohhoods. This data isused by the 2D gel segmenter. Image data is returned in Sg2glb.{ixy}, Sg2glb.{jxy} and gaussian convolution data in Sg2glb.{cxy} where i, j and c are 'i', 'j', and 'c'. And x and y are numbers in the range of the neighborhood size e.g., for a 7x7, x and y are [1:7], etc.

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.14 $
Author:
P. Lemkin, NCI-Frederick, Frederick, MD, 21702
See Also:
Open2Dprot Home

Field Summary
private static float ALPHA
          1 std dev as % of filter size
private static int d13x13Sum
          Sum of density in 13x13 filter.
private static int d13x17Sum
          Sum of density in 13x17 filter.
(package private) static float sxI
          X std deviation for gaussian generation
private static float sxI13
          13x13 gaussian filter X std dev as % of filter size
(package private) static float syI
          X std deviation for gaussian generation
private static float syI13
          13x13 gaussian filter Y std dev as % of filter size
 
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
Sg2ngh()
          Sg2ngh() - Constructor
 
Method Summary
static int convolve13x13Gaussian()
          convolve13x13Gaussian() - convolve 13x13 J * C arrays.
static int convolve13x17Gaussian()
          convolve13x17Gaussian() - convolve 13x17 Sg2glb.{jxy * cxy} arrays.
static int convolve13x17Laplacian()
           
static java.lang.String cvt3x3NghToStr(char[] pix, int x, int y, int radix, int fWidth, java.lang.String msg)
          cvt3x3NghToStr() - print 3x3 neighborhood at (pix,x,y) in I10:I18 vars.
static java.lang.String cvt3x3NghToStr(char[] pix, int x, int y, java.lang.String msg)
          cvt3x3NghToStr() - print 3x3 neighborhood at (pix,x,y) in I10:I18 vars.
static java.lang.String cvt3x3NghToStr(int[] pix, int x, int y, int radix, int fWidth, java.lang.String msg)
          cvt3x3NghToStr() - print 3x3 neighborhood at (pix,x,y) in I10:I18 vars.
static java.lang.String cvt3x3NghToStr(int[] pix, int x, int y, java.lang.String msg)
          cvt3x3NghToStr() - print 3x3 neighborhood at (pix,x,y) in I10:I18 vars.
static void cvtJ13x13toOD()
          cvtJ13x13toOD() - convert 13x13 Jij data gray to scaled OD using the scaled gray2cal[] map data (i.e., OD*1000) in the same Jij variables.
static void cvtJ13x17toOD()
          cvtJ13x17toOD() - cvt 13x17 Sg2glb.{jxy} data gray to OD*1000 before average the current line.
static float delSqGxy(int xI, int yI, int sxI, int syI)
          delSqGxy() - compute the laplacian of the gaussian function x,y with std deviations sx, sy about (x=0, y=0).
private static int G13(int x, int y)
          G13() - compute gaussian(x,y) integer coefficient for filter
static void get13x13(int x)
          get13x13() - Fetch the 13X13 neighborhood of a point specified at pix1(y,x).
static void get13x17(int x)
          get13x17() - Fetch the 13X17 neighborhood of a point specified at pix1(y,x).
static boolean get4NghPix(char[] pix, int x, int y)
          get4NghPix() - load 3x3 4-neighbor i1j variables at (pix,x,y) into i1j vars as follows.
static boolean get4NghPix(int[] pix, int x, int y)
          get4NghPix() - load 3x3 4-neighbor i1j variables at (pix,x,y) into i1j vars as follows.
static void get5x5(int x)
          get5x5() - Fetch the 5X5 neighborhood of a point specified at pix1(y,x).
static void get7x7(int x)
          get7x7() - Fetch the 7X7 neighborhood of a point specified at pix1(y,x).
static boolean getNgh3x3Pix(char[] pix, int x, int y)
          getNgh3x3Pix() - load 3x3 neighborhood at (pix,x,y) in I10:I18 vars.
static void getNgh3x3Pix(int[] pix, int x, int y)
          getNgh3x3Pix() - load 3x3 neighborhood at (pix,x,y) in I10:I18 vars.
static void getNgh3x3PixOD(char[] pix, int x, int y)
          getNgh3x3PixOD() - load 3x3 neighborhood at (pix,x,y) mapped to integer scaled OD (i.e., od * 1000) in the I10:I18 vars.
static void getNgh3x3PixOD(int[] pix, int x, int y)
          getNgh3x3PixOD() - load 3x3 neighborhood at (pix,x,y) mapped to integer scaled OD (i.e., od * 1000) in the I10:I18 vars.
static float Gxy(int xI, int yI, float sxI, float syI)
          Gxy() - compute the gaussian function x,y with std deviations sx, sy about (x=0, y=0).
private static float Gxy13(int xI, int yI, float sxI, float syI)
          Gxy13() - compute the 13x13 gaussian function x,y with std deviations sx, sy about (x=0, y=0).
static int setupC13x13Gaussian(boolean useEllipseFlag)
          setupC13x13Gaussian() - create the 2D Gaussian convolution matrix Sg2glb.{cxy} of the ellipse or circle (depending on which G13(x,y) macro is used below).
static int setupC13x17Gaussian(boolean useEllipseFlag)
          Setupc13x17gaussian() - create the 2D Gaussian convolution matrix Sg2glb.{cxy} of the ellipse or circle (depending on which G13(x,y) macro is used below).
static void shiftJ13x13Ngh()
          shiftJ13x13Ngh() - shift 13x13 Sg2glb.{jxy} data neighborhood to left 1 pixel
static void shiftJ13x17Ngh()
          shiftJ13x17Ngh() - shift 13x17 Sg2glb.{jxy} data neighborhood to left 1 pixel
static void zeroJ13x13()
          zeroJ13x13() - Zero the j(i,k) of the 13x13 ellipse.
static void zeroJ13x17()
          zeroJ13x17() - Zero the Sg2glb.{jxy} of the 13x17 ellipse.
 
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

ALPHA

private static final float ALPHA
1 std dev as % of filter size

See Also:
Constant Field Values

sxI13

private static float sxI13
13x13 gaussian filter X std dev as % of filter size


syI13

private static float syI13
13x13 gaussian filter Y std dev as % of filter size


sxI

static float sxI
X std deviation for gaussian generation


syI

static float syI
X std deviation for gaussian generation


d13x13Sum

private static int d13x13Sum
Sum of density in 13x13 filter. A value of 0 will trigger setupC13x13Gaussian()


d13x17Sum

private static int d13x17Sum
Sum of density in 13x17 filter. A value of 0 will trigger setupC13x17Gaussian()

Constructor Detail

Sg2ngh

public Sg2ngh()
Sg2ngh() - Constructor

Method Detail

getNgh3x3Pix

public static final void getNgh3x3Pix(int[] pix,
                                      int x,
                                      int y)
getNgh3x3Pix() - load 3x3 neighborhood at (pix,x,y) in I10:I18 vars. Data is returned in Sg2glb.{ixy}
    i13 i12 i11
    i14 i18 i10
    i15 i16 i17

Parameters:
pix - is the image to get
x - is x coordinate
y - is y coordinate

getNgh3x3Pix

public static final boolean getNgh3x3Pix(char[] pix,
                                         int x,
                                         int y)
getNgh3x3Pix() - load 3x3 neighborhood at (pix,x,y) in I10:I18 vars. Data is returned in Sg2glb.{ixy}
    i13 i12 i11
    i14 i18 i10
    i15 i16 i17

Parameters:
pix - is the image to get
x - is x coordinate
y - is y coordinate
Returns:
true if valid.

get4NghPix

public static final boolean get4NghPix(int[] pix,
                                       int x,
                                       int y)
get4NghPix() - load 3x3 4-neighbor i1j variables at (pix,x,y) into i1j vars as follows. Data is returned in Sg2glb.{ixy}
     -  i12  -
    i14  -  i10
     -  i16  -

Parameters:
pix - is the image to get
x - is x coordinate
y - is y coordinate
Returns:
true if valid

get4NghPix

public static final boolean get4NghPix(char[] pix,
                                       int x,
                                       int y)
get4NghPix() - load 3x3 4-neighbor i1j variables at (pix,x,y) into i1j vars as follows. Data is returned in Sg2glb.{ixy}
     -  i12  -
    i14  -  i10
     -  i16  -

Parameters:
pix - is the image to get
x - is x coordinate
y - is y coordinate
Returns:
true if valid

getNgh3x3PixOD

public static final void getNgh3x3PixOD(int[] pix,
                                        int x,
                                        int y)
getNgh3x3PixOD() - load 3x3 neighborhood at (pix,x,y) mapped to integer scaled OD (i.e., od * 1000) in the I10:I18 vars. Data is returned in Sg2glb.{ixy} NOTE: this assumes that a call to getNghPix(pix, x, y) has previously been made or the data will be incorrect.
    i13 i12 i11
    i14 i18 i10
    i15 i16 i17


getNgh3x3PixOD

public static final void getNgh3x3PixOD(char[] pix,
                                        int x,
                                        int y)
getNgh3x3PixOD() - load 3x3 neighborhood at (pix,x,y) mapped to integer scaled OD (i.e., od * 1000) in the I10:I18 vars. Data is returned in Sg2glb.{ixy} NOTE: this assumes that a call to getNghPix(pix, x, y) has previously been made or the data will be incorrect.
    i13 i12 i11
    i14 i18 i10
    i15 i16 i17


cvt3x3NghToStr

public static final java.lang.String cvt3x3NghToStr(int[] pix,
                                                    int x,
                                                    int y,
                                                    java.lang.String msg)
cvt3x3NghToStr() - print 3x3 neighborhood at (pix,x,y) in I10:I18 vars.
    i13 i12 i11
    i14 i18 i10
    i15 i16 i17

Parameters:
pix - is the image to get
x - is x coordinate
y - is y coordinate
msg - is the associated message
Returns:
string

cvt3x3NghToStr

public static final java.lang.String cvt3x3NghToStr(char[] pix,
                                                    int x,
                                                    int y,
                                                    java.lang.String msg)
cvt3x3NghToStr() - print 3x3 neighborhood at (pix,x,y) in I10:I18 vars.
    i13 i12 i11
    i14 i18 i10
    i15 i16 i17

Parameters:
pix - is the image to get
x - is x coordinate
y - is y coordinate
msg - is the associated message
Returns:
string

cvt3x3NghToStr

public static final java.lang.String cvt3x3NghToStr(int[] pix,
                                                    int x,
                                                    int y,
                                                    int radix,
                                                    int fWidth,
                                                    java.lang.String msg)
cvt3x3NghToStr() - print 3x3 neighborhood at (pix,x,y) in I10:I18 vars. Use the radix and field width to get more flexible printouts.
    i13 i12 i11
    i14 i18 i10
    i15 i16 i17

Parameters:
pix - is the image to get
x - is x coordinate
y - is y coordinate
radix - is Util.SHOW_xxxx (DECIMAL, OCTAL, HEX, OD)
fWidth - to force the data
msg - is the associated message
Returns:
string

cvt3x3NghToStr

public static final java.lang.String cvt3x3NghToStr(char[] pix,
                                                    int x,
                                                    int y,
                                                    int radix,
                                                    int fWidth,
                                                    java.lang.String msg)
cvt3x3NghToStr() - print 3x3 neighborhood at (pix,x,y) in I10:I18 vars. Use the radix and field width to get more flexible printouts.
    i13 i12 i11
    i14 i18 i10
    i15 i16 i17

Parameters:
pix - is the image to get
x - is x coordinate
y - is y coordinate
radix - is Util.SHOW_xxxx (DECIMAL, OCTAL, HEX, OD)
fWidth - to force the data
msg - is the associated message
Returns:
string

Gxy

public static final float Gxy(int xI,
                              int yI,
                              float sxI,
                              float syI)
Gxy() - compute the gaussian function x,y with std deviations sx, sy about (x=0, y=0).


delSqGxy

public static final float delSqGxy(int xI,
                                   int yI,
                                   int sxI,
                                   int syI)
delSqGxy() - compute the laplacian of the gaussian function x,y with std deviations sx, sy about (x=0, y=0).


get5x5

public static final void get5x5(int x)
get5x5() - Fetch the 5X5 neighborhood of a point specified at pix1(y,x). If a pixel is outside the border, it will return garbage! The data is assumed in the pix1 Sg2glb.bfOg- data buffers. Data is returned in Sg2glb.{jxy}
  j11 j12 j13 j14 j15
  j21 j22 j23 j24 j25
  j31 j32 j33 j34 j35
  j41 j42 j43 j44 j45
  j51 j52 j53 j54 j55


get7x7

public static final void get7x7(int x)
get7x7() - Fetch the 7X7 neighborhood of a point specified at pix1(y,x). If a pixel is outside the border, it will return garbage! The data is assumed in the pix1 Sg2glb.bfOg- data buffers. Data is returned in Sg2glb.{jxy}
 j11 j12 j13 j14 j15 j16 j17
 j21 j22 j23 j24 j25 j26 j27
 j31 j32 j33 j34 j35 j36 j37
 j41 j42 j43 j44 j45 j46 j47
 j51 j52 j53 j54 j55 j56 j57
 j61 j62 j63 j64 j65 j66 j67
 j71 j72 j73 j74 j75 j76 j77


zeroJ13x13

public static final void zeroJ13x13()
zeroJ13x13() - Zero the j(i,k) of the 13x13 ellipse. Data is returned in Sg2glb.{jxy}


Gxy13

private static final float Gxy13(int xI,
                                 int yI,
                                 float sxI,
                                 float syI)
Gxy13() - compute the 13x13 gaussian function x,y with std deviations sx, sy about (x=0, y=0).


G13

private static final int G13(int x,
                             int y)
G13() - compute gaussian(x,y) integer coefficient for filter

Parameters:
x -
y -
Returns:
G13(x,y) scaled by 1000

setupC13x13Gaussian

public static final int setupC13x13Gaussian(boolean useEllipseFlag)
setupC13x13Gaussian() - create the 2D Gaussian convolution matrix Sg2glb.{cxy} of the ellipse or circle (depending on which G13(x,y) macro is used below).

Parameters:
useEllipseFlag - to use 13x17 ellipse else 13x13 circle
Returns:
sum of coefficients.

shiftJ13x13Ngh

public static final void shiftJ13x13Ngh()
shiftJ13x13Ngh() - shift 13x13 Sg2glb.{jxy} data neighborhood to left 1 pixel


cvtJ13x13toOD

public static final void cvtJ13x13toOD()
cvtJ13x13toOD() - convert 13x13 Jij data gray to scaled OD using the scaled gray2cal[] map data (i.e., OD*1000) in the same Jij variables. We do this BEFORE we average the current line.


convolve13x13Gaussian

public static final int convolve13x13Gaussian()
convolve13x13Gaussian() - convolve 13x13 J * C arrays. Using the c11 ... cdh symmetric Gaussian matrix (scaled by 1000).
 in j11 ... j1h     c11 ... c1h
        ...      X      ...
    jd1 ... jdh     cd1 ... cdh
 centered at (7,9).
Matrix J is convolved with the symmetric filter (illustrated by ULH quadrant with the cental point shown). We scale all entries by 1000 in order to avoid floating point arithmetic: Normalize it by the sume of the values in the C matrix (i.e. d13x13sum).


get13x13

public static final void get13x13(int x)
get13x13() - Fetch the 13X13 neighborhood of a point specified at pix1(y,x). If a pixel is outside the border, it will return garbage! The data is assumed in the pix1 Sg2glb.bfOg- data buffers.
 j13 j14 j15 j16 j17 j18 j19 j1a j1b j1c j1d j1e j1f
 j23 j24 j25 j26 j27 j28 j29 j2a j2b j2c j2d j2e j2f
               . . .
 jd3 jd4 jd5 jd6 jd7 jd8 jd9 jda jdb jdc jdd jde jdf


zeroJ13x17

public static final void zeroJ13x17()
zeroJ13x17() - Zero the Sg2glb.{jxy} of the 13x17 ellipse.


setupC13x17Gaussian

public static final int setupC13x17Gaussian(boolean useEllipseFlag)
Setupc13x17gaussian() - create the 2D Gaussian convolution matrix Sg2glb.{cxy} of the ellipse or circle (depending on which G13(x,y) macro is used below).

Parameters:
useEllipseFlag - to use 13x17 ellipse else 13x13 circle
Returns:
sum of coefficients.

shiftJ13x17Ngh

public static final void shiftJ13x17Ngh()
shiftJ13x17Ngh() - shift 13x17 Sg2glb.{jxy} data neighborhood to left 1 pixel


cvtJ13x17toOD

public static final void cvtJ13x17toOD()
cvtJ13x17toOD() - cvt 13x17 Sg2glb.{jxy} data gray to OD*1000 before average the current line.


convolve13x17Gaussian

public static final int convolve13x17Gaussian()
convolve13x17Gaussian() - convolve 13x17 Sg2glb.{jxy * cxy} arrays. Using the c11 ... cdh symmetric Gaussian matrix (scaled by 1000).
 in j11 ... j1h     c11 ... c1h
        ...      X      ...
    jd1 ... jdh     cd1 ... cdh
 Matrix J is convolved with the symmetric filter (illustrated by ULH
 quadrant with the cental point shown). We scale all entries by 1000
 in order to avoid floating point arithmetic:

 Normalize it by the sume of the values in the C matrix
 (i.e. d13x17sum).


get13x17

public static final void get13x17(int x)
get13x17() - Fetch the 13X17 neighborhood of a point specified at pix1(y,x). If a pixel is outside the border, it will return garbage! The data is assumed in the pix1 Sg2glb.bfOg- data buffers. Data is returned in Sg2glb.{jxy}
 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 1g 1h
 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 2g 2h
                 . . .
 d1 d2 d3 d4 d5 d6 d7 d8 d9 da db dc dd de df dg dh


convolve13x17Laplacian

public static final int convolve13x17Laplacian()