Click here to Skip to main content
Click here to Skip to main content

Scalar Data Visualization Part 1

, 11 Aug 2006 CPOL
Rate this:
Please Sign up or sign in to vote.
This is an introduction for a series of articles about scalar data visualization. This part will introduce the data structure used in my project.

Introduction

This article will introduce you to a new concept which is known as data visualization. The whole tool will be explained in detail across many articles. In this article, I will explain the data structure and some of the file structures used.

Background

A previous knowledge of Data structures, Generics in C#2.0 and file structure.

File Structure

I'm using a file format used by a very famous visualization tool, tecplot. It uses 4 different file structures. For more details, you can refer to the file structure documentation.

Data Structure

There exist two main problems in defining the data structure which the tool is going to be built upon.

The first problem resulted from the various file structures being used. Data is presented in four formats and you still need to apply some algorithms and techniques to these structures. So, it's inconvenient to code a given algorithm four times for each format. What we need to solve this problem is a generic data structure. That acts as a layer between the algorithms and visualization techniques and the various file formats. We can simply imagine that we need an interface between the logic and the data format.

The second problem is that data isn't always static. Some algorithms to operate need to apply preprocessing or restructuring on the data like adaptive techniques that will be explained in later parts in detail.

So, the suitable solution for these problems is to make a hierarchical data structure, similar to the one used in 3D Studio Max. The benefits of this structure will get more clear as we proceed in more advanced visualization techniques.

Data Structure

Using the Code

Let's navigate through the code. you'll find some lists, generics, that hold the data in the hierarchical form we discussed above.

Class ScoOteRParser
{
protected List<Point> Points;

protected List<Edge> Edges;

protected List<Face> Faces;

protected List<Polygon> Polygons;

protected List<Element> Elements;
.
.
.
.
.
}

Below is the part of the code that's responsible for transforming the data from the various file formats to our generic hierarchical data structure:

public bool Load(string FileName){...}
#region Data Relation extraction functions
private void ReadPoints(int PointsNum){...}
private void ReadBlock(int PointsNum){...}
private bool ReadUnstructuredZone(string ZoneHeader, type Type){....}
private bool ReadFiniteElementZone(string ZoneHeader, type Type){....}
#endregion

By now, we've read the various file structures and put them into a standard data structure and we're ready to apply our data visualization techniques. You can start from here with the Line contouring algorithm.

History

  • 11th August, 2006: Initial post

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Nvidia Registered game developer.
Teaching Assistant,
Faculty of computer and information sciences,
Ain Shams University.
SmartLabZ QT Developer.
Have an experience of more than 2 years in c++(QT/MFC/ATL/Win32),c#, GDI,DirectX

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.1411022.1 | Last Updated 11 Aug 2006
Article Copyright 2006 by I_gO_tO_schoOl_by_scoOter
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid