com.xinapse.filter
Enum FilterBoundaryCondition

java.lang.Object
  extended by java.lang.Enum<FilterBoundaryCondition>
      extended by com.xinapse.filter.FilterBoundaryCondition
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<FilterBoundaryCondition>

public enum FilterBoundaryCondition
extends java.lang.Enum<FilterBoundaryCondition>

An enumeration of possible boundary conditions when applying a SpatialFilter. The FilterBoundaryCondition determines the behaviour of a SpatialFilter when the kernel does not completely fit within the array of pixel values that is being filtered (i.e., it determines the filtered pixel values that are near the boundary of the image).

The examples given for each boundary condition illustrate the behaviour for 1-D kernel filter with a kernel of width 5. An array of pixel values on the left behaves as the array on the right when that boundary condition is applied.


Enum Constant Summary
NEAREST
          Use the value at the boundary: [1 2 3 4 5] → [1 1 1 2 3 4 5 5 5].
REFLECT
          Reflect the array at the boundary: [1 2 3 4 5] → [2 1 1 2 3 4 5 5 4].
WRAP
          Periodically replicate the array: [1 2 3 4 5] → [4 5 1 2 3 4 5 1 2].
ZERO
          Use a zero value: [1 2 3 4 5] → [0 0 1 2 3 4 5 0 0].
 
Method Summary
static FilterBoundaryCondition getInstance(java.lang.String bc)
          Returns the FilterBoundaryCondition corresponding to the supplied string.
static FilterBoundaryCondition valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static FilterBoundaryCondition[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

NEAREST

public static final FilterBoundaryCondition NEAREST
Use the value at the boundary: [1 2 3 4 5] → [1 1 1 2 3 4 5 5 5].


WRAP

public static final FilterBoundaryCondition WRAP
Periodically replicate the array: [1 2 3 4 5] → [4 5 1 2 3 4 5 1 2].


REFLECT

public static final FilterBoundaryCondition REFLECT
Reflect the array at the boundary: [1 2 3 4 5] → [2 1 1 2 3 4 5 5 4].


ZERO

public static final FilterBoundaryCondition ZERO
Use a zero value: [1 2 3 4 5] → [0 0 1 2 3 4 5 0 0].

Method Detail

values

public static FilterBoundaryCondition[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (FilterBoundaryCondition c : FilterBoundaryCondition.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static FilterBoundaryCondition valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getInstance

public static FilterBoundaryCondition getInstance(java.lang.String bc)
                                           throws java.lang.IllegalArgumentException
Returns the FilterBoundaryCondition corresponding to the supplied string.

Parameters:
bc - a java.lang.String which is one of "NEAREST", "WRAP", "REFLECT", or "ZERO".
Throws:
java.lang.IllegalArgumentException - if bc does not match any of these,


Copyright 2006-2011 Xinapse Systems Limited. All Rights Reserved.