Khoros 2 Polymorphic Data Services


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.

Polymorphic Data 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.

ILLUSTRATION OF POLYMORPHIC DATA MODEL


Figure 4: An overview of the Polymorphic Data Model. The polymorphic model consists of five data segments, with each segment serving a specific purpose. The value segment consists of data element vectors organized into a time-series of volumes. The volume of value data can be given explicit locations in space with the location segment; one location vector is provided for each value vector in a single volume. The volumes of value data can be given explicit locations in time with the time segment; a time-stamp may be given for each volume in time. A mask segment is available for marking value data validity. A map segment is also provided; the value data can be used to index into the map data.

Value Data

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.

ILLUSTRATION OF VALUE DATA


Figure 5: Polymorphic Value Data. The value segment of the polymorphic model is best pictured as a time-series of volumes. Each volume consists of element vectors oriented according implicitly along width, height, depth, time and elements. Each element can be indexed directly by a 5-tuple position.

Location Data

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.

ILLUSTRATION OF LOCATION DATA


Figure 6: Polymorphic Location Data. The location segment of the polymorphic model is used to explicitly position the volume vectors in space. The location segment consists of a volume of location vectors; the width, height, and depth, of this volume is shared from the value segment. The location vector is of size dimension.

Time Data

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.

ILLUSTRATION OF TIME DATA


Figure 7: Polymorphic Time Data. The time segment of the polymorphic model is used to explicitly position the value volumes in time. The location segment consists of a linear array of time stamps; the number of timestamps is equivalent to the time size of the value segment.

Mask Data

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.

ILLUSTRATION OF MASK DATA


Figure 8: Polymorphic Mask Data. The mask segment of the polymorphic model is used to mark data validity of the value points. The mask segment is exactly the same size as the value segment.

Map Data

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.

ILLUSTRATION OF MAP DATA


Figure 9: Polymorphic Map Data. The map segment of the polymorphic model is used store a lookup-table of map vectors. Values in the value segment are then used as indices into the map; the value points map to indices along the map height. The map vector runs along the map width. A number of map width x map height planes may exists; the map size may match the depth, time, and element size of the value segment by specifying the appropriate map depth, map time, and map elements.

Polymorphic Example 1 : Storage of an RGB Image

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.

POLYMORPHIC EXAMPLE 1

Polymorphic Example 2 : Storage of a Signal

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.

POLYMORPHIC EXAMPLE 2

Polymorphic Example 3 : Storage of an Animation with RGB Colormap

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.

POLYMORPHIC EXAMPLE 3


DIP Feedback Form

Copyright © 1995 KRI, ISTEC, Ramiro Jordán, Roberto Lotufo. All Rights Reserved.