Content
Introduction
supervisor: Peter Rautek
student: Stefan Marek
This web page is the documentation of the computer science project
"Volumetric Flow Visualization", done in the summer term 2006.
The content of this page is optimized for a resolution of 1024*768 pixels.
Project Tasks
The volumetric flow (see optical flow in 2D) is defined as the change of the volume over time.
We define the volumetric flow on a regular grid. At each voxel position on the grid, a vector is defined, which is the flow on this position.
Between voxels the volumetric flow is defined by the trilinear interpolation of the surrounding voxels.
The project "Volumetric Flow Visualization" is divided in three subtasks: The specification, the visualization and the categorization of the volumetric flow.
The goals of this computer science project are the first two subtasks: the interactive specification and visualization of the volumetric flow.
- Editing of Volumetric Flow:
The aim of the application is an easy to use interface with intuitive possibilities of interaction, that describe and change the volumetric flow.
Interactive editing of the volumetric flow is done as follows:
The user specifies a local coordinate system by selecting a position at the
visible surface and a direction vector.
Then the program calculates an area where the deformation takes place which
can be seen as an oriented bounding box with extends in each direction of the
half direction vector length.
Inside this box volume each voxel gets an inverse volumetric flow vector assigned.
Each flow vector is calculated by multiply the direction vector with the projected
distance of the voxel position with the direction vector.
The result is a specification of a volumetric deformation in an selected area where
each voxel position has a direction vector which shows to the volume surface.
- Visualization:
The visualization of the volumetric flow is done by a volume deformation driven by the volumetric flow.
We implemented the volume deformation approach as follows:
At each voxel position a vector is specified that stores the inverse volumetric flow.
During rendering each voxel position those optical flow vectors which are not null
where followed to a corresponding voxel position.
The density value of the corresponding voxel will be used as value for the actual
voxel position.
In other words each voxel will be rendered with a color value based on the transfer function
of the corresponding voxel density.
- Clustering of the Flow:
The volumetric flow can be splitted into clusters, which are differentiated by their properties
(direction, gradient magnitude, opacity, ...).
The cluster can be shown in different ways.
The idea is described for video in the paper
Motion Magnification
In this computer science project clustering was not implemented.
Program Description
For the implementation of the project the framework VolumeShop was used. This framework is written in C++, OpenGL and GLSL and was developed with Visual Studio 2003. The project is developed and tested with the dataset "hand_small.dat".
![]() |
The picture shows the program with the loaded dataset "hand_small.dat" and a user defined transfer function. |
Requirements
The hardware requirements are the same as for volume shop, which means:
- Nvidia graphics card series 6xxx or higher.
- sufficient RAM for the loaded dataset
User Interface
The user interface is basically devided into two parts 1. Controls and 2. View. The following paragraphs will give a short overview of this two sections.
![]() |
The picture shows the relevant controls of the program. The open dataset control allows to load a new dataset. For this application an import option which is called "Optical Flow Importer" has to be used for loading the dataset. With the transfer function control the user can specify a transferfunction. The optical flow management section contains two sliders. The optical flow slider can be used to change the step width of the volumetric flow. With the gaussian sigma slider the sigma value of the gaussian function can be changed. In the viewing area there are two for this application relevant buttons. The interactor icon is a button which can be used to set user interaction int the viewing area. The renderer icon is also a button which can be selected to render the volumetric flow ino the viewing area. |
Controls:
The controls are basically the same as you will find in the volume shop.
At the bottom of the control section you will find a new control group
which is called "Optical Flow Management".
There are two sliders in this group. The first slider with the label "Optical Flow"
allows the manipulation of the time steps used for rendering the volumetric optical
flow. The range of the slider is between 0 and 20.
The second slider with the label "Gaussian Sigma" is meant for changing the
sigma value of the normal distribution used for defining the optical flow
vectors. Its values are within the parameters of 0.0 and 4.0.
On the right top side of the application window you will find two buttons which
are meant for user interaction and rendering of the volumetric flow.
![]() |
![]() |
![]() |
The picture shows the new control section. "Optical Flow" slider has a range between 0 and 20. "Sigma Gaussian" sider has a range between 0.0 and 4.0. |
The picture shows the interactor icon. Activating this icon allows user interaction in the viewing area. |
The picture shows the rendering icon. Pushing this icon renders the volumetric flow into the viewing area. |
Viewing Area:
The viewing area shows the interactive rendering of the deformed object. Changes in the controls will directly affect the rendering in the viewing area.
Functionality
General Description:
The functionality of the Application is implemented in three modules:
1. Data Importer
2. Interactor
3. Volumetric Flow Renderer
The following section will give a more detailed overview of these modules:
Data Importer:
The data importer module is implemented as a volume shop plugin.
The functionality is the same as the data importer plugin except for the
gradient vectors which are all set to vectors of size zero.
Interaktor:
The interactor plugin is the main part of the project. In this module
the optical flow vector is calculated. The user defines a position on the
volume surface and a second position in an arbitrary direction. As a result of this user interaction the
flow is calculated in the specified region. The direction of the flow is given by the direction of the user interaction.
This information is used to generate the inverse optical flow vectors by weighting the direction
vector with a normal distribution around the specified axis. The new vector will be saved on the voxel positions inside
a region around the user selected volume position. This region is given by an oriented
bounding box with extends of the direction vectors half length.
Volumetric Flow Renderer:
The renderer plugin renders the volumetric flow with direct
volume rendering. The gradients are calculated on the fly in the rendering
loop of the fragment shader. The iteration over the time steps is done in a loop of the fragment shader that renders the volumetrical flow.
Conclusion
The tasks implemented are editing and visualization. Where editing is
done by drawing a line in the viewing area. The line is interpreted
as a common direction of the flow. For each voxel in an area around the
user selection (given by an oriented bounding box) an optical flow
vector is assigned. These vectors are interpreted as optical flow over time
and are used for visualization of the volumetric flow.
The following pictures show results of the volumetric flow visualization.
![]() |
![]() |
hand with gaussian sigma 2 and time step 0 | hand with gaussian sigma 2 and time step 5 |
![]() |
![]() |
hand with gaussian sigma 2 and time step 10 | hand with gaussian sigma 2 and time step 15 |
![]() |
![]() |
bone hand with gaussian sigma 2 and time step 20 | skin hand with gaussian sigma 2 and time step 20 |