org.shapelogic.imageprocessing
Enum PixelType

java.lang.Object
  extended by java.lang.Enum<PixelType>
      extended by org.shapelogic.imageprocessing.PixelType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<PixelType>

public enum PixelType
extends java.lang.Enum<PixelType>
implements java.lang.Comparable<PixelType>

Enum with types for annotating pixels. This is classification of all points on the foreground. How should these be ordered? I think maybe in priority sequence. And in numeric order too. What about the numbers? The last bit is a used bit I do not think that an enum is ordered in Java 6 What version of the color should I set? If I use the foreground as a guide then Let a 1 mean unused and set the unused

Author:
Sami Badawi

Enum Constant Summary
BACKGROUND_POINT
           
PIXEL_BORDER
           
PIXEL_EXTRA_NEIGHBOR
           
PIXEL_FOREGROUND_UNKNOWN
           
PIXEL_JUNCTION
           
PIXEL_L_CORNER
           
PIXEL_LINE_END
           
PIXEL_ON_LINE
           
PIXEL_SINGLE_POINT
           
PIXEL_SOLID
           
PIXEL_V_CORNER
           
 
Field Summary
 byte color
           
 
Method Summary
 boolean equalsIgnore(byte input)
           
 byte getColorUsed()
           
static PixelType getPixelType(byte input)
           
static boolean isUnused(byte input)
           
static boolean isUsed(byte input)
           
 int nonNegativeId()
           
static byte toUnused(byte input)
          Change a byte to unused version.
static byte toUnused(PixelType input)
          Change a byte to unused version.
static byte toUsed(byte input)
          Change a byte to used version.
static byte toUsed(PixelType input)
           
static PixelType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static PixelType[] 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
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Enum Constant Detail

BACKGROUND_POINT

public static final PixelType BACKGROUND_POINT

PIXEL_LINE_END

public static final PixelType PIXEL_LINE_END

PIXEL_SINGLE_POINT

public static final PixelType PIXEL_SINGLE_POINT

PIXEL_SOLID

public static final PixelType PIXEL_SOLID

PIXEL_EXTRA_NEIGHBOR

public static final PixelType PIXEL_EXTRA_NEIGHBOR

PIXEL_ON_LINE

public static final PixelType PIXEL_ON_LINE

PIXEL_BORDER

public static final PixelType PIXEL_BORDER

PIXEL_JUNCTION

public static final PixelType PIXEL_JUNCTION

PIXEL_L_CORNER

public static final PixelType PIXEL_L_CORNER

PIXEL_V_CORNER

public static final PixelType PIXEL_V_CORNER

PIXEL_FOREGROUND_UNKNOWN

public static final PixelType PIXEL_FOREGROUND_UNKNOWN
Field Detail

color

public final byte color
Method Detail

values

public static PixelType[] 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 (PixelType c : PixelType.values())
    System.out.println(c);

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

valueOf

public static PixelType 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

getPixelType

public static PixelType getPixelType(byte input)

getColorUsed

public byte getColorUsed()

equalsIgnore

public boolean equalsIgnore(byte input)

toUnused

public static byte toUnused(byte input)
Change a byte to unused version. That is change the last bit to be 1, except for background that only have one form


toUnused

public static byte toUnused(PixelType input)
Change a byte to unused version. That is change the last bit to be 1, except for background that only have one form


toUsed

public static byte toUsed(byte input)
Change a byte to used version. That is change the last bit to be 0


toUsed

public static byte toUsed(PixelType input)

isUsed

public static boolean isUsed(byte input)

isUnused

public static boolean isUnused(byte input)

nonNegativeId

public int nonNegativeId()


Copyright © 2009. All Rights Reserved.