Package adams.flow.core
Enum TesseractPageSegmentation
- java.lang.Object
-
- java.lang.Enum<TesseractPageSegmentation>
-
- adams.flow.core.TesseractPageSegmentation
-
- All Implemented Interfaces:
EnumWithCustomDisplay<TesseractPageSegmentation>,EnumWithCustomParsing<TesseractPageSegmentation>,Serializable,Comparable<TesseractPageSegmentation>
public enum TesseractPageSegmentation extends Enum<TesseractPageSegmentation> implements EnumWithCustomDisplay<TesseractPageSegmentation>
The types of page segementation that Tesseract supports.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AUTO_NO_OSDAUTO_WITH_OSDFULL_AUTO_NO_OSDOSD_ONLYSINGLE_BLOCKSINGLE_CHARACTERSINGLE_COLUMNSINGLE_LINESINGLE_VERTICAL_BLOCKSINGLE_WORDSINGLE_WORD_CIRCLE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TesseractPageSegmentationparse(String s)Parses the given string and returns the associated enum.IntegertoCode()Returns the integer code.StringtoDisplay()Returns the display string.StringtoRaw()Returns the raw enum string.StringtoString()Returns the display string.static StringtoString(AbstractOption option, Object object)Returns the enum as string.static TesseractPageSegmentationvalueOf(AbstractOption option, String str)Returns an enum generated from the string.static TesseractPageSegmentationvalueOf(String name)Returns the enum constant of this type with the specified name.static TesseractPageSegmentation[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
OSD_ONLY
public static final TesseractPageSegmentation OSD_ONLY
-
AUTO_WITH_OSD
public static final TesseractPageSegmentation AUTO_WITH_OSD
-
AUTO_NO_OSD
public static final TesseractPageSegmentation AUTO_NO_OSD
-
FULL_AUTO_NO_OSD
public static final TesseractPageSegmentation FULL_AUTO_NO_OSD
-
SINGLE_COLUMN
public static final TesseractPageSegmentation SINGLE_COLUMN
-
SINGLE_VERTICAL_BLOCK
public static final TesseractPageSegmentation SINGLE_VERTICAL_BLOCK
-
SINGLE_BLOCK
public static final TesseractPageSegmentation SINGLE_BLOCK
-
SINGLE_LINE
public static final TesseractPageSegmentation SINGLE_LINE
-
SINGLE_WORD
public static final TesseractPageSegmentation SINGLE_WORD
-
SINGLE_WORD_CIRCLE
public static final TesseractPageSegmentation SINGLE_WORD_CIRCLE
-
SINGLE_CHARACTER
public static final TesseractPageSegmentation SINGLE_CHARACTER
-
-
Method Detail
-
values
public static TesseractPageSegmentation[] 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 (TesseractPageSegmentation c : TesseractPageSegmentation.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TesseractPageSegmentation valueOf(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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
toDisplay
public String toDisplay()
Returns the display string.- Specified by:
toDisplayin interfaceEnumWithCustomDisplay<TesseractPageSegmentation>- Returns:
- the display string
-
toCode
public Integer toCode()
Returns the integer code.- Returns:
- the integer code
-
toRaw
public String toRaw()
Returns the raw enum string.- Specified by:
toRawin interfaceEnumWithCustomDisplay<TesseractPageSegmentation>- Returns:
- the raw enum string
-
toString
public String toString()
Returns the display string.- Overrides:
toStringin classEnum<TesseractPageSegmentation>- Returns:
- the display string
-
parse
public TesseractPageSegmentation parse(String s)
Parses the given string and returns the associated enum.- Specified by:
parsein interfaceEnumWithCustomParsing<TesseractPageSegmentation>- Parameters:
s- the string to parse- Returns:
- the enum or null if not found
-
toString
public static String toString(AbstractOption option, Object object)
Returns the enum as string.- Parameters:
option- the current optionobject- the enum object to convert- Returns:
- the generated string
-
valueOf
public static TesseractPageSegmentation valueOf(AbstractOption option, String str)
Returns an enum generated from the string.- Parameters:
option- the current optionstr- the string to convert to an enum- Returns:
- the generated enum or null in case of error
-
-