|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectSeg2Dgel.Sg2glb
Seg2Dgel.Sg2ngh
public class Sg2ngh
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/.
| 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 |
| 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 |
|---|
private static final float ALPHA
private static float sxI13
private static float syI13
static float sxI
static float syI
private static int d13x13Sum
private static int d13x17Sum
| Constructor Detail |
|---|
public Sg2ngh()
| Method Detail |
|---|
public static final void getNgh3x3Pix(int[] pix,
int x,
int y)
i13 i12 i11
i14 i18 i10
i15 i16 i17
pix - is the image to getx - is x coordinatey - is y coordinate
public static final boolean getNgh3x3Pix(char[] pix,
int x,
int y)
i13 i12 i11
i14 i18 i10
i15 i16 i17
pix - is the image to getx - is x coordinatey - is y coordinate
public static final boolean get4NghPix(int[] pix,
int x,
int y)
- i12 -
i14 - i10
- i16 -
pix - is the image to getx - is x coordinatey - is y coordinate
public static final boolean get4NghPix(char[] pix,
int x,
int y)
- i12 -
i14 - i10
- i16 -
pix - is the image to getx - is x coordinatey - is y coordinate
public static final void getNgh3x3PixOD(int[] pix,
int x,
int y)
i13 i12 i11
i14 i18 i10
i15 i16 i17
public static final void getNgh3x3PixOD(char[] pix,
int x,
int y)
i13 i12 i11
i14 i18 i10
i15 i16 i17
public static final java.lang.String cvt3x3NghToStr(int[] pix,
int x,
int y,
java.lang.String msg)
i13 i12 i11
i14 i18 i10
i15 i16 i17
pix - is the image to getx - is x coordinatey - is y coordinatemsg - is the associated message
public static final java.lang.String cvt3x3NghToStr(char[] pix,
int x,
int y,
java.lang.String msg)
i13 i12 i11
i14 i18 i10
i15 i16 i17
pix - is the image to getx - is x coordinatey - is y coordinatemsg - is the associated message
public static final java.lang.String cvt3x3NghToStr(int[] pix,
int x,
int y,
int radix,
int fWidth,
java.lang.String msg)
i13 i12 i11
i14 i18 i10
i15 i16 i17
pix - is the image to getx - is x coordinatey - is y coordinateradix - is Util.SHOW_xxxx (DECIMAL, OCTAL, HEX, OD)fWidth - to force the datamsg - is the associated message
public static final java.lang.String cvt3x3NghToStr(char[] pix,
int x,
int y,
int radix,
int fWidth,
java.lang.String msg)
i13 i12 i11
i14 i18 i10
i15 i16 i17
pix - is the image to getx - is x coordinatey - is y coordinateradix - is Util.SHOW_xxxx (DECIMAL, OCTAL, HEX, OD)fWidth - to force the datamsg - is the associated message
public static final float Gxy(int xI,
int yI,
float sxI,
float syI)
public static final float delSqGxy(int xI,
int yI,
int sxI,
int syI)
public static final void get5x5(int x)
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
public static final void get7x7(int x)
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
public static final void zeroJ13x13()
private static final float Gxy13(int xI,
int yI,
float sxI,
float syI)
private static final int G13(int x,
int y)
x - y -
public static final int setupC13x13Gaussian(boolean useEllipseFlag)
useEllipseFlag - to use 13x17 ellipse else 13x13 circle
public static final void shiftJ13x13Ngh()
public static final void cvtJ13x13toOD()
public static final int convolve13x13Gaussian()
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).
public static final void get13x13(int x)
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
public static final void zeroJ13x17()
public static final int setupC13x17Gaussian(boolean useEllipseFlag)
useEllipseFlag - to use 13x17 ellipse else 13x13 circle
public static final void shiftJ13x17Ngh()
public static final void cvtJ13x17toOD()
public static final int convolve13x17Gaussian()
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).
public static final void get13x17(int x)
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
public static final int convolve13x17Laplacian()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||