O2Plib.db
Class DbBaseSpot

java.lang.Object
  extended by O2Plib.db.DbBaseSpot
Direct Known Subclasses:
DbPspot, DbSpot

public class DbBaseSpot
extends java.lang.Object

Class DbBaseSpot is the base class used to define a spot. It is used as the base class for both DbSpot and DbPspot. It supports a spot data structure for spot features in Open2Dprot programs.

This file is derived from GELLAB-II cmpgl2.c as of "Version November 9, 1999".

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/.

Version:
$Date: 2005/10/21 17:03:41 $ $Revision: 1.13 $
Author:
P. Lemkin, NCI-Frederick, Frederick, MD, 21702

Field Summary
static int AP
          Ambiguous Pair - pairing program generated label
static java.awt.Color APCOLOR
          Ambiguous Pair spot label
 DbBaseSpot bestPairedSpot
          ptr to best paired spot for spot-pairing, if not null
static int BF_DISPLAY_SPOT
          Bit feature to display spot
static int BF_FAILED_SXSYR1RANGE
          Bit feature failed sX/Sy range lower bound
static int BF_FAILED_SXSYR2RANGE
          Bit feature failed sX/Sy range upper bound
static int BF_FAILED_T1AREA
          Bit feature failed T1 area lower bound
static int BF_FAILED_T1DENSITY
          Bit feature failed T1 density lower bound
static int BF_FAILED_T1DENSRANGE
          Bit feature failed T1 density range lower bound
static int BF_FAILED_T2AREA
          Bit feature failed T2 area upper bound
static int BF_FAILED_T2DENSITY
          Bit feature failed T2 density upper bound
static int BF_FAILED_T2DENSRANGE
          Bit feature failed T2 density range upper bound
static int BF_ISVALIDSPOT
          Bit feature of a spot
 int bitFeatures
          bit features of a spot is the OR of BF_xxxx bits
 int code
          Spot Pairing code DbLM.(SP,PP,AP,US,CP,EP,LM,GS)
static int CP
          Composite Sample Database spot pair.
static java.awt.Color CPCOLOR
          Composite (averaged) spot label
 DbSample dbRsample
           
 DbSample dbSample
           
 float dL
          distance from spot pair to their landmark
 float dP
          distance between spots in a pair
static int EP
          Extrapolated Pair - by CSD database program
static java.awt.Color EPCOLOR
          Extrapolated spot label
static int GS
          Garbage Spot - generated by CSD database or editing programs
 int idxRsample
          index of Rsample this spot is paired with.
 int idxSample
          Index of Sample for this spot.
static int LM
          LandMark spot [could be virtual landmark] - by CSD database program.
static java.awt.Color LMCOLOR
          Landmark spot label
 int lmNbrI
          Landmark number as int index [0:51].
 java.lang.String lmNbrS
          Landmark number String as index [0:51] encoded as a name character "A" : "Z or "a" : "z".
static java.awt.Color LMSETCOLOR
          Color of spots in the landmark set
static int MAX_SPOT_SUBLIST_SIZE
          max size of spot sublist when they are created locally
 DbBaseSpot nextLMspot
          ptr to Next LM-set spot if not null
 DbBaseSpot nextSpot
          ptr to Next spot instance in spot list if not null
 int nSample
          Sample# (RSAMPLE or SAMPLE) to identify type of sample
static int PP
          Possible Pair - pairing program generated label
static java.awt.Color PPCOLOR
          Possible Pair spot label
 DbBaseSpot prevSpot
          ptr to Previous spot instance in spot list if not null
static int RSAMPLE
          The index for the Rsample (Reference Sample)
static java.awt.Color RSPOTCOLOR
          Color of the Rspots
 DbBaseSpot rSpotNext
          Next instance for CSD database Rspot linked list
static int SAMPLE
          The index for the Sample to be paired with the Rsample
static int SP
          Sure Pair - pairing program generated label
static java.awt.Color SPCOLOR
          Sure Pair spot label
static int SPOT_FEATURE_AREA
          Spot area feature index
static int SPOT_FEATURE_DENS_PCT
          Spot percent density feature index
static int SPOT_FEATURE_DENS_PRIME
          Spot density' feature index
static int SPOT_FEATURE_DENSITY
          Spot density feature index
static int SPOT_FEATURE_MAX_DENS
          Spot mean density feature index
static int SPOT_FEATURE_MEAN_DENSITY
          Spot mean density feature index
static int SPOT_FEATURE_MIN_DENS
          Spot max density feature index
static int SPOT_FEATURE_VOLUME
          Spot volume feature index
static java.awt.Color SPOTBOXCOLOR
          Color of the selected spot indicated by a spot box
 int spotNumber
          Unique sequential spot number.
 boolean swappedRsampleAndSampleFlag
          Set if swap the Rsample and Sample fields
static int US
          Unresolved Spot - pairing program generated label
static java.awt.Color USCOLOR
          Unresolved spot label
static java.lang.String VERSION
          Version for this module
 
Constructor Summary
DbBaseSpot()
          DbBaseSpot() - Constructor for new DbSpot.
DbBaseSpot(DbSample dbSample)
          DbBaseSpot() - Constructor for new DbBaseSpot.
DbBaseSpot(DbSample dbRsample, DbSample dbSample)
          DbBaseSpot() - Constructor for new DbBaseSpot.
 
Method Summary
 boolean copyBaseValues(DbBaseSpot sp, boolean copyPointersFlag)
          copyBaseValues() - copy values in spot sp into this spot.
 void copyRsampleToSampleBaseValues()
          copyRsampleToSampleBaseValues() - copy Rsample base field field values in this Pspot to the Sample base field values.
 void setDbSamples(DbSample dbRsample, DbSample dbSample)
          setDbSamples() - set the dbRsample and dbSample objects for this DbBaseSpot.
 void swapBaseValues()
          swapBaseValues() - swap the Rsample and Sample field values
 boolean verifyNotCircularSSFlist(DbBaseSpot p, java.lang.String msg)
          verifyNotCircularSSFlist() - test to see if the spotlist is circular given a pointer into the list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION

public static final java.lang.String VERSION
Version for this module

See Also:
Constant Field Values

BF_ISVALIDSPOT

public static final int BF_ISVALIDSPOT
Bit feature of a spot

See Also:
Constant Field Values

BF_FAILED_T1AREA

public static final int BF_FAILED_T1AREA
Bit feature failed T1 area lower bound

See Also:
Constant Field Values

BF_FAILED_T2AREA

public static final int BF_FAILED_T2AREA
Bit feature failed T2 area upper bound

See Also:
Constant Field Values

BF_FAILED_T1DENSITY

public static final int BF_FAILED_T1DENSITY
Bit feature failed T1 density lower bound

See Also:
Constant Field Values

BF_FAILED_T2DENSITY

public static final int BF_FAILED_T2DENSITY
Bit feature failed T2 density upper bound

See Also:
Constant Field Values

BF_FAILED_T1DENSRANGE

public static final int BF_FAILED_T1DENSRANGE
Bit feature failed T1 density range lower bound

See Also:
Constant Field Values

BF_FAILED_T2DENSRANGE

public static final int BF_FAILED_T2DENSRANGE
Bit feature failed T2 density range upper bound

See Also:
Constant Field Values

BF_FAILED_SXSYR1RANGE

public static final int BF_FAILED_SXSYR1RANGE
Bit feature failed sX/Sy range lower bound

See Also:
Constant Field Values

BF_FAILED_SXSYR2RANGE

public static final int BF_FAILED_SXSYR2RANGE
Bit feature failed sX/Sy range upper bound

See Also:
Constant Field Values

BF_DISPLAY_SPOT

public static final int BF_DISPLAY_SPOT
Bit feature to display spot

See Also:
Constant Field Values

MAX_SPOT_SUBLIST_SIZE

public static final int MAX_SPOT_SUBLIST_SIZE
max size of spot sublist when they are created locally

See Also:
Constant Field Values

SPCOLOR

public static java.awt.Color SPCOLOR
Sure Pair spot label


PPCOLOR

public static java.awt.Color PPCOLOR
Possible Pair spot label


APCOLOR

public static java.awt.Color APCOLOR
Ambiguous Pair spot label


USCOLOR

public static java.awt.Color USCOLOR
Unresolved spot label


EPCOLOR

public static java.awt.Color EPCOLOR
Extrapolated spot label


CPCOLOR

public static java.awt.Color CPCOLOR
Composite (averaged) spot label


LMCOLOR

public static java.awt.Color LMCOLOR
Landmark spot label


LMSETCOLOR

public static java.awt.Color LMSETCOLOR
Color of spots in the landmark set


SPOTBOXCOLOR

public static java.awt.Color SPOTBOXCOLOR
Color of the selected spot indicated by a spot box


RSPOTCOLOR

public static java.awt.Color RSPOTCOLOR
Color of the Rspots


SPOT_FEATURE_AREA

public static final int SPOT_FEATURE_AREA
Spot area feature index

See Also:
Constant Field Values

SPOT_FEATURE_DENSITY

public static final int SPOT_FEATURE_DENSITY
Spot density feature index

See Also:
Constant Field Values

SPOT_FEATURE_DENS_PRIME

public static final int SPOT_FEATURE_DENS_PRIME
Spot density' feature index

See Also:
Constant Field Values

SPOT_FEATURE_DENS_PCT

public static final int SPOT_FEATURE_DENS_PCT
Spot percent density feature index

See Also:
Constant Field Values

SPOT_FEATURE_VOLUME

public static final int SPOT_FEATURE_VOLUME
Spot volume feature index

See Also:
Constant Field Values

SPOT_FEATURE_MEAN_DENSITY

public static final int SPOT_FEATURE_MEAN_DENSITY
Spot mean density feature index

See Also:
Constant Field Values

SPOT_FEATURE_MAX_DENS

public static final int SPOT_FEATURE_MAX_DENS
Spot mean density feature index

See Also:
Constant Field Values

SPOT_FEATURE_MIN_DENS

public static final int SPOT_FEATURE_MIN_DENS
Spot max density feature index

See Also:
Constant Field Values

RSAMPLE

public static final int RSAMPLE
The index for the Rsample (Reference Sample)

See Also:
Constant Field Values

SAMPLE

public static final int SAMPLE
The index for the Sample to be paired with the Rsample

See Also:
Constant Field Values

US

public static final int US
Unresolved Spot - pairing program generated label

See Also:
Constant Field Values

SP

public static final int SP
Sure Pair - pairing program generated label

See Also:
Constant Field Values

PP

public static final int PP
Possible Pair - pairing program generated label

See Also:
Constant Field Values

AP

public static final int AP
Ambiguous Pair - pairing program generated label

See Also:
Constant Field Values

EP

public static final int EP
Extrapolated Pair - by CSD database program

See Also:
Constant Field Values

CP

public static final int CP
Composite Sample Database spot pair. The CSD' is a statistical representation of a set of effective sample replicates generated by the database program.

See Also:
Constant Field Values

GS

public static final int GS
Garbage Spot - generated by CSD database or editing programs

See Also:
Constant Field Values

LM

public static final int LM
LandMark spot [could be virtual landmark] - by CSD database program.

See Also:
Constant Field Values

nSample

public int nSample
Sample# (RSAMPLE or SAMPLE) to identify type of sample


idxSample

public int idxSample
Index of Sample for this spot. This is a short form of dbSample and could be used to lookup dbSample from a list of DbSamples. Optional usage.


idxRsample

public int idxRsample
index of Rsample this spot is paired with. This is a short form of dbRsample. If this spot is in the Rsample, then this index is -1. This is a short form of dbRsample and could be used to lookup dbSample from a list of DbSamples. Optional usage.


dbRsample

public DbSample dbRsample

dbSample

public DbSample dbSample

spotNumber

public int spotNumber
Unique sequential spot number. This may change during segmentation as spots are removed via threshold sizing. Value -1 means no number.


bitFeatures

public int bitFeatures
bit features of a spot is the OR of BF_xxxx bits


swappedRsampleAndSampleFlag

public boolean swappedRsampleAndSampleFlag
Set if swap the Rsample and Sample fields


lmNbrS

public java.lang.String lmNbrS
Landmark number String as index [0:51] encoded as a name character "A" : "Z or "a" : "z". Note: it is NOT encoded from 0 but from 1. This may or may not be used.


lmNbrI

public int lmNbrI
Landmark number as int index [0:51]. Note: it IS encoded from 0 - NOT from 1. Value of -1 means it is not defined. Legal values [0:25,26:51] map to [A;Z,a:z]. This may or may not be used.


code

public int code
Spot Pairing code DbLM.(SP,PP,AP,US,CP,EP,LM,GS)


dP

public float dP
distance between spots in a pair


dL

public float dL
distance from spot pair to their landmark


prevSpot

public DbBaseSpot prevSpot
ptr to Previous spot instance in spot list if not null


nextSpot

public DbBaseSpot nextSpot
ptr to Next spot instance in spot list if not null


nextLMspot

public DbBaseSpot nextLMspot
ptr to Next LM-set spot if not null


bestPairedSpot

public DbBaseSpot bestPairedSpot
ptr to best paired spot for spot-pairing, if not null


rSpotNext

public DbBaseSpot rSpotNext
Next instance for CSD database Rspot linked list

Constructor Detail

DbBaseSpot

public DbBaseSpot()
DbBaseSpot() - Constructor for new DbSpot. All other fields default to null or zero.


DbBaseSpot

public DbBaseSpot(DbSample dbSample)
DbBaseSpot() - Constructor for new DbBaseSpot. All other fields default to null or zero.

Parameters:
dbSample - for this spot

DbBaseSpot

public DbBaseSpot(DbSample dbRsample,
                  DbSample dbSample)
DbBaseSpot() - Constructor for new DbBaseSpot. All other fields default to null or zero.

Parameters:
dbRsample - is sample for pairing with this spot
dbSample - for this spot
Method Detail

setDbSamples

public void setDbSamples(DbSample dbRsample,
                         DbSample dbSample)
setDbSamples() - set the dbRsample and dbSample objects for this DbBaseSpot.

Parameters:
dbRsample - is sample for pairing with this spot
dbSample - for this spot

copyBaseValues

public boolean copyBaseValues(DbBaseSpot sp,
                              boolean copyPointersFlag)
copyBaseValues() - copy values in spot sp into this spot. Note: copy arrays or string objects by reference

Parameters:
sp - is spot
copyPointersFlag - to copy spot pointers as well
Returns:
true if succeed.

swapBaseValues

public void swapBaseValues()
swapBaseValues() - swap the Rsample and Sample field values


copyRsampleToSampleBaseValues

public void copyRsampleToSampleBaseValues()
copyRsampleToSampleBaseValues() - copy Rsample base field field values in this Pspot to the Sample base field values. Note other base field items are shared.


verifyNotCircularSSFlist

public boolean verifyNotCircularSSFlist(DbBaseSpot p,
                                        java.lang.String msg)
verifyNotCircularSSFlist() - test to see if the spotlist is circular given a pointer into the list. A DEBUGGING tool.

Parameters:
p - is DbBaseSpot pointer to list of spots
msg - is the message to print if an error if not null
Returns:
true if the list is Circular, false if it is not and is OK.