|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--DrawPseudoImage
Class to draw microarray data (ratio, intensity, p-value, etc) as a pseudoarray image. The image is eventually displayed using ScrollableImageCanvas. Note the Pseudoarray image size is fixed and is mae.(pWidth,pHeight). The pseudoarray image is updated when mae.updatePseudoImgFlag is set by many different processes including the PopupRegistry when the normalization, Filter.workingCL, or other state values change.
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 MAExplorer Mozilla and Legal files are available on http://maexplorer.sourceforge.net/.
Field Summary | |
private java.awt.Font |
font
regular font |
private java.awt.Font |
fontHdr
Header font |
private int |
guardRegion
# pixels in target image on each edge |
(package private) java.awt.Point[] |
hpXYpseudoImgList
list of HP names [mae.hps.nHP+1] |
private int |
iFontHdrSize
integer header font size is 2+ regular size unless the latter is 12pt in which case the header font size is also 12 pt. |
private int |
iFontSize
integer regular font size |
private MAExplorer |
mae
link to global MAExplorer instance |
(package private) static int |
MAX_COLORS
[Dark green:dark red] - MUST BE ODD #!!! |
private int |
maxLeftLabelPixelsWidth
max # pixels in left labels |
(package private) float |
rangeInc
PseudoArray image color range increment |
(package private) java.awt.Color[] |
ratioColor
color table used for PseudoArray image color mapping |
(package private) float[] |
ratioRange
ratio range for values used in PseudoArray image color mapping |
(package private) boolean |
setHPXflag
set HP-X (HP-Y) if click on sample name |
(package private) java.awt.Color[] |
spectrumColor
color table used for PseudoArray image color spectrum color mapping |
(package private) float[] |
spectrumRange
range of values for values used in PseudoArray image color spectrum mapping |
private boolean |
useRYGcolorsFlag
flag: color for ratio data. |
private int |
xSpotOffset
add to orig data coords x_textQ[] |
private int |
ySpotOffset
add to orig data coords y_textQ[] |
Constructor Summary | |
(package private) |
DrawPseudoImage(MAExplorer mae)
DrawPseudoImage() - constructor |
Method Summary | |
(package private) java.lang.String |
clipStrToWidth(java.lang.String str,
int maxPixelWidth,
int maxSubStrLen,
java.awt.Graphics g,
java.awt.Font font)
clipStrToWidth() - clip string to maxPixelWidth and font char width. |
private void |
drawFilledColoredCircle(java.awt.Graphics g,
int x,
int y,
int radius,
java.awt.Color color)
drawFilledColoredCircle() - draw filled circle of specified color. |
private void |
drawFilledColoredCircle(java.awt.Graphics g,
int x,
int y,
int radius,
int red,
int green,
int blue)
drawFilledColoredCircle() - draw filled circle of specified color Clip colors to [0:255]. |
private void |
drawFilledGrayCircle(java.awt.Graphics g,
int x,
int y,
int radius,
int grayValue)
drawFilledGrayCircle() - draw filled circle of specified grayvalue [0:255]. |
private void |
drawGridLabelsInImage(MaHybridSample ms,
java.awt.Graphics g,
boolean isRatioPlot,
boolean isDualPseudoImageFlag)
drawGridLabelsInImage() - draw ms.textQ[] in the image at (x,y)[] locations. |
private void |
drawPlus(java.awt.Graphics g,
int x,
int y,
java.awt.Color color)
drawPlus() - draw plus sign using specified color. |
(package private) void |
drawPseudoImage(java.awt.Graphics gi,
int piWidth,
int piHeight,
int plotMode,
MaHybridSample ms)
drawPseudoImage() - draw pseudoarray image of filled grayscale circles using the totC[] density values. |
private void |
drawScaleMap(java.awt.Graphics gi,
boolean isRatioPlot,
boolean useRYGcolorsFlag,
float minI,
float maxI)
drawScaleMap() - draw color scale map on the left of the canvas |
private void |
setFontsFromState()
setFontsFromState() - set the regular and header fonts from the state variables |
private void |
setPseudoColorRange()
setPseudoColorRange() - set isZscoreLog flag and pseudocolor range. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private MAExplorer mae
static final int MAX_COLORS
private boolean useRYGcolorsFlag
java.awt.Color[] ratioColor
float rangeInc
float[] ratioRange
java.awt.Color[] spectrumColor
float[] spectrumRange
private int maxLeftLabelPixelsWidth
private int xSpotOffset
private int ySpotOffset
private int guardRegion
private int iFontSize
private int iFontHdrSize
private java.awt.Font font
private java.awt.Font fontHdr
boolean setHPXflag
java.awt.Point[] hpXYpseudoImgList
Constructor Detail |
DrawPseudoImage(MAExplorer mae)
mae
- is the MAExplorer instancesetPseudoColorRange()
Method Detail |
private void setPseudoColorRange()
Util.setupColorRatioRange(float, java.awt.Color[], float[], int, boolean)
,
Util.setupColorSpectrumRange(java.awt.Color[], float[], int, boolean)
private void drawPlus(java.awt.Graphics g, int x, int y, java.awt.Color color)
g
- is graphics contextx
- is center of objecty
- is center of objectcolor
- is color to drawprivate void drawFilledGrayCircle(java.awt.Graphics g, int x, int y, int radius, int grayValue)
g
- is graphics contextx
- is center of objecty
- is center of objectradius
- of objectgrayValue
- is the gray value color to drawprivate void drawFilledColoredCircle(java.awt.Graphics g, int x, int y, int radius, int red, int green, int blue)
g
- is graphics contextx
- is center of objecty
- is center of objectradius
- of objectred
- is the red color componentgreen
- is the green color componentblue
- is the blue color componentprivate void drawFilledColoredCircle(java.awt.Graphics g, int x, int y, int radius, java.awt.Color color)
g
- is graphics contextx
- is center of objecty
- is center of objectradius
- of objectcolor
- is the color to drawjava.lang.String clipStrToWidth(java.lang.String str, int maxPixelWidth, int maxSubStrLen, java.awt.Graphics g, java.awt.Font font)
str
- is the string to possibly clipmaxPixelWidth
- is the maximum pixel widthmaxSubStrLen
- is the max substring lengthg
- is graphics contextfont
- is the current font being usedprivate void setFontsFromState()
private void drawScaleMap(java.awt.Graphics gi, boolean isRatioPlot, boolean useRYGcolorsFlag, float minI, float maxI)
gi
- is graphics contextisRatioPlot
- indicates doing a ratio rather than intensity plotuseRYGcolorsFlag
- using additive colors rather than lookup mapminI
- minimum intensitymaxI
- maximum intensityclipStrToWidth(java.lang.String, int, int, java.awt.Graphics, java.awt.Font)
private void drawGridLabelsInImage(MaHybridSample ms, java.awt.Graphics g, boolean isRatioPlot, boolean isDualPseudoImageFlag)
ms
- is sample being usedg
- is graphics contextisRatioPlot
- is ratio plot rather than intensity plotisDualPseudoImageFlag
- shows two arrays side by sideSampleSets.setHPxyModStrings()
void drawPseudoImage(java.awt.Graphics gi, int piWidth, int piHeight, int plotMode, MaHybridSample ms)
PLOT_PSEUDOIMG - gray value white to black PLOT_PSEUDO_HP_XY_P_VALUE_IMG - pValue[0.0:1.0] spectrum value white to black PLOT_PSEUDO_HP_EP_CV_VALUE_IMG - pValue[0.0:1.0] spectrum value white to black PLOT_PSEUDOCOLOR_HP_XY_RYG_IMG - sum Red(X)+Green(Y) is Red,yellow,green PLOT_PSEUDO_F1F2_RYG_IMG - sum Red(F2)+Green(F1) is Red,yellow,green PLOT_PSEUDOCOLOR_HP_XY_IMG - ratio X/Y is Red,black,green PLOT_PSEUDOCOLOR_F1F2_IMG - ratio F1/F2 is Red,black,greenNOTE: currently it maps data to either RGB or 0:255 grayscale.
gi
- is graphics contextpiWidth
- is width of imagepiHeight
- is height of imageplotMode
- is type of imagems
- is sample being plottedHPxyData.updateDataAndStat(int)
,
MaHybridSample.computeMinMaxF1F2Data(boolean, boolean)
,
MaHybridSample.getDataByGID(int, boolean, int)
,
MaHybridSample.getSpotDataStatic(int, boolean)
,
MaHybridSample.getSpotData12Static(int, int, boolean)
,
Statistics.calcTandPvalues(int, int, double, double, double, double)
,
Util.setRatioColor(float, java.awt.Color[], float[], int)
,
drawFilledColoredCircle(java.awt.Graphics, int, int, int, int, int, int)
,
drawGridLabelsInImage(MaHybridSample, java.awt.Graphics, boolean, boolean)
,
drawScaleMap(java.awt.Graphics, boolean, boolean, float, float)
,
setPseudoColorRange()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |