|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbr.usp.ime.klava.segmentit.structures.HierarchyNode
public abstract class HierarchyNode
Abstract node of a hierarchy of nested partitions.
Method Summary | |
---|---|
abstract javax.swing.tree.MutableTreeNode |
buildSubTree()
Returns a MutableTreeNode representation of this
HierarchyNode for visualization in a tree view. |
abstract void |
deactivateSubTree()
Sets active to false to all the basins under
this HierarchyNode in the hierarchy. |
java.lang.String |
description()
Returns a String representation of the subtree of the hierarchy rooted by this HierarchyNode . |
abstract java.lang.String |
description(int level)
Returns a String representation of the subtree of the hierarchy rooted by this HierarchyNode . |
abstract java.util.Collection<HierarchyNode> |
getChildren()
Returns the HierarchyNode s from which this HierarchyNode
was constructed. |
java.awt.Color |
getColor()
Returns the random Color associated to this HierarchyNode
. |
int |
getLabel()
Returns the label of this HierarchyNode . |
HierarchyNode |
getMaximumBasin()
Returns the currently highest HierarchyNode of the hierarchy that
contains this HierarchyNode . |
AbstractMetric |
getMetric()
Returns the AbstractMetric associated with this
HierarchyNode . |
abstract int |
getNumPixels()
Returns the number of pixels in this HierarchyNode . |
HierarchyInternalNode |
getParent()
Returns the HierarchyInternalNode that contains directly this
HierarchyNode (its parent in the TreeOfCriticalLakes ). |
int |
getValue(int waterLevel)
Returns the value of the metric of this HierarchyNode according
to the metric used to build the hierarchy . |
boolean |
isActive()
Returns if this HierarchyNode is currently active in the
hierarchy (if it belongs to the selected partition). |
void |
merge()
Activates this HierarchyNode , deactivating all its descendants. |
void |
paint(java.awt.image.BufferedImage image)
Paints this HierarchyNode with the color associated to its label
in the hierarchy. |
abstract void |
paint(java.awt.image.BufferedImage image,
java.awt.Color color)
Paints this HierarchyNode with the given color . |
abstract void |
paintHierarchy(java.awt.image.BufferedImage image)
Paints the partition selected on the hierarchy (according to the active values) limited to the region that this
HierarchyNode represents. |
void |
randomizeColor()
Assigns a random Color to this HierarchyNode . |
void |
refine()
Deactivates this HierarchyNode , activating its children. |
void |
resetHierarchy()
Disconnects this HierarchyNode from a hierarchy, setting its
parent to null . |
void |
setActive(boolean active)
Sets if this HierarchyNode belongs to the selected partition of
the hierarchy. |
void |
setParent(HierarchyInternalNode parent)
Sets the HierarchyInternalNode that contains this
HierarchyNode . |
abstract void |
setThreshold(int threshold)
Selects a partition on the hierarchy according to a threshold value. |
java.lang.String |
toString()
Returns the label of this HierarchyNode . |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public boolean isActive()
HierarchyNode
is currently active in the
hierarchy (if it belongs to the selected partition).
true
if this HierarchyNode
is a region of
the selected partition in the hierarchypublic void setActive(boolean active)
HierarchyNode
belongs to the selected partition of
the hierarchy.
active
- indicates if this HierarchyNode
belongs to the
selected partition of the hierarchypublic int getLabel()
HierarchyNode
.
HierarchyNode
public HierarchyInternalNode getParent()
HierarchyInternalNode
that contains directly this
HierarchyNode
(its parent in the TreeOfCriticalLakes
).
HierarchyInternalNode
parent of this
HierarchyNode
public void setParent(HierarchyInternalNode parent)
HierarchyInternalNode
that contains this
HierarchyNode
.
parent
- the HierarchyInternalNode
that contains this
HierarchyNode
public AbstractMetric getMetric()
AbstractMetric
associated with this
HierarchyNode
.
AbstractMetric
associated with this
HierarchyNode
public abstract java.util.Collection<HierarchyNode> getChildren()
HierarchyNode
s from which this HierarchyNode
was constructed.
HierarchyNode
s from which this HierarchyNode
was constructedpublic abstract javax.swing.tree.MutableTreeNode buildSubTree()
MutableTreeNode
representation of this
HierarchyNode
for visualization in a tree view.
HierarchyNode
and all
HierarchyNode
s below it in the hierarchypublic abstract void paint(java.awt.image.BufferedImage image, java.awt.Color color)
HierarchyNode
with the given color
.
image
- the image where this HierarchyNode
will be paintedcolor
- the Color
to be used to paint this
HierarchyNode
public abstract void paintHierarchy(java.awt.image.BufferedImage image)
active
values) limited to the region that this
HierarchyNode
represents.
image
- the image where the partition will be paintedpublic abstract void setThreshold(int threshold)
threshold
value.
threshold
- the threshold value to select a partition in the hierarchypublic abstract void deactivateSubTree()
active
to false
to all the basins under
this HierarchyNode
in the hierarchy.
public abstract java.lang.String description(int level)
HierarchyNode
.
level
- the indentation level to be used in the description
HierarchyNode
public abstract int getNumPixels()
HierarchyNode
.
HierarchyNode
public void refine()
HierarchyNode
, activating its children.
public void merge()
HierarchyNode
, deactivating all its descendants.
public void resetHierarchy()
HierarchyNode
from a hierarchy, setting its
parent
to null
.
public int getValue(int waterLevel)
HierarchyNode
according
to the metric
used to build the hierarchy
.
waterLevel
- the current level of the water used to calculate the metric
HierarchyNode
public HierarchyNode getMaximumBasin()
HierarchyNode
of the hierarchy that
contains this HierarchyNode
.
HierarchyNode
of the hierarchy that
contains this HierarchyNode
public java.awt.Color getColor()
Color
associated to this HierarchyNode
.
Color
associated to this HierarchyNode
public void randomizeColor()
Color
to this HierarchyNode
.
public void paint(java.awt.image.BufferedImage image)
HierarchyNode
with the color associated to its label
in the hierarchy.
image
- the image where this HierarchyNode
will be paintedpublic java.lang.String toString()
HierarchyNode
.
toString
in class java.lang.Object
public java.lang.String description()
HierarchyNode
.
HierarchyNode
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |