public class CellCntrMarkerVector extends Vector<CellCntrMarker>
Modifier and Type | Field and Description |
---|---|
private Color |
color
Color of markers.
|
private int |
type
Type ID of markers.
|
capacityIncrement, elementCount, elementData
modCount
Constructor and Description |
---|
CellCntrMarkerVector(int type)
Creates a new instance of MarkerVector.
|
Modifier and Type | Method and Description |
---|---|
void |
addMarker(CellCntrMarker marker)
Adds a marker to the vector.
|
void |
clearShapeData()
Delete shape data during reset of vector.
|
static Color |
createColor(int typeID)
Returns a marker color according to given type ID.
|
Color |
getColor()
Get color of markers.
|
CellCntrMarker |
getMarker(int n)
Returns a marker from the vector.
|
CellCntrMarker |
getMarkerFromPosition(Point p,
int sliceIndex)
Get marker closest to given point position in given slice.
|
int |
getType()
Get type of markers.
|
int |
getVectorIndex(CellCntrMarker marker)
Returns the index of the given marker.
|
void |
removeLastMarker()
Removes the last marker from the vector.
|
void |
removeMarker(int n)
Deletes marker with given index from vector.
|
void |
setColor(Color color)
Set color of markers.
|
void |
setType(int type)
Set type of markers.
|
boolean |
shapeDataAvailable()
Check if there is shape data available.
|
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, forEach, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeIf, removeRange, replaceAll, retainAll, set, setElementAt, setSize, size, sort, spliterator, subList, toArray, toArray, toString, trimToSize
finalize, getClass, notify, notifyAll, wait, wait, wait
parallelStream, stream
private int type
private Color color
public CellCntrMarkerVector(int type)
type
- ID of the markers.public void addMarker(CellCntrMarker marker)
marker
- Marker to be added.public CellCntrMarker getMarker(int n)
n
- Index of marker to be returned.public int getVectorIndex(CellCntrMarker marker)
marker
- Marker for which to retrieve its index.public void removeMarker(int n)
n
- Index of marker to be deleted.public void removeLastMarker()
public void clearShapeData()
public CellCntrMarker getMarkerFromPosition(Point p, int sliceIndex)
p
- Point position.sliceIndex
- Index of slice.public int getType()
public void setType(int type)
type
- Type to set.public Color getColor()
public void setColor(Color color)
color
- Color to set.public boolean shapeDataAvailable()
public static Color createColor(int typeID)
For ID from 1 to 8 pre-defined colors are used. For IDs greater than 8 a random color is chosen.
typeID
- ID of the markers.Copyright © 2010–2020 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.