|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object Seg2Dgel.Sg2glb Seg2Dgel.Sg2draw
public class Sg2draw
Class Sg2draw is used to draw overlay text, dots, plus and boundarys in segmented output images used by the Seg2Dgel.
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 | |
---|---|
static int |
FONT4X6
Font size codes for drawtext...() |
static int |
FONT5X7
Font size codes for drawtext...() |
Constructor Summary | |
---|---|
Sg2draw()
Sg2draw() - Constructor |
Method Summary | |
---|---|
void |
drawBoundariesForSpots(char[] pix,
int color)
drawBoundariesForSpots() - If generating the segmented spot image in pix5, and the -DRAWSPOTS:B<'O'riginal or 'Z'image> was set, draw a white boundary around each spot in the 'O'riginal or segmented 'Z' image (-DRAWSPOTS:BO default). |
void |
drawBoundariesForSpots(int[] pix,
int color)
drawBoundariesForSpots() - If generating the segmented spot image in pix5, and the -DRAWSPOTS:B<'O'riginal or 'Z'image> was set, draw a white boundary around each spot in the 'O'riginal or segmented 'Z' image (-DRAWSPOTS:BO default). |
void |
drawDotsInSpots(char[] pix,
int color)
drawDotsInSpots() - If generating the segmented spot image in pix5, and the -drawDots, -drawPlus, -drawBoundary, -drawMinEnclRect, or -drawSxSyEllipse switch was set, then draw a color dot or plus in the center of each spot. |
void |
drawTextInPix(char[] pix,
int x0,
int y0,
java.lang.String str,
int gray,
int font,
int zoom,
int pixWidth,
int pixHeight,
boolean clrBkgrdFlag)
drawTextInPix() - Display the string 'str' starting at (x0,y0) in specified 'gray' value in either of two charcter sizes 4x6 (upper case only: font=0); or 5x7 (upper/lower case: font=1) and a 'zoom' factor of 1X (default) to 64X. |
void |
drawTextInPix(int[] pix,
int x0,
int y0,
java.lang.String str,
int gray,
int font,
int zoom,
int pixWidth,
int pixHeight,
boolean clrBkgrdFlag)
drawTextInPix() - Display the string 'str' starting at (x0,y0) in specified 'gray' value in either of two charcter sizes 4x6 (upper case only: font=0); or 5x7 (upper/lower case: font=1) and a 'zoom' factor of 1X (default) to 64X. |
void |
drawTitleInPix(DbSample dbSample,
java.lang.String pixFile,
char[] pix)
drawTitleInPix() - draw title in char[] pix |
void |
drawTitleInPix(java.lang.String pixFile,
int[] pix)
drawTitleInPix() - draw title in int[] pix |
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 final int FONT4X6
public static final int FONT5X7
Constructor Detail |
---|
public Sg2draw()
Method Detail |
---|
public void drawTextInPix(int[] pix, int x0, int y0, java.lang.String str, int gray, int font, int zoom, int pixWidth, int pixHeight, boolean clrBkgrdFlag)
NOTE: Only 7-bits of the 8-bit ASCII character are used. NOTE: These fonts are hardwired!
pix
- is the picture buffer to draw text inx0
- is the upper left hand corner of box to draw text iny0
- is the upper left hand corner of box to draw text instr
- is the text string to draw in pixgray
- is the color of textfont
- is the font code: FONT4X6, FONT5X7zoom
- is the zoom factor 1X (default) to 64X maxpixWidth
- is image widthpixHeight
- is image heightclrBkgrdFlag
- - if set, clear background w/complent graypublic void drawTextInPix(char[] pix, int x0, int y0, java.lang.String str, int gray, int font, int zoom, int pixWidth, int pixHeight, boolean clrBkgrdFlag)
NOTE: Only 7-bits of the 8-bit ASCII character are used. NOTE: These fonts are hardwired!
pix
- is the picture buffer to draw text inx0
- is the upper left hand corner of box to draw text iny0
- is the upper left hand corner of box to draw text instr
- is the text string to draw in pixgray
- is the color of textfont
- is the font code: FONT4X6, FONT5X7zoom
- is the zoom factor 1X (default) to 64X maxpixWidth
- is image widthpixHeight
- is image heightclrBkgrdFlag
- - if set, clear background w/complent graypublic void drawTitleInPix(java.lang.String pixFile, int[] pix)
pixFile
- is name of corresponding imagepix
- is the picture buffer to draw text inpublic void drawTitleInPix(DbSample dbSample, java.lang.String pixFile, char[] pix)
dbSample
- to get infopixFile
- is name of corresponding imagepix
- is the picture buffer to draw text inpublic void drawDotsInSpots(char[] pix, int color)
pix
- is the picture buffer to draw text incolor
- is the color to draw the textpublic void drawBoundariesForSpots(char[] pix, int color)
pix
- is the picture buffer to draw text incolor
- is the color to draw the textpublic void drawBoundariesForSpots(int[] pix, int color)
pix
- is the picture buffer to draw text incolor
- is the color to draw the text
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |