[Kst] Image data type

Nicolas.Brisset at eurocopter.com Nicolas.Brisset at eurocopter.com
Thu Jul 22 10:53:29 CEST 2004

On Wednesday 21 July 2004 23:37, Barth Netterfield wrote:
> There are several ways to imagine '3d' data...
> A) Data on a regular grid, expressed as an array.
>         (imagine 'kst -z 1 -nx 200 -ny 200 array.dat')
> B) Data as a list of (x,y,z) points (as 3 arrays)  
>         (imagine 'kst -x 1 -y 2 -z 3 map.dat')
I would suggest extending that a bit to (x, y, z, color). I have developed in 
the past a small 'visual program' based on OpenDX (formerly IBM's 
DataExplorer, now Open Source) which took values resulting from a 
2-dimensional parameter sweep (giving the x,y coordinates of grid points, not 
necessarily regular) and plotted a 3D surface using a third variable as z, 
with the color of the surface mapped from the value of a fourth variable. It 
turned out to be quite useful... 
We even ended up adding the ability to map on the surface two series of 
contour lines from a 5th and 6th variable as it allowed to visualize 
correlations between variables in a very compact way ! I guess that contrasts 
with what has been said yesterday (that contour plots are in essence 2D 
objects) as in that case they were actually mapped to the 3D surface. But 
maybe that can be achieved from a 2D object ?

Well, I fear that sounds quite complicated. If anybody is interested, I could 
send the OpenDX 'program' I used (a sort of script actually) or even easier: 
pictures of the result. The thing has only 1 problem I never took enough time 
to solve: according to how (x,y) points are positioned sometimes the 
triangulation used in creating the surface connects points on opposite sides, 
which results in a very messy surface...

> C) Data as a list of points, with an implicit pixel index (eg, healpix)
>         (imagine 'kst -z 1 healpixmap.fits')
> D) various representations of surfaces which are not functions (eg, the
> surface of a sphere)
>         (don't imagine anything - we're not going here!)

> -----------
> Class (2) are openGL type objects, and will need a hightly modified mouse
> interface, etc.
I think there has already been some discussion to this in the past, but is it 
possible to reuse existing libraries from one of the following projects:
- k/qmatplot (which is Qt-based and uses OpenGL for 3D, with quite nice 
classes I think)
- scigraphica (gtk-based and maybe less easy to reuse, though I believe the 
product was pretty good until it was left unmaintained for a while)
- LabPLot (also Qt-based) ?

Then, there are also the very feature-rich libraries like VTK (which has nice 
Qt bindings I once saw somewhere on the web) or OpenDX which could certainly 
be reused...

Just my thoughts,


More information about the Kst mailing list