CogOCVMaxCharacterIterator ClassCognex VisionPro 9.8 SR1
This class provides easy access to character-level properties and methods of the CogOCVMaxPattern object. With this class you can navigate amongst all of the character positions within a single line within a single paragraph. You may NOT directly construct this object. Instead, use the CreateCharacterIterator method on either the containing line's iterator or on the top level CogOCVMaxPattern object. Also note that this class can not be persisted.
Inheritance Hierarchy

System Object
  Cognex.VisionPro.OCVMax CogOCVMaxCharacterIterator

Namespace: Cognex.VisionPro.OCVMax
Assembly: Cognex.VisionPro.OCVMax (in Cognex.VisionPro.OCVMax.dll) Version: 75.0.0.0
Syntax

public class CogOCVMaxCharacterIterator

The CogOCVMaxCharacterIterator type exposes the following members.

Methods

  NameDescription
Public methodCopy 
Return a newly created character iterator that is functionally identical to this one - it will have the same character position within the same enclosing line within the same enclosing paragraph.
Public methodCopy(Int32)
Return a newly created character iterator corresponding to the specified character position within the same enclosing line and the same enclosing paragraph as this character iterator. The argument is a positional offset from the current character position, so a value of zero will yield a new character iterator that is functionally identical to this one.
Public methodCreateLineIterator
Return a newly created line iterator corresponding to the containing line. This provides access to this character iterator's parent.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetDisplayCharacter
Get the character that should be displayed on a graphical user interface for the position specified by this character iterator. This is useful for character positions for which the (train time) key set has more than one value. Note that this assumes that the character keys in the font correspond to Unicode code point values.
Public methodGetDisplayCharacterKey
Get the key of the character that should be displayed on a graphical user interface for the position specified by this character iterator. This is useful for character positions for which the (train time) key set has more than one value.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetKeysetCharacterKeys
Get an array of System::Int32 corresponding to the (train time) key set for the character position specified by this character iterator. Each element of this array is the key value of a character that may occur at this position.
Public methodGetKeysetCharacters
Get a String corresponding to the (train time) key set for the character position specified by this character iterator. Each individual character in this string may occur at this position.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodMoveToNext
Move the character iterator to the next character position within the containing line. If the iterator is already at the end position before this call, MoveToNext generates an exception. You may wish to check the IsEnd property before calling MoveToNext in order to avoid errors.
Public methodMoveToPosition
Move the character iterator to the specified position within the containing line. If the argument is zero, move to the first character position in the line. If the argument is -1, move to the end character position in the line. An exception is generated if the argument is not valid.
Public methodMoveToPrevious
Move the character iterator to the previous character position within the containing line. If the iterator is already at the initial position before this call, MoveToPrevious generates an exception. You may wish to check the IsFirst property before calling MoveToPrevious in order to avoid errors.
Public methodSetDisplay(Char)
Set the character that should be displayed on a graphical user interface for the position specified by this character iterator. This is useful for character positions for which the (train time) key set has more than one value. Note that this assumes that the character keys in the font correspond to Unicode code point values.
Public methodSetDisplay(Int32)
Set the key of the character that should be displayed on a graphical user interface for the position specified by this character iterator. This is useful for character positions for which the (train time) key set has more than one value.
Public methodSetKeyset( Int32 )
Set the (train time) key set for the character position specified by this character iterator. The key values are passed in as an array of System::Int32 in which each element is the key value of a character that may occur at this position.
Public methodSetKeyset(String)
Set the (train time) key set for the character position specified by this character iterator. The key values are passed in as a System::String in which each character corresponds to a member of the key set for this position. Note that this assumes that the character keys in the font correspond to Unicode code point values.
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Top
Properties

  NameDescription
Public propertyIsEnd
Whether or not this iterator is positioned past the last character in the containing line.
Public propertyIsFirst
Whether or not this character position is the initial character position within the containing line.
Public propertyIsInvalid
Whether or not this iterator is NOT positioned at a valid character. If true, attempting to access character-level properties or methods will produce an error.
Public propertyLinePosition
Indicates the relative position of the containing line within the containing paragraph. Numbering is zero based, so a value of zero indicates that this character resides in the initial line of the containing paragraph.
Public propertyParagraphPosition
Indicates the relative position of the containing paragraph within the CogOCVMaxPattern object. Numbering is zero based, so a value of zero indicates that this character resides in the initial paragraph of the CogOCVMaxPattern object.
Public propertyPosition
Indicates the relative position of this character within the containing line. Numbering is zero based, so a value of zero indicates that this is the initial character of the containing line.
Public propertyVerificationType
Get or set the type of verification to be performed on the associated character position. Possible values are Normal, AlwaysVerified, and Ignore. Normal is standard OCV. In Normal mode a character may be judged Verified, or Confused, or Failed. In AlwaysVerified mode we score every key in the keyset associated with this character position and choose the highest scoring key, always judging the character as Verified. In Ignore mode we do no processing at all for the subject character. In Ignore mode the character is always judged Verified. Note that while this may be viewed as a train-time property, there is an analogous run-time property accessible via the CogOCVMaxRunParams::GetVerificationType(...) and CogOCVMaxRunParams::SetVerificationType(...) methods. While one would typically set the train-time and the run-time values to the same value, that is not always required. One may NOT set the train-time value (this value) to Ignore and then set the run-time value to anything other than Ignore; doing so will cause a run-time error.
Top
See Also