|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object O2Plib.db.DbSample
public class DbSample
Class DbSample defines information about a sample. The sample can contain spots derived from various sources for Open2Dprot.
The sample id described in the Sample Spot File (SSF) which includes state parameters. This class contains tab-delimited and XML readers and writers for SSF files. The SSF could eventually reside in the RDBMS. It may optionally contain various fields depennding on how it is used. It will ALWAYS contain the name and type of sample (i.e., Rsample or Sample). Optional fields include:
1. the input or file name if input is being performed. 2. the output file name depending if output is being performed. 3. the CalibrateOD calib calibration instance if it exists for the input pix. 4. the DbSpot spotList[] for the sample if spot lists are used. 5. Debugging state options, default is none. 6. the input image file specification and pix[] and related image info sample if input image is used. 7. the spot threshold sizing parameter ranges if used for spot segmentation 8. The summary SSF epilogue statistics if SSF input or output used. 9. The internal SSF Table if used.This file is derived from Open2Dprot CmpSpots's DbSample.java
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/.
Nested Class Summary | |
---|---|
(package private) class |
DbSample.SsfContentHandler
This class implements the SAX ContentHandler interface and defines callback behavior for the SAX callbacks associated with an XML document's content, stuffing data structures with correct data from xml files. |
(package private) class |
DbSample.SsfErrorHandler
SsfErrorHandlerclass implements the SAX ErrorHandler interface and defines callback behavior for the SAX callbacks associated with an XML document's warnings and errors. |
Field Summary | |
---|---|
DbAccession |
acc
The DbAccession database instance. |
java.lang.String[] |
accFieldNames
Accession database fields for this sample if not null |
java.lang.String[] |
accRowData
Accession database data for this sample if not null |
int |
areaIdx
Spot data Table de column field indices if tab-delimited tables are being used. |
java.lang.String |
baseSampleName
base sample name of the sample without either the path prefix or the file extension. |
java.lang.String |
baseSSFimageFileName
name of SSF input base file name from file [FUTURE] |
int |
bkgrdFilterSize
size of NxN zonal notch filter background estimator |
CalibrateOD |
calib
(Opt) CalibrateOD instance |
int |
ccMinSize
Minimum central core component size area threshold in pixels |
int |
ccNumberIdx
Spot data Table de column field indices if tab-delimited tables are being used. |
int |
countG
# spots in list. |
int |
countPairG
# spots in list. |
int |
ctrArea1Failed
# spots failed area1 sizing, i.e., below lower threshold |
int |
ctrArea2Failed
# spots failed area2 sizing, i.e., above lower threshold |
int |
ctrDensity1Failed
# spots failed density1 sizing, i.e., below lower threshold |
int |
ctrDensity2Failed
# spots failed density2 sizing, i.e., above lower threshold |
int |
ctrDR1Failed
# spots failed DR1 sizing, i.e., below lower threshold |
int |
ctrDR2Failed
# spots failed DR2 sizing, i.e., above lower threshold |
int |
ctrSxSy1Failed
# spots failed Sx/Sy sizing, i.e., above lower threshold |
int |
ctrSxSy2Failed
# spots failed Sx/Sy sizing, i.e., below upper threshold |
int |
cwx1
computing window ULHC coordinate x |
int |
cwx2
computing window LRHC coordinate x |
int |
cwy1
computing window ULHC coordinate y |
int |
cwy2
computing window LRHC coordinate y |
boolean |
dbugFlag
Debugging flag |
int |
dbx1
Debugging window for -debug: window |
int |
dbx2
Debugging window for -debug: window |
int |
dby1
Debugging window for -debug: window |
int |
dby2
Debugging window for -debug: window |
int |
densityIdx
Spot data Table de column field indices if tab-delimited tables are being used. |
int |
densityPrimeIdx
Spot data Table de column field indices if tab-delimited tables are being used. |
DbSpot |
firstSpot
first spot allocated in the linked spot list. |
DbPspot |
firstSpotPair
first spot allocated in the linked spotPairList[] spot-pair list. |
float |
glbPercentThr
Saturation threshold [0.0:1.0] , i.e. |
java.lang.String |
globalStats
Global statistics created at the preface and end of segmentation |
int |
idIdx
Spot data Table de column field indices if tab-delimited tables are being used. |
int |
idxSample
Index of this Sample instance in CSD database. |
java.lang.String |
inPixFile
full path name of the sample image file. |
int |
invalidCentroidsTot
# of invalid spot centroids found during spot quantification |
DbSpot |
lastSpot
last spot allocated (optional) |
DbPspot |
lastSpotPair
last spot allocated in the spotPairList[] spot-pair list (optional) |
static java.lang.String[] |
legalImageFileExtens
List of legal sample image file extensions |
DbSpot |
listG
point to first spot of full spot list - initialized to nulls. |
DbPspot |
listPairG
point to first spot of full spot list - initialized to nulls. |
static int |
MAX_BUFFERED_SPOTS
max # spots to buffer in memory when converting the list of spots to string representations. |
int |
maxAreaFound
Max area found in accepted spot |
float |
maxBkgrdDensity
max background seen in any spot |
int |
maxBkgrdTot
Max sample background grayscale (computed elsewhere) |
float |
maxCalibGrayFound
Max calibration grayscale found in accepted spot |
float |
maxDensityFound
Max density found in accepted spot |
int |
maxDensityIdx
Spot data Table de column field indices if tab-delimited tables are being used. |
float |
maxDensityPrimeFound
Max densityPrime found in accepted spot |
int |
maxGrayPixel
max Gray Pixel value in the image1 is (1< |
int |
maxSpotPairs
size of spotPairList[] |
int |
maxSpots
size of spotList |
static int |
MAXSPOTS
Default maximum number of spots (i.e.) in initial spot list These are the number of CC's. |
int |
meanBackgroundIdx
Spot data Table de column field indices if tab-delimited tables are being used. |
int |
meanDensityIdx
Spot data Table de column field indices if tab-delimited tables are being used. |
int |
merX1Idx
Spot data Table de column field indices if tab-delimited tables are being used. |
int |
merX2Idx
Spot data Table de column field indices if tab-delimited tables are being used. |
int |
merY1Idx
Spot data Table de column field indices if tab-delimited tables are being used. |
int |
merY2Idx
Spot data Table de column field indices if tab-delimited tables are being used. |
float |
minBkgrdDensity
min background seen in any spot |
int |
minBkgrdTot
Min sample background grayscale (computed elsewhere) |
int |
minDensityIdx
Spot data Table de column field indices if tab-delimited tables are being used. |
int |
nBitsPerPixel
# of bits/pixel in the image1 |
int |
nBytesPerPixel
# of bytes/pixel in the image1 |
int |
nCCread
# spots actually read from the SSF data file |
int |
nPairCCread
# spots actually read from the SSF data file |
int |
nPixels
total # of pixels in image1 = pixWidth*pixHeight |
int |
nSpotsAborted
# of spots aborted during assembly. |
int |
nTopSpot
number of spots current spotList[] that were defined. |
int |
nTopSpotPair
number of spot pairs current spotPairList[] that were defined. |
int |
omittedArea
|
float |
omittedDensity
Data statistics read from the SSF files. |
int |
omittedNumberSpots
|
float |
pctOmittedToDprimeAcceptedSpots
Pct omitToAccepted/densityPrime_spots failing_t1Density_resizing computed as: (100.0*omittedDensity/totSampleDensityPrime). |
char[] |
pix
sample source sample image |
int |
pixel_x_coordIdx
Spot data Table de column field indices if tab-delimited tables are being used. |
int |
pixel_y_coordIdx
Spot data Table de column field indices if tab-delimited tables are being used. |
float |
pixelSizeMicrons
Pixel resolution in the sample image in microns/pixel |
int |
pixHeight
Sample image size height from SSF file |
int |
pixWidth
Sample image size width from SSF file |
float |
ratioOmittedToAccepted
"Omitted(D')/Accepted(D')" |
static int |
RSAMPLE
The index for the Rsample (Reference Sample) |
static int |
SAMPLE
The index for the Sample to be paired with the Rsample |
int |
sampleNameIdx
Spot data Table de column field indices if tab-delimited tables are being used. |
int |
sampleNbr
The sample number is either RSAMPLE (0) or SAMPLE(1) |
java.lang.String |
sampleType
The sample type name is either "Rsample" or "Sample" based on sampleNbr value. |
java.lang.String |
simpleFileNameA
simple sample pix file name of the sample without the leading path. |
java.lang.String |
spotBoundaryStr
spot boundary string if using boundaries |
int |
spotBoundaryStrIdx
Spot data Table de column field indices if tab-delimited tables are being used. |
DbSpot[] |
spotList
DbSpot list [0:nTopSpot-1] for DbSpot spots entered by CC #. |
int |
spotNumber
Unique sequential spot number. |
DbPspot[] |
spotPairList
DbPspot list [0:nTopSpotPair-1] for DbPspot spots entered by CC #. |
static java.lang.String[] |
spotTblFields
Accession table fields |
static java.lang.String[] |
spotTblHelpList
Accession table help list |
static java.lang.String |
SSF_VERSION
SSF (Sample Spot-list File) version number |
boolean |
ssfCWSwitch
Debugging switch. |
int |
ssfCWX1
|
int |
ssfCWX2
|
int |
ssfCWY1
|
int |
ssfCWY2
|
java.io.FileWriter |
ssfEpilogueFD
output SSF Epilogue file stream |
java.io.FileWriter |
ssfFD
output SSF file stream |
java.lang.String |
ssfFile
full path xml/ Sample Spotlist Files (SSF) full path input file. |
java.lang.String |
ssfInputFile
name of SSF input file from file [FUTURE] |
int |
ssfInputFormatMode
SSF input file modes: Allowed: FileIO.IO_FORMAT_TAB_DELIM, IO_FORMAT_XML |
java.lang.String |
ssfOutputEpilogueFile
full tab-delim EPILOGUE xml/ Sample Spot-list File full path |
java.lang.String |
ssfOutputFile
SSF either tab-delim xml/ Sample Spot-list File full path |
int |
ssfOutputFormatMode
SSF output file modes: Allowed: FileIO.IO_FORMAT_TAB_DELIM, IO_FORMAT_XML, IO_FORMAT_FULL, IO_FORMAT_GELLAB |
java.lang.String |
ssfOutputPrefaceFile
full tab-delim PREFACE xml/ Sample Spot-list File full path |
java.io.FileWriter |
ssfPrefaceFD
output SSF Preface file stream |
int |
sxTotIdx
Spot data Table de column field indices if tab-delimited tables are being used. |
int |
sxyTotIdx
Spot data Table de column field indices if tab-delimited tables are being used. |
int |
syTotIdx
Spot data Table de column field indices if tab-delimited tables are being used. |
float |
t1Area
lower threshold of area sizing |
float |
t1Density
lower threshold of density' sizing |
float |
t1Range
lower threshold of (maxD-minD) sizing |
float |
t2Area
upper threshold of area sizing |
float |
t2Density
upper threshold of density' sizing |
float |
t2Range
upper threshold of (maxD-minD) sizing |
Table |
td
SSF data file table |
Table |
te
SSF epilogue file table |
int |
totSampleArea
|
int |
totSampleAreaPrime
|
float |
totSampleDensity
Data statistics read from the SSF files. |
float |
totSampleDensityPrime
Data statistics read from the SSF files. |
int |
totSampleNbrSpots
|
int |
totSampleNbrSpotsPrime
|
java.lang.String |
totStats
Global total statistics created at the end of the segmentation |
Table |
tp
SSF prologue file table |
static boolean |
USE_DOM_XML_SSF
enable for debugging DOM XML writer |
boolean |
useInternalDTDflag
Use internal "Open2Dprot-SSF.dtd" file in SSF XML output file. |
static java.lang.String |
VERSION
Version for this module |
int |
volumeIdx
Spot data Table de column field indices if tab-delimited tables are being used. |
int |
xSel
Selected X coordinate, set elsewhere |
int |
ySel
Selected Y coordinate, set elsewhere |
Constructor Summary | |
---|---|
DbSample()
DbSample() - create null DbSample |
|
DbSample(int sampleNbr)
DbSample() - setup DbSample part of the database |
|
DbSample(int sampleNbr,
java.lang.String ssfFile,
java.lang.String baseSamplename,
java.lang.String simplePixFileSample,
int ssfFormatMode)
DbSample() - setup DbSample part of the database |
Method Summary | |
---|---|
void |
assignAccessionDB(DbAccession acc)
assignAccessionDB() - assign the accession database |
boolean |
assignRsampleToAllSpotsInSpotList(DbSample dbRsample)
assignRsampleToAllSpotsInSpotList() - assign the dbRsample field in all spots in the current spot list |
boolean |
calcDensPrime(boolean bkgrdCorrectionSwitch,
boolean rmvDprimeSizingSwitch)
calcDensPrime() - For all spots update the spotList with background corrections by computing D' = Density - Area*MeanBkgrdDensity |
boolean |
chkSampleImageExists()
chkSampleImageExists() - test if the original image file exists for the sample |
void |
clearSpotList()
clearSpotList() - clear spot list |
void |
clearSpotPairList()
clearSpotPairList() - clear spot list |
java.lang.String |
cvtSpotToSpotRecordStr(DbSpot r)
cvtSpotToSpotRecordStr() - convert spot statistics to string depending on the SSF conversion mode. |
java.lang.String |
cvtSpotToSpotRecordStr(DbSpot r,
int useSsfFormatMode)
cvtSpotToSpotRecordStr() - convert spot statistics to string depending on the SSF conversion mode. |
java.lang.StringBuffer |
cvtSpotToSpotRecordStr(java.lang.StringBuffer s,
DbSpot r)
cvtSpotToSpotRecordStr() - convert spot statistics to string depending on the SSF conversion mode. |
DbSpot |
findSpotByXY(int xT,
int yT,
int distThr,
boolean allSpotsFlag)
findSpotByXY() - find a spot in the spot list that is within distThr of the (x,y) coordinate specified. |
DbPspot |
findSpotPairByXY(int nSample,
int xT,
int yT,
int distThr,
boolean allSpotsFlag)
findSpotPairByXY() - find a spot in the spot-pair list that is within distThr of the (x,y) coordinate specified. |
java.lang.String |
getSampleAccStr()
getSampleAccStr() - get printable data including accession name/value row for this sample |
void |
init()
init() - init the DbSample instance state sample names. |
boolean |
insertSpot(DbSpot r,
DbSpot sp)
insertSpot() - insert spot r BEFORE spot sp and update spotList[0:nTopSpot-1]. |
boolean |
insertSpotPair(DbPspot r,
DbPspot sp)
insertSpotPair() - insert DbPspot r BEFORE sp and update spotPairList[0:nTopSpotPair-1]. |
boolean |
isDBwindow(int x,
int y)
isDBwindow() - test if (x,y) is inside the debug window. |
boolean |
isValidROI(int rX1,
int rY1,
int rX2,
int rY2)
isValidROI() - check if current region of interest (ROI) is valid |
java.lang.String |
listAllSpots(boolean includeNullSpotsFlag,
boolean useDbugWindFlag)
listAllSpots() - list all spots in the spot list. |
boolean |
lookupSampleInAccDB(java.lang.String accNameData,
java.lang.String accFieldName,
java.lang.String accFile)
lookupSampleInAccDB() - lookup the sample by (nave,value) pair for this sample in the accession DB. |
boolean |
lookupSsfSpotlistTableIndices()
lookupSsfSpotlistTableIndices() - lookup SSF data table indices |
boolean |
pushSpot(DbSpot r)
pushSpot() - push DbSpot spot into spotList[0:nTopSpot-1]. |
boolean |
pushSpotPair(DbPspot r)
pushSpotPair() - push DbPspot spot-pair into spotPairList[0:nTopSpotPair-1]. |
boolean |
readAllSsfSpotlistTables()
readAllSsfSpotlistTables() - read SSF data, preface and epilogue tables Note: this reads the SSF data produced by "Seg2Dgel -ssfFormat:F" which produces three files. |
java.lang.String |
readSSFdata()
readSSFdata() - Read sample Sample Spot-list Files (SSF) into a linked list data base of DbSpot objects. |
boolean |
readSsfEpilogueTable(java.lang.String epilogueFile)
readSsfEpilogueTable() - read SSF epilogue tab-delimited file |
boolean |
readSsfPrefaceTable(java.lang.String prefaceFile)
readSsfPrefaceTable() - read SSF preface tab-delimited file |
boolean |
readSsfSpotlistTable(java.lang.String ssfFile)
readSsfSpotlistTable() - read SSF data table from tab-delimited data |
boolean |
readSsfSpotlistXML(java.lang.String XMLfileName)
readSsfSpotlistXML() - read SSF spot list, preface and epilogue data from XML file. |
boolean |
removeSpot(DbSpot r)
removeSpot() - remove spot from spotList[0:nTopSpot-1]. |
boolean |
removeSpotPair(DbPspot r)
removeSpotPair() - remove DbPspot from spotPairList[0:nTopSpotPair-1]. |
void |
reset()
reset() - reset the DbSample state for current sample. |
void |
resetSampleStats()
resetSampleStats() - reset global sample stats |
boolean |
rmvSPFlistsAndTable()
rmvSPFlistsAndTable() - remove the SSF and SPF spot lists, and Tables if they exist. |
boolean |
saveAccRowForSample(java.lang.String[] accRowData)
saveAccRowForSample() - save accession row entry data in the accession database table for this sample. |
void |
setBkgrdFilterSize(int bkgFilterSize)
setBkgrdFilterSize() - set spot saturated percent threshold state for the current sample. |
boolean |
setCalValueListCalibAccFields(float[] wedgeCalValues)
setCalValueListCalibAccFields() - set Calibration wedge wedgeCalValues in the accession DB field for this sample. |
void |
setCW(int cwX1,
int cwX2,
int cwY1,
int cwY2)
setCW() - set the computing window state for current sample. |
boolean |
setCWroi(int rX1,
int rY1,
int rX2,
int rY2)
setCWroi() - set region of interest (ROI) to Computing Window (CW). |
boolean |
setCWroi(int rX1,
int rY1,
int rX2,
int rY2,
java.lang.String[] accRowDataS)
setCWroi() - set region of interest (ROI) to Computing Window (CW) |
void |
setDbugFlag(boolean dbugFlag)
setDbugFlag() - set the dbugFlag |
boolean |
setDBwindow(int rX1,
int rY1,
int rX2,
int rY2)
setDBwindow() - set debug window of interest to region of interest (ROI). |
void |
setDebugCW(boolean ssfCWflag,
int dbCWX1,
int dbCWY1,
int dbCWX2,
int dbCWY2)
setDebugCW() - enable/disable debug computing window to restrict data read when test if p.(xMom,yMom) in SSF CW for debugging. |
void |
setIdxSample(int idxSample)
setIdxSample() - set the idxSample used in the CSD database |
void |
setMinCentralCoreSize(int ccMinimumSize)
setMinCentralCoreSize() - set spot minimum central core component area size state in pixels for the current sample. |
boolean |
setROI2CALCW(int rX1,
int rY1,
int rX2,
int rY2)
setROI2CALCW() - set Calibration wedge computing window ROI |
boolean |
setROI2CW(int rX1,
int rY1,
int rX2,
int rY2)
setROI2CW() - set region of interest (ROI) to Computing Window (CW) |
void |
setSampleNames(java.lang.String sampleType,
java.lang.String sampleName,
java.lang.String simplePixFileSample,
java.lang.String inPixFileSample,
java.lang.String ssfFileSample)
setSampleNames() - set the DbSample state for current sample. |
void |
setSaturationPercentThresholds(float glbPctThr)
setSaturationPercentThresholds() - set spot saturated percent threshold state for the current sample. |
void |
setSizingThresholds(float t1area,
float t2area,
float t1density,
float t2density,
float t1range,
float t2range)
setSizingThresholds() - set the spot sizing threshold for the current sample. |
boolean |
setupSpotList(int newSize)
setupSpotList() - create or regrow the spot list. |
boolean |
setupSpotPairList(int newSize)
setupSpotPairList() - create or regrow the DbPspot paired-spot list. |
void |
setUseInternalDTDflag(boolean useInternalDTDflag)
setUseInternalDTDflag() - set the use internal DTD flag. |
boolean |
setWedgeCWroi(int rX1,
int rY1,
int rX2,
int rY2)
setWedgeCWroi() - set Calibration wedge computing window ROI. |
boolean |
setWedgeCWroi(int rX1,
int rY1,
int rX2,
int rY2,
java.lang.String[] accRowDataS)
setWedgeCWroi() - set Calibration wedge computing window ROI |
boolean |
setWedgeGrayListData(java.lang.String wedgeCalListStr,
int[] wedgeGrayList)
setWedgeGrayListData() - set Calibration wedge wedgeGrayList in the accession DB field for this sample. |
boolean |
sortSpotList(int sortByFeature,
boolean ascendingFlag)
sortSpotList() - sort spotList[0:nTopSpot-1] by feature SORT_BY_xxxx. |
boolean |
sortSpotPairList(int sortByFeature,
int sortByNsample,
boolean ascendingFlag)
sortSpotPairList() - sort spotPairList[0:nTopSpotPair-1] by feature SORT_BY_xxxx. |
boolean |
writeEntireDOM_XML(java.lang.String outputFile)
writeEntireDOM_XML() - write the entire SSF file into an XML file using DOM/JDOM/... |
boolean |
writeEntireSSF(java.lang.String bannerTitle,
java.lang.String[] swList,
java.lang.String projDir,
java.lang.String filesUsed,
java.lang.String ssfOutputFile,
int ssfOutputFormatMode)
writeEntireSSF() - write the entire SSF file. |
boolean |
writeFinish(java.lang.String filesUsed)
writeFinish() - finish and close the segemented output file. |
boolean |
writeSpotsToFile()
writeSpotsToFile() - write the linked spot list, spot by spot, into the log file. |
boolean |
writeSSFpreface(java.lang.String bannerTitle,
java.lang.String[] swList,
java.lang.String filesUsed,
java.lang.String projDir)
writeSSFpreface() - write the SSF preface to the SSF file in ssfFD. |
boolean |
writeStatisticsToSSFfile()
writeStatisticsToSSFfile() - write the segmented spot statistics to the SSF file in ssfFD. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String VERSION
public static final java.lang.String SSF_VERSION
public static boolean USE_DOM_XML_SSF
public static final int RSAMPLE
public static final int SAMPLE
public static int MAXSPOTS
public static int MAX_BUFFERED_SPOTS
public static final java.lang.String[] legalImageFileExtens
public int sampleNbr
public int idxSample
public java.lang.String sampleType
public java.lang.String baseSampleName
public DbAccession acc
public java.lang.String simpleFileNameA
public java.lang.String inPixFile
public java.lang.String ssfFile
public java.lang.String ssfInputFile
public java.lang.String baseSSFimageFileName
public int ssfInputFormatMode
public boolean useInternalDTDflag
public java.lang.String ssfOutputFile
public java.lang.String ssfOutputPrefaceFile
public java.lang.String ssfOutputEpilogueFile
public int ssfOutputFormatMode
public java.io.FileWriter ssfFD
public java.io.FileWriter ssfPrefaceFD
public java.io.FileWriter ssfEpilogueFD
public CalibrateOD calib
public int spotNumber
public int countG
public DbSpot listG
public int nCCread
public int nTopSpot
public int maxSpots
public DbSpot[] spotList
public DbSpot firstSpot
public DbSpot lastSpot
public int countPairG
public DbPspot listPairG
public int nPairCCread
public int nTopSpotPair
public int maxSpotPairs
public DbPspot[] spotPairList
public DbPspot firstSpotPair
public DbPspot lastSpotPair
public boolean dbugFlag
public int dbx1
public int dbx2
public int dby1
public int dby2
public boolean ssfCWSwitch
public int ssfCWX1
public int ssfCWY1
public int ssfCWX2
public int ssfCWY2
public char[] pix
public int pixWidth
public int pixHeight
public float pixelSizeMicrons
public int nPixels
public int nBytesPerPixel
public int nBitsPerPixel
public int maxGrayPixel
public int xSel
public int ySel
public int cwx1
public int cwx2
public int cwy1
public int cwy2
public float t1Area
public float t2Area
public float t1Density
public float t2Density
public float t1Range
public float t2Range
public float glbPercentThr
public int ccMinSize
public int bkgrdFilterSize
public float totSampleDensity
public int totSampleArea
public int totSampleNbrSpots
public float totSampleDensityPrime
public int totSampleAreaPrime
public int totSampleNbrSpotsPrime
public float omittedDensity
public int omittedArea
public int omittedNumberSpots
public float pctOmittedToDprimeAcceptedSpots
public float maxCalibGrayFound
public int maxAreaFound
public float maxDensityFound
public float maxDensityPrimeFound
public int invalidCentroidsTot
public int nSpotsAborted
public float ratioOmittedToAccepted
public int ctrArea1Failed
public int ctrArea2Failed
public int ctrDensity1Failed
public int ctrDensity2Failed
public int ctrDR1Failed
public int ctrDR2Failed
public int ctrSxSy1Failed
public int ctrSxSy2Failed
public float minBkgrdDensity
public float maxBkgrdDensity
public int maxBkgrdTot
public int minBkgrdTot
public java.lang.String spotBoundaryStr
public java.lang.String globalStats
public java.lang.String totStats
public java.lang.String[] accFieldNames
public java.lang.String[] accRowData
public static java.lang.String[] spotTblHelpList
public static java.lang.String[] spotTblFields
public int sampleNameIdx
public int idIdx
public int merX1Idx
public int merX2Idx
public int merY1Idx
public int merY2Idx
public int minDensityIdx
public int maxDensityIdx
public int meanDensityIdx
public int meanBackgroundIdx
public int pixel_x_coordIdx
public int pixel_y_coordIdx
public int areaIdx
public int densityIdx
public int densityPrimeIdx
public int sxTotIdx
public int syTotIdx
public int sxyTotIdx
public int volumeIdx
public int ccNumberIdx
public int spotBoundaryStrIdx
public Table td
public Table tp
public Table te
Constructor Detail |
---|
public DbSample()
public DbSample(int sampleNbr)
sampleNbr
- is the sample number. 0 is RSAMPLE, 0 is SAMPLE.public DbSample(int sampleNbr, java.lang.String ssfFile, java.lang.String baseSamplename, java.lang.String simplePixFileSample, int ssfFormatMode)
sampleNbr
- is the sample number. 0 is RSAMPLE, 0 is SAMPLE.ssfFile
- is full path pix file name for Rsample or SamplebaseSamplename
- is base pix file name for Rsample or SamplesimplePixFileSample
- is simple pix file name for
Rsample or SamplessfFormatMode
- is the I/O input mode.Method Detail |
---|
public void setIdxSample(int idxSample)
idxSample
- is the index sample. -1 is none, 0 is Rsample
values > 0 are Samples.public void init()
public boolean rmvSPFlistsAndTable()
public void assignAccessionDB(DbAccession acc)
acc
- is accession databasepublic void setDbugFlag(boolean dbugFlag)
dbugFlag
- status to setpublic void setUseInternalDTDflag(boolean useInternalDTDflag)
useInternalDTDflag
- status to setpublic void reset()
public void resetSampleStats()
public void clearSpotList()
public boolean setupSpotList(int newSize)
newSize
- of the spotLists
clearSpotList()
,
findSpotByXY(int, int, int, boolean)
,
insertSpot(O2Plib.db.DbSpot, O2Plib.db.DbSpot)
,
pushSpot(O2Plib.db.DbSpot)
,
removeSpot(O2Plib.db.DbSpot)
,
sortSpotList(int, boolean)
public boolean pushSpot(DbSpot r)
r
- DbSpot to push into the spotList.
clearSpotList()
,
findSpotByXY(int, int, int, boolean)
,
insertSpot(O2Plib.db.DbSpot, O2Plib.db.DbSpot)
,
removeSpot(O2Plib.db.DbSpot)
,
setupSpotList(int)
,
sortSpotList(int, boolean)
public boolean insertSpot(DbSpot r, DbSpot sp)
r
- spot to insertsp
- spot to insert BEFORE. If null, then insert at the
end of the list.
clearSpotList()
,
findSpotByXY(int, int, int, boolean)
,
pushSpot(O2Plib.db.DbSpot)
,
removeSpot(O2Plib.db.DbSpot)
,
setupSpotList(int)
,
sortSpotList(int, boolean)
public boolean removeSpot(DbSpot r)
r
- spot to remove from the spotList.
clearSpotList()
,
findSpotByXY(int, int, int, boolean)
,
insertSpot(O2Plib.db.DbSpot, O2Plib.db.DbSpot)
,
pushSpot(O2Plib.db.DbSpot)
,
setupSpotList(int)
,
sortSpotList(int, boolean)
public boolean sortSpotList(int sortByFeature, boolean ascendingFlag)
sortByFeature
- DbSpot.SPOT_FEATURE_xxxxascendingFlag
- to sort in assending order
clearSpotList()
,
insertSpot(O2Plib.db.DbSpot, O2Plib.db.DbSpot)
,
findSpotByXY(int, int, int, boolean)
,
pushSpot(O2Plib.db.DbSpot)
,
removeSpot(O2Plib.db.DbSpot)
,
setupSpotList(int)
public void clearSpotPairList()
public boolean setupSpotPairList(int newSize)
newSize
- of the spotLists
public boolean pushSpotPair(DbPspot r)
r
- DbPspot to push into the spotPairList.
setupSpotPairList(int)
public boolean insertSpotPair(DbPspot r, DbPspot sp)
r
- DbPspot to insertsp
- DbPspot to insert BEFORE. If null, then insert at the
end of the list.
setupSpotPairList(int)
public boolean removeSpotPair(DbPspot r)
r
- DbPspot to remove from the spotPairList.
public boolean sortSpotPairList(int sortByFeature, int sortByNsample, boolean ascendingFlag)
sortByFeature
- DbSpot.SPOT_FEATURE_xxxxsortByNsample
- is either RSAMPLE or SAMPLEascendingFlag
- to sort in assending order
public DbPspot findSpotPairByXY(int nSample, int xT, int yT, int distThr, boolean allSpotsFlag)
nSample
- is either RSAMPLE or SAMPLExT
- coordinate of test positionyT
- coordinate of test positiondistThr
- minimum Euclidean distance for it to be acceptedallSpotsFlag
- to get all spots, else just BF_ISVALIDSPOT spots
public void setSampleNames(java.lang.String sampleType, java.lang.String sampleName, java.lang.String simplePixFileSample, java.lang.String inPixFileSample, java.lang.String ssfFileSample)
sampleType
- is either "Rsample" or "Sample"sampleName
- is the base sample name (no path prefix or .ext).
is name is also in the accession and landmark databases.
E.g., "sample1".simplePixFileSample
- is the base name of the input pix file
(with .ext). E.g., "sample1.gif".inPixFileSample
- is the full path of the input pix file.
E.g., "demo/ppx/sample1.gif".ssfFileSample
- is the full path of the SSF file
E.g., "demo/xml/sample1-SSF.xml".public void setCW(int cwX1, int cwX2, int cwY1, int cwY2)
cwX1
- is the ULHC xcwX2
- is the LRHC xcwY1
- is the ULHC ycwY2
- is the LRHC ypublic void setSizingThresholds(float t1area, float t2area, float t1density, float t2density, float t1range, float t2range)
t1area
- is lower threshold of area sizingt2area
- is upper threshold of area sizingt1density
- is lower threshold of integrated density sizingt2density
- is upper threshold of integrated density sizingt1range
- is lower threshold of pixel density range sizingt2range
- is upper threshold of pixel density range sizingpublic void setSaturationPercentThresholds(float glbPctThr)
glbPctThr
- Saturation threshold [0.0 : 1.0] , i.e. 0 to 100%public void setMinCentralCoreSize(int ccMinimumSize)
ccMinimumSize
- for sizingpublic void setBkgrdFilterSize(int bkgFilterSize)
bkgFilterSize
- background filter sizepublic boolean chkSampleImageExists()
dbS
- is the DbSample instance" dbRsample, dbSample
or other.
public java.lang.String getSampleAccStr()
public boolean saveAccRowForSample(java.lang.String[] accRowData)
accRowData
- to save
public final boolean isDBwindow(int x, int y)
x
- is value to testy
- is value to test
public boolean setDBwindow(int rX1, int rY1, int rX2, int rY2)
rX1
- - ULHC x coordinaterY1
- - ULHC y coordinaterX2
- - LRHC x coordinaterY2
- - LRHC y coordinate
public boolean setCWroi(int rX1, int rY1, int rX2, int rY2, java.lang.String[] accRowDataS)
rX1
- - ULHC x coordinaterY1
- - ULHC y coordinaterX2
- - LRHC x coordinaterY2
- - LRHC y coordinateaccRowDataS
- is the replacement value for accRowData to use
public boolean setCWroi(int rX1, int rY1, int rX2, int rY2)
rX1
- - ULHC x coordinaterY1
- - ULHC y coordinaterX2
- - LRHC x coordinaterY2
- - LRHC y coordinate
public boolean setWedgeCWroi(int rX1, int rY1, int rX2, int rY2, java.lang.String[] accRowDataS)
rX1
- - ULHC x coordinaterY1
- - ULHC y coordinaterX2
- - LRHC x coordinaterY2
- - LRHC y coordinateaccRowDataS
- is the replacement value for accRowData to use
public boolean setCalValueListCalibAccFields(float[] wedgeCalValues)
public boolean setWedgeCWroi(int rX1, int rY1, int rX2, int rY2)
rX1
- - ULHC x coordinaterY1
- - ULHC y coordinaterX2
- - LRHC x coordinaterY2
- - LRHC y coordinate
public boolean setWedgeGrayListData(java.lang.String wedgeCalListStr, int[] wedgeGrayList)
public boolean setROI2CW(int rX1, int rY1, int rX2, int rY2)
rX1
- - ULHC x coordinaterY1
- - ULHC y coordinaterX2
- - LRHC x coordinaterY2
- - LRHC y coordinate
public boolean setROI2CALCW(int rX1, int rY1, int rX2, int rY2)
rX1
- - ULHC x coordinaterY1
- - ULHC y coordinaterX2
- - LRHC x coordinaterY2
- - LRHC y coordinate
public boolean isValidROI(int rX1, int rY1, int rX2, int rY2)
rX1
- - ULHC x coordinaterY1
- - ULHC y coordinaterX2
- - LRHC x coordinaterY2
- - LRHC y coordinate
public boolean lookupSampleInAccDB(java.lang.String accNameData, java.lang.String accFieldName, java.lang.String accFile)
accNameData
- is the sample image name to search for. Do not
specify the file extension.accFieldName
- is the accession field nameaccFile
- is the name of the accession file
public void setDebugCW(boolean ssfCWflag, int dbCWX1, int dbCWY1, int dbCWX2, int dbCWY2)
ssfCWSflag
- is debugging switch.dbWX1
- is debug window X1dbCWY1
- is debug window Y1dbCWX2
- is debug window X2dbCWY2
- is debug window Y2public boolean calcDensPrime(boolean bkgrdCorrectionSwitch, boolean rmvDprimeSizingSwitch)
bkgrdCorrectionSwitch
- if use background correction.
Otherwise compute: mnBackground= calib.mapGrayToCal[mnBkgrdGrayvalue], densityPrime= density - (.area*.mnBackground).
rmvDprimeSizingSwitch
- if remove spots from list by D' sizing,
i.e. remove spots if (r.densityPrime < t1Density)
public boolean assignRsampleToAllSpotsInSpotList(DbSample dbRsample)
public java.lang.String listAllSpots(boolean includeNullSpotsFlag, boolean useDbugWindFlag)
includeNullSpotsFlag
- list null spots (ccNumber==0) as welluseDbugWindFlag
- to test if spot coords in debug ROI
clearSpotList()
,
findSpotByXY(int, int, int, boolean)
,
insertSpot(O2Plib.db.DbSpot, O2Plib.db.DbSpot)
,
pushSpot(O2Plib.db.DbSpot)
,
removeSpot(O2Plib.db.DbSpot)
,
setupSpotList(int)
,
sortSpotList(int, boolean)
public DbSpot findSpotByXY(int xT, int yT, int distThr, boolean allSpotsFlag)
xT
- coordinate of test positionyT
- coordinate of test positiondistThr
- minimum Euclidean distance for it to be acceptedallSpotsFlag
- to get all spots, else just BF_ISVALIDSPOT spots
clearSpotList()
,
insertSpot(O2Plib.db.DbSpot, O2Plib.db.DbSpot)
,
pushSpot(O2Plib.db.DbSpot)
,
removeSpot(O2Plib.db.DbSpot)
,
setupSpotList(int)
,
sortSpotList(int, boolean)
public java.lang.String readSSFdata()
readAllSsfSpotlistTables()
,
readSsfSpotlistXML(java.lang.String)
public boolean readAllSsfSpotlistTables()
xml/sample.txt the spotlist data xml/sample-PREFACE.txt the preface xml/sample-EPILOGUE.txt the epilogue which is equivalent to data generated by " -ssfFormat:X" xml/sample.xml
public boolean readSsfSpotlistXML(java.lang.String XMLfileName)
xml/sample.xml is equivalent to data generated by "Seg2Dgel -ssfFormat:F" xml/sample.txt the spotlist data xml/sample-PREFACE.txt the preface xml/sample-EPILOGUE.txt the epilogue
XMLfileName
- to read
public boolean lookupSsfSpotlistTableIndices()
public boolean readSsfSpotlistTable(java.lang.String ssfFile)
ssfFile
- is tab-delimited SSF data file
public boolean readSsfPrefaceTable(java.lang.String prefaceFile)
prefaceFile
- to read
public boolean readSsfEpilogueTable(java.lang.String epilogueFile)
epilogueFile
- to read
public boolean writeEntireSSF(java.lang.String bannerTitle, java.lang.String[] swList, java.lang.String projDir, java.lang.String filesUsed, java.lang.String ssfOutputFile, int ssfOutputFormatMode)
bannerTitle
- is optional title to put into output file header if
not null.swList
- is optional list of program switches used by the
SSF generating program if not null.projDir
- is optional project directory if not null.filesUsed
- is optional list of files associated with SSF.ssfOutputFile
- is the SSF output format mode
public boolean writeEntireDOM_XML(java.lang.String outputFile)
public java.lang.String cvtSpotToSpotRecordStr(DbSpot r, int useSsfFormatMode)
r
- is the spot to convert to a stringuseSsfFormatMode
- to use in conversion
public java.lang.String cvtSpotToSpotRecordStr(DbSpot r)
r
- is the spot to convert to a string
public java.lang.StringBuffer cvtSpotToSpotRecordStr(java.lang.StringBuffer s, DbSpot r)
sBuf
- is the string buffer to add the spot statsr
- is the spot to convert to a string
public boolean writeSpotsToFile()
public boolean writeSSFpreface(java.lang.String bannerTitle, java.lang.String[] swList, java.lang.String filesUsed, java.lang.String projDir)
bannerTitle
- is the title line (optional)swList
- is optional list of program switches used by the
SSF generating program if not null.filesUsed
- is optional list of files associated with SSF.projDir
- is optional project directory if not null.
public boolean writeStatisticsToSSFfile()
public boolean writeFinish(java.lang.String filesUsed)
filesUsed
- is optional list of files associated with SSF.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |