| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||
java.lang.Objectjava.lang.Enum<Connectivity>
br.usp.ime.klava.segmentit.util.Connectivity
public enum Connectivity
Represents adjacency relations.
| Enum Constant Summary | |
|---|---|
CONNECTIVITY_4
Specifies that the neighbors of a given element are the elements localized around it, in the vertical (2) and horizontal (2) directions.  | 
|
CONNECTIVITY_8
Specifies that the neighbors of a given element are the elements localized around it, in the vertical (2), horizontal (2) and diagonal (4) directions.  | 
|
| Method Summary | ||
|---|---|---|
 java.util.List<Pixel> | 
getNeighbors(Pixel[][] matrix,
             Pixel pixel)
Returns a list with the neighbors of the pixel in the given
 matrix. | 
|
 | 
getNeighbors(T[][] matrix,
             int x,
             int y)
Returns a list with the neighbors of the element localized at (x,y) in the given matrix. | 
|
static Connectivity | 
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.  | 
|
static Connectivity[] | 
values()
Returns an array containing the constants of this enum type, in the order they are declared.  | 
|
| Methods inherited from class java.lang.Enum | 
|---|
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf | 
| Methods inherited from class java.lang.Object | 
|---|
getClass, notify, notifyAll, wait, wait, wait | 
| Enum Constant Detail | 
|---|
public static final Connectivity CONNECTIVITY_4
public static final Connectivity CONNECTIVITY_8
| Method Detail | 
|---|
public static Connectivity[] values()
for (Connectivity c : Connectivity.values()) System.out.println(c);
public static Connectivity valueOf(java.lang.String name)
name - the name of the enum constant to be returned.
java.lang.IllegalArgumentException - if this enum type has no constant
with the specified name
java.lang.NullPointerException - if the argument is null
public java.util.List<Pixel> getNeighbors(Pixel[][] matrix,
                                          Pixel pixel)
pixel in the given
 matrix.
matrix - the matrix of pixelspixel - the pixel whose neighbors will be returned
pixel in the given
         matrix
public <T> java.util.List<T> getNeighbors(T[][] matrix,
                                          int x,
                                          int y)
(x,y) in the given matrix.
T - the type of elements of matrixmatrix - the matrix of T elementsx - the x-coordinate of the element whose neighbors will be
            returnedy - the y-coordinate of the element whose neighbors will be
            returned
(x,y) in the given matrix
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||