| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbr.usp.ime.klava.segmentit.structures.PrimitiveCatchmentBasinsGraph
public class PrimitiveCatchmentBasinsGraph
Represents a graph where the vertices are
 PrimitiveCatchmentBasins.
| Constructor Summary | |
|---|---|
PrimitiveCatchmentBasinsGraph(java.awt.image.BufferedImage image,
                              Connectivity connectivity)
Constructs a region adjacency graph derived from image and
 connectivity, where there is a primitive catchment basin for
 each regional minima of image (classical watershed
 partition). | 
|
PrimitiveCatchmentBasinsGraph(java.awt.image.BufferedImage image,
                              int thresholdLevel,
                              Connectivity connectivity)
Constructs a region adjacency graph derived from image and
 connectivity, where there is a primitive catchment basin for
 each connected component of the threshold at level
 thresholdLevel of image (the threshold of
 image is utilized as markers in the watershed from markers
 algorithm). | 
|
PrimitiveCatchmentBasinsGraph(PrimitiveCatchmentBasinsGraph graph,
                              java.awt.image.BufferedImage originalImage)
Derives a PrimitiveCatchmentBasinsGraph with the same structure
 of the given graph, but with the gray levels of the pixels in the
 originalImage. | 
|
| Method Summary | |
|---|---|
 int[] | 
distanceToTheBorders(int[] labels)
Returns the distance of each vertex to the borders of the partition derived from labels. | 
 PrimitiveCatchmentBasin | 
getBasin(int label)
Returns the vertex labeled by label. | 
 java.awt.image.BufferedImage | 
getBasinsImage(ColorSpace colorSpace)
Returns an image with each PrimitiveCatchmentBasin painted
 with a unique color. | 
 Connectivity | 
getConnectivity()
Returns the adjacency relation between pixels used to build the primitive catchment basins of this graph.  | 
 Pixel | 
getGeneratorPixelBetween(PrimitiveCatchmentBasin basin1,
                         PrimitiveCatchmentBasin basin2)
Returns the pixel of basin1 that generated the edge linking
 basin1 to basin2. | 
 int | 
getHeight()
Returns the height of the image represented by this graph.  | 
 java.util.List<Edge> | 
getIncidentEdges(int label)
Returns a List of Edges that links the vertex labeled by
 label to its neighbors. | 
 java.util.List<Edge> | 
getIncidentEdges(PrimitiveCatchmentBasin basin)
Returns a List of Edges that links basin to its
 neighbors. | 
 int | 
getNumVertices()
Returns the number of vertices of this graph.  | 
 java.util.List<Edge> | 
getOrderedEdges()
Returns a List with the edges of this graph, ordered by
 their weights. | 
 PrimitiveCatchmentBasin[] | 
getPathsFromBasin(PrimitiveCatchmentBasin basin,
                  int[] labels)
Returns the predecessors map that defined the paths from basin to
 all other basins of the same label as it (within the region of interest) | 
 Pixel[][] | 
getPixels()
Returns the pixels of the image represented by this graph.  | 
 java.util.List<PrimitiveCatchmentBasin> | 
getVertices()
Returns a List with the vertices of this graph. | 
 int | 
getWidth()
Returns the width of the image represented by this graph.  | 
| Methods inherited from class java.lang.Object | 
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public PrimitiveCatchmentBasinsGraph(java.awt.image.BufferedImage image,
                                     Connectivity connectivity)
                              throws ColorImageException
image and
 connectivity, where there is a primitive catchment basin for
 each regional minima of image (classical watershed
 partition).
image - the input imageconnectivity - the adjacency relation between pixels to be used to build the
            primitive catchment basins of this graph
ColorImageException
public PrimitiveCatchmentBasinsGraph(PrimitiveCatchmentBasinsGraph graph,
                                     java.awt.image.BufferedImage originalImage)
                              throws ColorImageException
PrimitiveCatchmentBasinsGraph with the same structure
 of the given graph, but with the gray levels of the pixels in the
 originalImage.
graph - the PrimitiveCatchmentBasinsGraph from which the new
            PrimitiveCatchmentBasinsGraph will be derivedoriginalImage - the image to get the gray levels from
ColorImageException - if originalImage is a color image
public PrimitiveCatchmentBasinsGraph(java.awt.image.BufferedImage image,
                                     int thresholdLevel,
                                     Connectivity connectivity)
                              throws ColorImageException
image and
 connectivity, where there is a primitive catchment basin for
 each connected component of the threshold at level
 thresholdLevel of image (the threshold of
 image is utilized as markers in the watershed from markers
 algorithm).
image - the input imagethresholdLevel - a threshold level to be used to select markers for the
            partitionconnectivity - the adjacency relation between pixels to be used to build the
            primitive catchment basins of this graph
ColorImageException| Method Detail | 
|---|
public int getNumVertices()
public java.util.List<PrimitiveCatchmentBasin> getVertices()
List with the vertices of this graph.
List with the vertices of this graphpublic java.util.List<Edge> getOrderedEdges()
List with the edges of this graph, ordered by
 their weights.
List with the edges of this graphpublic java.util.List<Edge> getIncidentEdges(int label)
List of Edges that links the vertex labeled by
 label to its neighbors.
label - the label associated to a vertex
List of Edges that links the vertex labeled by
         label to its neighborspublic java.util.List<Edge> getIncidentEdges(PrimitiveCatchmentBasin basin)
List of Edges that links basin to its
 neighbors.
basin - a vertex of this graph
List of Edges that links basin to its
         neighborspublic int[] distanceToTheBorders(int[] labels)
labels.
labels - a labeling of the vertices of this graph
public PrimitiveCatchmentBasin[] getPathsFromBasin(PrimitiveCatchmentBasin basin,
                                                   int[] labels)
basin to
 all other basins of the same label as it (within the region of interest)
basin - a PrimitiveCatchmentBasin from which the paths will be
            computedlabels - the labeling that defines the regions of interest in this
            graph
basin to the
         others nodes in the same region of interest
public Pixel getGeneratorPixelBetween(PrimitiveCatchmentBasin basin1,
                                      PrimitiveCatchmentBasin basin2)
basin1 that generated the edge linking
 basin1 to basin2.
basin1 - a vertex of this graphbasin2 - another vertex of this graph
basin1 that generated the edge linking
         basin1 to basin2public Pixel[][] getPixels()
public PrimitiveCatchmentBasin getBasin(int label)
label.
label - the label of a primitive catchment basin that is a vertex of
            this graph
label,
         null if label is an invalid labelpublic int getHeight()
public int getWidth()
public Connectivity getConnectivity()
public java.awt.image.BufferedImage getBasinsImage(ColorSpace colorSpace)
PrimitiveCatchmentBasin painted
 with a unique color.
PrimitiveCatchmentBasin painted
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||