Polymorphic data services is the most powerful of all the application data services. The polymorphic data model implemented by this service is designed to encompass many application domains. This model can be used to represent data for application domains as diverse as image processing, volume processing, signal processing, computer vision, and numerical analysis. By capitalizing on the commonality of data interpretation across these different domains, the polymorphic model facilitates interoperability of data manipulation routines. In other words, a processing routine written with polymorphic services will be able to process data objects containing anything from signals to images and from to volumes to animations.
This section provides a general explanation of the polymorphic data model, as well as some examples of how data sets from different processing domains are stored in the model.
The polymorphic data model is based on the premise that data sets are usually acquired from or generated to model real-world phenomena. The polymorphic model thus consists of data which exists in three-dimensional space and one-dimensional time. You can picture the model most easily as a time-series of volumes in space. This time-series of volumes is represented by five different data segments. Each segment of data has a specific meaning dictating how it should be interpreted. Specifically, these five segments are value, location, time, mask, and map. All of these segments are optional; a data object may contain any combination of them and still conform to the polymorphic model.
The value segment is the primary data segment, consisting of data element vectors organized implicitly into a time-series of volumes. The value data may be given explicit positioning in space and time with the location and time segments. The remaining two segments are provided for convenience. The mask segment is used to mark the validity of each point of value data. The map segment is provided as an extension to the value data; the value data can be used to index into the map data. Figure 6 provides an overview of the polymorphic model.
The value data segment is the primary storage segment in the polymorphic data model. Most of the data manipulation routines are specifically geared toward processing the data stored in this segment. In an imaging context, the individual pixel RGB values would be stored in here. In a signal context, regularly sampled signal amplitudes would be stored here.
The value segment consists of a time-series of volumes where each volume is composed of element vectors. Each element vector is composed of a number of value points. The size of the value segment is determined by the width, height, and depth of the volume, by the number of volumes through time, and by the number of points in the element vector.
The value points in the value segment are stored implicitly in a regularly gridded fashion. Explicit location information can be added using the location segment. If the value data is irregularly sampled in space, the explicit location of each sample can be stored here. Specifically, the information stored in this segment serves to position each the value data in explicit space. Note that the location data only explicitly positions a single volume; the position then holds for each volume through time.
The location segment consists of a volume of location vectors. The width, height, and depth of the volume are identical to the volume size of the value segment. Different location grid types are supported. A curvilinear grid allows for explicit locations to be specified for each vector in the value data. A rectilinear grid allows for explicit locations to be given for the width, height, and depth axes. A uniform grid allows for explicit location corner markers to be specified.
Explicit time information can be added using the time segment. If each volume of value data is irregularly sampled in time, an explicit timestamp for each volume can be stored here. This is useful in animations where each frame of the animation occurs at a different time.
The time segment consists of a linear array of timestamps. The number of timestamps matches the time size of the value segment.
The mask segment is available for flagging invalid values in the value segment. If a processing routine produces values, such as NaN or Infinity, these values can be flagged in the mask data so that later routines can avoid processing them. A mask point of zero is used to mark invalid value points, while a mask point of one is used to mark valid value points.
The mask segment identically mirrors the value segment in size; there is one mask point for each value point.
In cases where the value data contains redundant vectors that are duplicated in different positions, the map segment may be used. The value vectors are replaced with values which index into the map; the map then contains the actual data vectors. In this sense, the map is an extension of the value segment.
The map segment consists of a number of width-height planes. The values from the value segment map into the map height indices. The map vector runs along the map width. A simple map would consist of just a single width-height plane; a more complicated map would have a width-height plane for every depth, time, and element plane in the value segment. This provides a great deal of mapping flexibility. For example, every plane in a volume or every image in an animation could have a separate map.
This example illustrates the storage of a simple RGB image. This image utilizes only the value segment. The image is 512 pixels wide by 480 pixels high. The pixels are stored along width and height in the value segment. The depth and time size of the value segment are each 1. The RGB values for each pixel are stored down elements; thus the element size is 3. The other segments are not used.
This example illustrates the storage of a regularly-sampled time signal. The sampled points are stored in the value segment along time, thus the time size is equal to the number of samples N. The width, height, depth, and element sizes are all 1. The other segments are not used.
This example illustrates the storage of a mapped animation. The frames of animations are stored in five width x height value planes through time. The depth and element size of the value segment are one. Each point in the value segment maps into the map segment. The values index into the map height; there are 256 available RGB vectors in this example. Because the map contains RGB values, the map width is three. This map segment contains a single colormap for each frame of animation, thus the map time is 5. If the map time had been 1, then the entire animation would have referred to a single colormap. The time segment is used to store timestamps for each frame of the animation. The mask and location segments are not utilized.