|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSpot
public class Spot
Class Spot contains the spot structure for measured spots.
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 Flicker Mozilla and Legal files are available on http://open2dprot.sourceforge.net/Flicker
Field Summary | |
---|---|
(package private) float |
area
spot area in pixels |
(package private) float |
bkgrd
total spot mean background density |
private boolean |
changedFlag
edited the spot flag |
(package private) int |
circleRadius
he radius of the circlular mask |
(package private) float |
density
total density uncorrected for background computed as the sum of the gray value or calibrated gray value (i.e. |
(package private) float |
densPrime
total density corrected for background by computed as: densPrime = (density - mnBkgrd*area) |
(package private) float |
dMax
spot MAX OD |
(package private) float |
dMaxBkgrd
background for spot MAX OD or gray value |
(package private) float |
dMin
spot MIN OD |
(package private) float |
dMinBkgrd
background for spot MIN OD or gray value |
private static java.awt.Frame |
fBoth
Frame to create and popup when you edit |
static FileIO |
fio
FileIO utilities |
private static Flicker |
flk
instance of Flicker |
static java.lang.String[] |
fNames
names of the spot fields |
private static java.awt.Frame |
fOne
Frame to create and popup when you edit |
(package private) java.lang.String |
id
Optional associated identifier string if not null. |
static int |
idxID
index of "id" field in fNames table. |
(package private) boolean |
isCalibFlag
measurements are in calibrated OD rather than grayscale |
(package private) float |
mnBkgrd
mean spot mean background density |
(package private) float |
mnDens
mean density |
(package private) float |
mnDensPrime
mean density corrected for background (mnDensPrime - mnBkgrd) |
(package private) java.lang.String |
name
Optional associated protein string if not null. |
(package private) int |
nbr
measurement number of spot unique to the associated gel |
(package private) int |
nCirMask
circular mask diameter = 2*circleRadius+1 |
(package private) int |
nGel
Gel# (1 or 2) for "left" or "right" image. |
static int |
nRows
# of names for the spot fields |
(package private) static int |
POPUP_HEIGHT
default frame size height of popup |
(package private) static int |
POPUP_WIDTH
default frame size width of popup |
int |
preferredHeight
preferred canvas height |
int |
preferredWidth
preferred canvas width |
private Spot |
s1
Left Spot 1 if editing both spots |
private Spot |
s2
Right Spot 2 if editing both spots |
private static java.awt.TextField[][] |
spotTable
spot Editable table [nRows][2] |
private static java.awt.TextField[][] |
spotTableBoth
spot Editable table [nRows][3] that handles spots in s1 [1] and spots in s2 [2]. |
private java.awt.Label |
statusLabel
status Label |
(package private) float |
totDens
total density over the measurement area |
(package private) boolean |
useTotDensityFlag
measurements total density else mean values |
private static Util |
util
misc utility methods |
(package private) int |
xB
background x centroid |
(package private) int |
xC
spot X centroid |
(package private) int |
yB
background Y centroid |
(package private) int |
yC
spot Y centroid |
Constructor Summary | |
---|---|
Spot()
Spot() - Constructor for new Spot |
|
Spot(Flicker flkS)
Spot() - setup Spot part of the database |
|
Spot(int nGel,
int nbr,
java.lang.String id,
java.lang.String name,
int nCirMask,
int circleRadius,
int xC,
int yC,
int xB,
int yB,
float area,
boolean isCalibFlag,
boolean useTotDensityFlag,
float density,
float densPrime,
float bkgrd,
float mnDens,
float totDens,
float mnDensPrime,
float mnBkgrd,
float dMax,
float dMin,
float dMaxBkgrd,
float dMinBkgrd)
Spot() - Constructor for new Spot with data |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
actionPerformed() - Handle Control panel button clicks |
void |
close()
close() - close this popup and reset flags if needed [TODO] If they edited the calibration and peak calibration table, and they did not save the calibration (i.e. |
java.lang.String |
cvSpot2Str(java.lang.String imageName,
java.lang.String unitsAbbrev)
cvSpot2Str() - convert spot to printable string |
java.lang.String |
getID()
getID() - get the spot ID |
java.awt.Dimension |
getMinimumSize()
getMinimumSize() - get the minimum preferred size |
java.awt.Dimension |
getPreferredSize()
getPreferredSize() - get the preferred size |
java.lang.String |
getValBySpotFieldName(java.lang.String sName)
getValBySpotFieldName() - get spot value string by spot field name |
static java.lang.String |
listPairedSpotListDataTabDelim(boolean normByMeanSpotListFlag)
listPairedSpotListDataTabDelim() - generate a tab-delimited string table of the paired spots (by matching spot id's) in the spot list. |
static java.lang.String |
listSpotListData(java.lang.String imageName,
java.lang.String units,
Spot[] spotList,
int nSpots)
listSpotListData() - generate a string list of the spots in the spot list |
static java.lang.String |
listSpotListDataTabDelim(java.lang.String imageName,
java.lang.String unitsAbbrev,
Spot[] spotList,
int nSpots)
listSpotListDataTabDelim() - generate a tab-delimited string table of of the spots in the spot list. |
boolean |
popupSpotEdit(boolean editOnlyIDflag)
popupSpotEdit() - popup a spot editing function to change the spot. |
boolean |
popupSpotEditBoth(Spot s1,
Spot s2,
boolean editOnlyIDflag)
popupSpotEditBoth() - popup a spot editing function to let you edit two selected (putatively paired) spots together Edit the data in 3 columns with the field name on the left column the left image data in the middle column and the right image data in the right column. |
void |
positionWindow(java.awt.Frame f)
positionWindow() - position window on the screen |
(package private) static Spot[] |
readState(java.lang.String gelFile,
java.lang.String iName)
readState() - Read spotList[] "spt/ |
static boolean |
rmvSpotListFile(java.lang.String gelFile,
java.lang.String iName)
rmvSpotListFile() - clear the .spt file from the spt/ directory by moving the spt/ |
void |
set(int nGel,
int nbr,
java.lang.String id,
java.lang.String name,
int nCirMask,
int circleRadius,
int xC,
int yC,
int xB,
int yB,
float area,
boolean isCalibFlag,
boolean useTotDensityFlag,
float density,
float densPrime,
float bkgrd,
float mnDens,
float totDens,
float mnDensPrime,
float mnBkgrd,
float dMax,
float dMin,
float dMaxBkgrd,
float dMinBkgrd)
set() - set the data for a spot with new data |
void |
setID(java.lang.String id)
setID() - set the spot ID |
void |
setStatusMsg(java.lang.String msg)
setStatusMsg() - set the status msg |
void |
setStatusMsg(java.lang.String msg,
java.awt.Color color)
setStatusMsg() - set the status msg |
private boolean |
updateBothSpotsFromEditedSpotTable()
updateBothSpotsFromEditedSpotTable() - set both spots from the spotTableBoth table data |
private boolean |
updateSpotFromEditedSpotTable()
updateSpotFromEditedSpotTable() - set the spot from the table data |
void |
windowActivated(java.awt.event.WindowEvent e)
|
void |
windowClosed(java.awt.event.WindowEvent e)
|
void |
windowClosing(java.awt.event.WindowEvent e)
windowClosing() - close down the window. |
void |
windowDeactivated(java.awt.event.WindowEvent e)
|
void |
windowDeiconified(java.awt.event.WindowEvent e)
|
void |
windowIconified(java.awt.event.WindowEvent e)
|
void |
windowOpened(java.awt.event.WindowEvent e)
|
(package private) static boolean |
writeState(java.lang.String gelFile,
java.lang.String iName,
Spot[] spotList,
int nSpots)
writeState() - Write the spotlist[] to "spt/ |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static Flicker flk
public static FileIO fio
private static Util util
static final int POPUP_WIDTH
static final int POPUP_HEIGHT
public int preferredHeight
public int preferredWidth
int nGel
int nbr
java.lang.String id
java.lang.String name
int nCirMask
int circleRadius
int xC
int yC
int xB
int yB
float area
boolean isCalibFlag
boolean useTotDensityFlag
float density
float densPrime
float bkgrd
float mnDens
float totDens
float mnDensPrime
float mnBkgrd
float dMax
float dMin
float dMaxBkgrd
float dMinBkgrd
private static java.awt.Frame fOne
private static java.awt.Frame fBoth
public static java.lang.String[] fNames
public static int idxID
public static int nRows
private static java.awt.TextField[][] spotTable
private static java.awt.TextField[][] spotTableBoth
private Spot s1
private Spot s2
private java.awt.Label statusLabel
private boolean changedFlag
Constructor Detail |
---|
public Spot(Flicker flkS)
public Spot()
public Spot(int nGel, int nbr, java.lang.String id, java.lang.String name, int nCirMask, int circleRadius, int xC, int yC, int xB, int yB, float area, boolean isCalibFlag, boolean useTotDensityFlag, float density, float densPrime, float bkgrd, float mnDens, float totDens, float mnDensPrime, float mnBkgrd, float dMax, float dMin, float dMaxBkgrd, float dMinBkgrd)
nGel
- is the Gel# (1 or 2) rof "left" or "right" image.nbr
- is measurement number of spot unique to the associated gelid
- is the optional associated identifier string if not null.name
- is the optional associated protein name string if not null.nCirMask
- is the circular mask diametercircleRadius
- is the radius of the circlular maskxC
- is the spot X centroidyC
- is the spot Y centroidxB
- is background x centroidyB
- is background Y centroidarea
- is spot area in pixels (float so possibly scaled)isCalibFlag
- is measurements are in calibrated OD rather than grayscaleuseTotDensityFlag
- measurements total density else mean valuesdensity
- is the total density uncorrected for background computed as
the sum of the gray value or calibrated gray value (i.e. OD?)densPrime
- is the total density corrected for background by
computed as: densPrime = (density - mnBkgrd*area)bkgrd
- is the total spot mean background densitymnDens
- is the mean densitytotDens
- is the total density over the measurement areamnDensPrime
- is mean density corrected for background
computed as (mnDensPrime - mnBkgrd)mnBkgrd
- is the mean spot mean background densitydMax
- is spot MAX ODdMin
- is spot MIN ODdMaxBkgrd
- background for spot MAX OD or gray valuedMinBkgrd
- background for spot MIN OD or gray valueMethod Detail |
---|
public void set(int nGel, int nbr, java.lang.String id, java.lang.String name, int nCirMask, int circleRadius, int xC, int yC, int xB, int yB, float area, boolean isCalibFlag, boolean useTotDensityFlag, float density, float densPrime, float bkgrd, float mnDens, float totDens, float mnDensPrime, float mnBkgrd, float dMax, float dMin, float dMaxBkgrd, float dMinBkgrd)
nGel
- is the Gel# (1 or 2) rof "left" or "right" image.nbr
- is measurement number of spot unique to the associated gelid
- is the optional associated identifier string if not null.name
- is the optional associated protein name string if not null.nCirMask
- is the circular mask diametercircleRadius
- is the radius of the circlular maskxC
- is the spot X centroidyC
- is the spot Y centroidxB
- is background x centroidyB
- is background Y centroidarea
- is spot area in pixels (float so possibly scaled)isCalibFlag
- is measurements are in calibrated OD rather than grayscaleuseTotDensityFlag
- measurements total density else mean valuesdensity
- is the total density uncorrected for background computed as
the sum of the gray value or calibrated gray value (i.e. OD?)densPrime
- is the total density corrected for background by
computed as: densPrime = (density - mnBkgrd*area)bkgrd
- is the total spot mean background densitymnDens
- is the mean densitytotDens
- is the total density over the measurement areamnDensPrime
- is mean density corrected for background
computed as (mnDensPrime - mnBkgrd)mnBkgrd
- is the mean spot mean background densitydMax
- is spot MAX ODdMin
- is spot MIN ODdMaxBkgrd
- background for spot MAX OD or gray valuedMinBkgrd
- background for spot MIN OD or gray valuepublic java.lang.String getID()
public void setID(java.lang.String id)
the
- spot idstatic Spot[] readState(java.lang.String gelFile, java.lang.String iName)
gelFile
- is the file base name. We strip off the image type
and add ".spt"iName
- of the image to read (e.g., "I1", or "I2")
static boolean writeState(java.lang.String gelFile, java.lang.String iName, Spot[] spotList, int nSpots)
gelFile
- is the file base name. We strip off the image type
and add ".spt"iName
- of the image to read (e.g., "I1", or "I2")spotList
- is list of spots to write outsBuf
- is the string buffer to write to.
public static boolean rmvSpotListFile(java.lang.String gelFile, java.lang.String iName)
gelFile
- is the file base name. We strip off the image type
and add ".spt"iName
- of the image to remove (e.g., "I1", or "I2")
public java.lang.String cvSpot2Str(java.lang.String imageName, java.lang.String unitsAbbrev)
imageName
- is image nameunitsAbbrev
- is name of units abbreviation else "gray-scale"
public static java.lang.String listSpotListData(java.lang.String imageName, java.lang.String units, Spot[] spotList, int nSpots)
imageName
- is image nameunits
- is name of units else "gray-scale"spotList
- is list of spots to convertnspots
- to convert
public static java.lang.String listSpotListDataTabDelim(java.lang.String imageName, java.lang.String unitsAbbrev, Spot[] spotList, int nSpots)
imageName
- is image nameunitsAbbrev
- is name of units abbreviation else "gray-scale"spotList
- is list of spots to convertnspots
- to convert
public static java.lang.String listPairedSpotListDataTabDelim(boolean normByMeanSpotListFlag)
1. Both spot list must be measured with either Total or Mean densities, 2. Both spot lists must have the same calibration abbreviation units 3. Both spots that are paired must have the same annotation id spelling including case.This could be imported into Excel
normByMeanSpotListFlag
- normalize by the mean spot value of spots
in each of the corresponding spot lists.
public java.awt.Dimension getPreferredSize()
public java.awt.Dimension getMinimumSize()
public void positionWindow(java.awt.Frame f)
public boolean popupSpotEdit(boolean editOnlyIDflag)
editOnlyIDflag
- if only want to edit/assign the spot id
public boolean popupSpotEditBoth(Spot s1, Spot s2, boolean editOnlyIDflag)
s1
- is first spots2
- is second spoteditOnlyIDflag
- if only want to edit/assign the spot id
public void setStatusMsg(java.lang.String msg)
msg
- is the status window msgpublic void setStatusMsg(java.lang.String msg, java.awt.Color color)
msg
- is the status window msgcolor
- to draw itpublic java.lang.String getValBySpotFieldName(java.lang.String sName)
name
- of spot field
private boolean updateSpotFromEditedSpotTable()
private boolean updateBothSpotsFromEditedSpotTable()
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
e
- is ActionEvent for buttons in control panelpublic void close()
public void windowClosing(java.awt.event.WindowEvent e)
windowClosing
in interface java.awt.event.WindowListener
e
- is window closing eventclose()
public void windowOpened(java.awt.event.WindowEvent e)
windowOpened
in interface java.awt.event.WindowListener
public void windowActivated(java.awt.event.WindowEvent e)
windowActivated
in interface java.awt.event.WindowListener
public void windowClosed(java.awt.event.WindowEvent e)
windowClosed
in interface java.awt.event.WindowListener
public void windowDeactivated(java.awt.event.WindowEvent e)
windowDeactivated
in interface java.awt.event.WindowListener
public void windowDeiconified(java.awt.event.WindowEvent e)
windowDeiconified
in interface java.awt.event.WindowListener
public void windowIconified(java.awt.event.WindowEvent e)
windowIconified
in interface java.awt.event.WindowListener
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |