|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object O2Plib.db.CSD.CSDglb O2Plib.db.CSD.CSDRspotList
public class CSDRspotList
Class CSDRspotList contains a Rspot List or (RSL). This consists of a subset of Rspots in the Composite Samples Database (CSD).
The list maintains both a number list of Rspot numbers and a list of the Rspot objects.
This file is derived from Open2Dprot, MAExplorer and GELLAB-II code.
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 float |
DEF_MIN_ACCEPTABLE_DIST
Default value of minimum distance for a best fit search by (x,y) coordinates to be valid. |
float |
defMinAcceptableDist
Default minimum acceptable (x,y) search distance. |
static int |
glbIdRSLcounter
Global RSL ID counter |
int |
idRSL
RSL id for this Rspot set list instance |
static int |
maxRspots
Maximum total number of Rspots in the rspotList[0:maxRspots-1]. |
float |
minBestFitXYdistance
Distance of minimum nearest best-fit XY coordinate search set by last lookupRspotByBestFitRspotXYcoordSearch() call. |
int |
minBestFitXYIdx
Index in rspotsList[] of minimum nearest best-fit XY coordinate search set by last lookupRspotByBestFitRspotXYcoordSearch() call. |
java.lang.String |
name
Name of the list of Rspots |
static int |
nbrERspots
Number of ERspots in the send part of the rspotList[nbrERspots:totRspots-1]. |
static int |
nbrRspots
Number of non-EP Rspots in the first part of the [0:nbrRspots-1]. |
CSDRspot[] |
rspotsList
[0:totRspots-1] list of Rspot objects |
int[] |
rspotsNbrs
[0:totRspots-1] list of Rspot numbers |
java.lang.String |
timeStamp
|
java.lang.String |
title
title information of list of Rspots. |
static int |
totRspots
Total number of Rspots in the rspotList[0:totRspots-1]. |
boolean |
useXYhashFlag
Flag to use xyHashtable for lookup of Rspots by CSDRspot.(xRspot,yRspot). |
static java.lang.String |
VERSION
Version for this module |
java.util.Hashtable |
xyHash
hashTable for xy coordinate lookup. |
Constructor Summary | |
---|---|
CSDRspotList()
CSDRspotList() - Constructor for new CSDRspotList with a cleared list. |
|
CSDRspotList(java.lang.String name,
java.lang.String timeStamp,
java.lang.String title)
CSDRspotList() - Constructor for new CSDRspotList with a cleared list. |
Method Summary | |
---|---|
boolean |
add(CSDRspot dbR)
add() - add Rspot to RSL. |
boolean |
add(CSDRspot dbR,
int rNbr)
add() - add Rspot to RSL. |
boolean |
add(int idNbr)
add() - add Rspot number to RSL. |
boolean |
addDbug(CSDRspot dbR,
int rNbr,
int pSpotNbr)
addDbug() - DBUG version. |
CSDRspot |
addRspotToHashtable(CSDRspot r)
addRspotToHashtable() - Add Rspot to Rspot list hashtable. |
CSDRspot |
addRspotToHashtableDbug(CSDRspot r,
int pSpotNbr)
addRspotToHashtableDbug() - DBUG version. |
void |
clear()
clear() - clear the RSL. |
CSDRspotList |
cloneIt()
cloneIt() - make a cloned copy of a RSL. |
CSDRspotList |
difference(CSDRspotList r1,
CSDRspotList r2)
difference() - do the intersection of two RSL lists r3= difference(r1,r2). |
CSDRspot[] |
getRspotsList()
getRspotsList() - get the list of Rspot CSDRspot objects |
int[] |
getRspotsNbrs()
getRspotsNbrs() - get the list of Rspot numbers |
java.lang.String |
getTabDelimitedFieldsAndData(boolean useAnnotationFlag,
boolean useNormFlag)
getTabDelimitedFieldsAndData() - get a string representation of this instance as tab-delimited data fields and values. |
void |
init(int maxRspots)
init() - initialize Rspot list list to specified size if > 0. |
CSDRspotList |
intersection(CSDRspotList r1,
CSDRspotList r2)
intersection() - do the intersection of two RSL lists r3= intersection(r1,r2). |
int |
lookupIdxByRspot(CSDRspot dbR)
lookupIdxByRspot() - lookup index of Rspot object in RSL. |
int |
lookupIdxByRspot(int rNbr)
lookupIdxByRspot() - lookup index of Rspot number in RSL. |
CSDRspot |
lookupRspotByExactRspotXYcoord(float x,
float y)
lookupRspotByExactRspotXYcoord() - lookup Rspot set by exact Rspot set (xRspot,yRspot) coordinates. |
CSDRspot |
lookupRspotByExactRspotXYcoordDbug(float x,
float y,
int lmSetRsample,
int pSpotNbr)
lookupRspotByExactRspotXYcoordDbug() - DBUG version. |
CSDRspot |
lookupRspotByNearestERspotXYcoord(float x,
float y,
float minAcceptableDist)
lookupRspotByNearestERspotXYcoord() - lookup nearest ERspot set by (xERspot,yERspot) coordinates. |
CSDRspot |
lookupRspotByNearestRspotXYcoord(float x,
float y,
float minAcceptableDist)
lookupRspotByNearestRspotXYcoord() - lookup nearest Rspot set by (xRspot,yRspot) coordinates. |
CSDRspot |
lookupRspotByNearestRspotXYcoord(float x,
float y,
float minAcceptableDist,
boolean onlyERspotsFlag)
lookupRspotByNearestRspotXYcoord() - lookup nearest Rspot set by (xRspot,yRspot) coordinates. |
CSDRspot |
lookupRspotByNearestRspotXYcoord(int x,
int y,
float minAcceptableDist)
lookupRspotByNearestRspotXYcoord() - lookup nearest Rspot set by (xRspot,yRspot) coordinates. |
CSDRspot |
lookupRspotByRspotIDnbr(int rNbr)
lookupRspotByRspotIDnbr() - lookup Rspot set by ID number |
boolean |
regrow(int newSize)
regrow() - grow the RSL. |
boolean |
remove(CSDRspot dbR)
remove() - remove Rspot from RSL. |
boolean |
remove(int rNbr)
remove() - remove Rspot from RSL. |
boolean |
rightSize()
rightSize() - right-size the size of the RspotList to totRspots. |
boolean |
rightSize(boolean alsoRightSizeRpotsFlag)
rightSize() - right-size the size of the RspotList to totRspots. |
CSDRspot |
rmvFromHashtable(CSDRspot r)
rmvFromHashtable() - Remove Rspot from Rspot set hashtable. |
void |
setDefMinAcceptableDist(float defMinAcceptableDist)
setDefMinAcceptableDist() - set defMinAcceptableDist |
boolean |
setRspotsList(CSDRspot[] rspotsListData)
setRspotsList() - set the list of Rspot CSDRspot objects This makes a copy of the Rspots not of the rspotsListData array and assigned the rspotsNbrs[], sets up maxRspots, totRspots, nbrRspots, nbrERspots. |
void |
setUseXYhashFlag(boolean useXYhashFlag)
setUseXYhashFlag() - set useXYhashFlag to enable use of xyHash table. |
void |
sort()
sort() - sort the list of Rspot sets in ascending order by Rspot numbers |
java.lang.String |
toBriefXML()
toBriefXML() - get a brief string representation of this instance as XML. |
java.lang.String |
toFullXML()
toFullXML() - get a full string representation of this instance as XML. |
java.lang.String |
toString()
toString() - return a list of Rspot data for the List of Rspots. |
java.lang.String |
toStringFull()
toStringFull() - return a list of Rspot data for the List of Rspots. |
java.lang.String |
toStringIDs()
toStringIDs() - return a list of Rspot ID numbers for the list of Rspots. |
java.lang.String |
toXML(boolean useFullRspotFlag)
toXML() - get a string representation of this instance as XML |
CSDRspotList |
union(CSDRspotList r1,
CSDRspotList r2)
union() - do the union of two RSL lists r3= union(r1,r2). |
boolean |
writeBriefXML(java.io.BufferedWriter bw)
writeBriefXML() - write a brief representation of this instance as XML. |
boolean |
writeFullXML(java.io.BufferedWriter bw)
writeFullXML() - get a full string representation of this instance as XML. |
boolean |
writeXML(java.io.BufferedWriter bw,
boolean useFullRspotFlag)
writeXML() - get a string representation of this instance as XML |
Methods inherited from class O2Plib.db.CSD.CSDglb |
---|
initGlb |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String VERSION
public static final float DEF_MIN_ACCEPTABLE_DIST
public static int glbIdRSLcounter
public java.lang.String name
public java.lang.String timeStamp
public java.lang.String title
public int idRSL
public static int maxRspots
public static int totRspots
public static int nbrRspots
public static int nbrERspots
public int[] rspotsNbrs
public CSDRspot[] rspotsList
public boolean useXYhashFlag
public java.util.Hashtable xyHash
((int)xRmom & 0xFFFF) << 16 | ((int)yRmom) & 0xFFFF)
public float minBestFitXYdistance
public int minBestFitXYIdx
public float defMinAcceptableDist
Constructor Detail |
---|
public CSDRspotList()
public CSDRspotList(java.lang.String name, java.lang.String timeStamp, java.lang.String title)
name
- of the list of RspotstimeStamp
- when the list of Rspotstitle
- information of list of Rspots.Method Detail |
---|
public void clear()
public void setDefMinAcceptableDist(float defMinAcceptableDist)
defMinAcceptableDist
- - value to setpublic void setUseXYhashFlag(boolean useXYhashFlag)
useXYhashFlag
- - value to setpublic void init(int maxRspots)
maxRspots
- to initialize size of the maximum listpublic boolean regrow(int newSize)
newSize
- of the RSL list
public boolean rightSize()
public boolean rightSize(boolean alsoRightSizeRpotsFlag)
alsoRightSizeRpotsFlag
- also rightSize each of the Rspot sets.
public void sort()
public CSDRspot addRspotToHashtable(CSDRspot r)
((int)xRmom & 0xFFFF) << 16 | ((int)yRmom) & 0xFFFF)
r
- is Rspot set to add to the list of Rspotspublic CSDRspot addRspotToHashtableDbug(CSDRspot r, int pSpotNbr)
((int)xRmom & 0xFFFF) << 16 | ((int)yRmom) & 0xFFFF)
r
- is Rspot set to add to the list of RspotspSpotNbr
- is Rsample Pspot number being debuggedpublic CSDRspot rmvFromHashtable(CSDRspot r)
r
- is Rspot set to removepublic CSDRspot lookupRspotByExactRspotXYcoord(float x, float y)
x
- is Rspot set X coordinatey
- is Rspot set Y coordinate
public CSDRspot lookupRspotByExactRspotXYcoordDbug(float x, float y, int lmSetRsample, int pSpotNbr)
x
- is Rspot set X coordinatey
- is Rspot set Y coordinatelmSetRsample
- is the LMset number of spot being debuggedpSpotNbr
- is the Pspot number of spot being debugged
public CSDRspot lookupRspotByRspotIDnbr(int rNbr)
rNbr
- is Rspot number to lookup
public CSDRspot lookupRspotByNearestRspotXYcoord(int x, int y, float minAcceptableDist)
x
- is Rspot set X coordinatey
- is Rspot set Y coordinateminAcceptableDist
- is minimal acceptable distance.
public CSDRspot lookupRspotByNearestRspotXYcoord(float x, float y, float minAcceptableDist)
x
- is Rspot set X coordinatey
- is Rspot set Y coordinateminAcceptableDist
- is minimal acceptable distance.
public CSDRspot lookupRspotByNearestERspotXYcoord(float x, float y, float minAcceptableDist)
x
- is ERspot set X coordinatey
- is ERspot set Y coordinateminAcceptableDist
- is minimal acceptable distance.
public CSDRspot lookupRspotByNearestRspotXYcoord(float x, float y, float minAcceptableDist, boolean onlyERspotsFlag)
x
- is Rspot set X coordinatey
- is Rspot set Y coordinateminAcceptableDist
- is minimal acceptable distance.onlyERspotsFlag
- to only search ERspots in Rspot list.
public boolean addDbug(CSDRspot dbR, int rNbr, int pSpotNbr)
dbR
- is Rspot object (may be null)rNbr
- is Rspot number (MUST NOT be 0)pSpotNbr
- is Rsample Pspot number being debugged in
addRspotToHashtable(dbR,pSpotNbr) call.
public boolean add(CSDRspot dbR, int rNbr)
dbR
- is Rspot object (may be null)rNbr
- is Rspot number (MUST NOT be 0)
public boolean add(CSDRspot dbR)
dbR
- is Rspot object
public boolean add(int idNbr)
rNbr
- is Rspot idNbr number value
public int lookupIdxByRspot(int rNbr)
rNbr
- is Rspot number
public int lookupIdxByRspot(CSDRspot dbR)
dbR
- is Rspot object
public boolean remove(int rNbr)
rNbr
- is Rspot number
public boolean remove(CSDRspot dbR)
dbR
- is Rspot object
public CSDRspotList cloneIt()
dbR
- is Rspot object
public CSDRspotList intersection(CSDRspotList r1, CSDRspotList r2)
r1
- is RSLr2
- is RSL
public CSDRspotList union(CSDRspotList r1, CSDRspotList r2)
r1
- is RSLr2
- is RSL
public CSDRspotList difference(CSDRspotList r1, CSDRspotList r2)
r1
- is RSLr2
- is RSL
public int[] getRspotsNbrs()
public CSDRspot[] getRspotsList()
public boolean setRspotsList(CSDRspot[] rspotsListData)
rspotsListData
- is new list to use
public java.lang.String toStringIDs()
public java.lang.String toStringFull()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getTabDelimitedFieldsAndData(boolean useAnnotationFlag, boolean useNormFlag)
useAnnotationFlag
- - to add annotation fieldsuseNormFlag
- - to add normalization fields
public java.lang.String toBriefXML()
public boolean writeBriefXML(java.io.BufferedWriter bw)
bw
- is BufferedWriter to use
public java.lang.String toFullXML()
public boolean writeFullXML(java.io.BufferedWriter bw)
bw
- is BufferedWriter to use
public java.lang.String toXML(boolean useFullRspotFlag)
useFullRspotFlag
- add full Rspot else just Rspot number
public boolean writeXML(java.io.BufferedWriter bw, boolean useFullRspotFlag)
bw
- is BufferedWriter to useuseFullRspotFlag
- add full Rspot else just Rspot number
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |