This topic contains the following sections.
In VisionPro, each image has an associated coordinate space tree. Each space within the coordinate space tree has a name. You can use these names
- to look up an existing space.
- to identify a space when creating a new space or renaming an existing one.
- to indicate which spaces exist and the parent/child relationships between them.
- to extract coordinate transformations between different spaces in the tree.
You can express the name of any nonroot space in three ways:
- as an individual nonqualified (NQ) name,
- as a fully-qualified (FQ) pathname through the tree, starting at the root space, or
- as a partially-qualified (PQ) pathname, starting from a user-supplied space.
The individual name given to a nonroot coordinate space is its nonqualified name. Nonqualified names must conform to the following syntactic rules:
- The name must contain at least one character.
- The name must not contain any nonprinting characters.
- The name must not contain any slashes of either type (/ or \).
- The name must not contain any whitespace except for the space character.
- The name must not be “.”, “..”, “…”, “^”, or “$”.
- The name must not begin or end with a space character.
- The name must not begin with a punctuation character (as defined by the ISO iswpunct() function).
You can use a NQ name to specify the name of a new coordinate system or the replacement name for an existing coordinate system. In this case, you must specify a name that is different from the NQ name of all other spaces that share the same parent. The name comparison is case-insensitive. If the name is not unique, the coordinate space tree by default returns an error and fails to create the new space.
All coordinate spaces that share the same parent must have unique NQ names, however this does not guarantee that NQ names will be unique throughout the entire coordinate space tree. A single NQ name may be attached to multiple spaces in the tree.
You may also use nonqualified names to look up a coordinate space that already exists in the tree. During lookup a search is conducted for the given NQ name, starting at the root space and extending recursively through all child spaces. If the NQ name is found exactly once during the search the found space is the unique, desired space. Errors result if the name is not found or if the name is found more than once.
A fully-qualified name is a complete pathname that starts at the root space. It specifies a unique space in the tree. A typical FQ name is created by concatenating NQ names onto the name of the root space, delimiting each NQ name with the slash character “\”. For example, the fully-qualified name for space X in a tree with root A might be “A\B\C\X”.
The coordinate space tree always returns FQ names delimited with the “\” character, but it accepts either forward “/” or backward “\” slashes as a legal separator in input names. For convenience, the name “^” is considered to be an alias for the root space. Thus the following fully-qualified name is legal and equivalent to the previous example: “^\B\C\X”.
FQ names have two main advantages:
- They resolve potential ambiguities in the tree. For example, if a tree contains two spaces with an NQ name of "X", then the name "X" is ambiguous but "A\B\C\X" is not.
- They provide more efficient lookup operations in large trees because no searching is required.
The root space’s name is a fully-qualified name. You do not define this space, but you can change its name. If you rename the root space, the new name must follow all of the rules for NQ names, except that it may begin with a punctuation character.
Note: You should not change the root space name of any coordinate space tree that is attached to an image. These trees must have a root space of "@" for VisionPro to operate properly.
A partially-qualified name is a slash-delimited pathname that starts at a space in the tree that you specify and indicates a unique space in a tree. Partially-qualified names require this separate starting space name to resolve any space name ambiguities. In VisionPro, the selected space name of an image is often used as the starting space. For example, a space name of "." is typically interpreted to mean the selected space name of the current image.
Partially-qualified names must begin with either “.”, an alias for the current user-supplied space, or “..”, an alias for its parent space. You can concatenate additional names using the “\” character as a separator. The additional names can be NQ names, “.”, “..”, or a combination of all three.
Partially-qualified names have the same advantages as FQ names: they are unambiguous and efficient to look up. They also permit shorter name strings and isolate you from all spaces in the tree which are not children of the starting space.
Each user space that you create has a unique name; you specify the name of the space when you create the user space. In addition to user names, the following special space names are defined by VisionPro:
| Symbol | Description |
| @ | Root space. |
| # | Pixel space. |
| * | Display pixel space. You can use this special name only when specifying the space name for graphics. |
| ^ | Alias for the root space. |
| . | Current SelectedSpaceName for an image. You can use this special name only with methods implemented by the CogImage object; there is no "selected space" for a CogCoordinateSpaceTree. |
| .. | Parent space name of the current selected space. |
| $ | The child coordinate space created by a parent space for its children. The VisionPro graphics system uses "$" to allow multigenerational hierarchies of shapes. You can obtain this space using a graphic's GetParentFromChildTransform method. |
You may need to check the validity of a space name and return an error if the name is illegal or does not appear in a coordinate space tree. You can do this easily if the appropriate tree is available. You use the tree's VerifyName or LookUpName methods. However, if the tree is not available, you can use the CheckSpaceNameSyntax method to check the validity of a supplied space name.