[Top] [Prev] [Next] [Bottom]
Chapter
5
Vgroups (V API)
5.1 Chapter Overview
This chapter describes the vgroup data model and the vgroup API. The first section describes the vgroup data model. The second section presents the vgroup API, followed by a presentation of a programming model for vgroups. The next three sections describe the use of the API in accessing vgroups, creating vgroups and reading from vgroups. The final two sections cover vgroup utilities and obsolete vgroup routines.
5.2 The Vgroup Data Model
A vgroup is a structure designed to associate related objects. Data organization within a vgroup resembles the UNIX file system. (See Figure 5a.) The general structure of vgroups are similar to UNIX directories or subdirectories in that a vgroup may contain references to other vgroups or data objects. In previous versions of HDF, the data objects in a vgroup were limited to vdatas. Any HDF data object can now be included within a vgroup.
FIGURE 5a Similarity of the HDF Vgroup Structure and the UNIX File System
5.2.1 Vgroup Names and Classes
Vgroups have attributes that can be used for the purpose of searching for and classifying them. Two such attributes are the vgroup name and the vgroup class. A vgroup name is a character string that can be used to describe the contents of a specific vgroup. A vgroup name can be used as a primary key in searches.
A vgroup class is also a character string and can be also used in searches for a specific vgroup. The purpose of a vgroup class is to allow an application to determine the intended use of its members. For example, a vdata object named "Storm Tracking Data - 5/11/94" and another vdata object named "Storm Tracking Data - 6/23/94" can be grouped together under a vgroup named "Storm Tracking Data - 1994". If the data was collected in Anchorage, Alaska the class name might be "Anchorage Data", particularly if other vgroups contain storm track data collected in different locations. The specific use of the vgroup name and class name is solely determined by the HDF users.
5.2.2 Vgroup Organization
There are many ways to organize vgroups through the use of the Vgroup API. Vgroups may contain any number of groups and data objects, including data objects and vgroups that are members of other vgroups. Therefore, an object may have more than one parent vgroup. For example, Data object A and Vgroup B, shown in Figure 5b, are members of multiple vgroups with different organizational structures.
FIGURE 5b Sharing Vgroups and Vdatas Among Vgroups
A vgroup can contain any combination of HDF data objects. Figure 5c illustrates a vgroup that contains two raster image sets and a vdata.
FIGURE 5c A Vgroup Containing Two 8-Bit Raster Image Sets, or RIS8 Objects, and a Vdata
5.2.3 Vgroup Conventions: An Example Using Vsets
Although vgroups can contain any combination of objects, it is often useful to establish conventions on the content and structure of vgroups. For example, a type of vgroup called a vertex set or vset, is often used by scientific and graphics programmers to describe the surfaces of an object as well as its properties. This structure is used by NCSA Polyview for viewing meshes and other objects that can be described by polygonal data.
A vset consists of one list of coordinate data, one list of connectivity data and one list of node property data. These three lists are stored in separate vdata objects within the vset.
Each n-dimensional coordinate in the coordinate list defines the relative location of a vertex, or node. Each item of connectivity data represents an edge between two vertices and a list of this edge data is referred to as a connectivity list , which describes one polygon. Connectivity lists are a table of comma-separated numbers, with each number representing the position of one particular node in the table of nodes. For example, the number "2" as an item in a connectivity list would represent the second entry in the node table. Node properties are user-defined values attached to each node within the polygon and can be numbers or characters.
For example, consider a heated mesh of 400 triangles formed by connecting 1000 nodes. A vset describing this mesh might contain the coordinates of the vertices, the temperature value of the vertices and a connectivity list describing the edges of the triangles. This vset configuration is the one used most often by graphics applications like NCSA Polyview and is illustrated in Figure 5d below.
FIGURE 5d Vset Structure Describing a Heated Mesh
[Top] [Prev] [Next] [Bottom]
hdfhelp@ncsa.uiuc.edu
HDF User's Guide - 06/04/97, NCSA HDF
Development Group.