Thanks Bill. I am getting to understand VisAD concepts better as I find
time to check it out. So please bear with me:). The surface examples
and the FlatField.makeFieild() methods were helpful and I am able to
display 2D surfaces for geologic layers (well, computed). It looks like
a FlatField with a (x,y)-to-depth FunctionType and a Linear2DSet can do
the job for my data. Fancier FunctionTypes and ScalarMaps for color
coding depth values are cool too. Hopefully I can use VisAD for more
extensive 3D visualization and volume rendering of oil & gas reservoirs,
gelogical features, etc.
For now, I am not sure if I load the surface data arrays correctly (and
not being a geologist, I can't tell from the pictures:). My data comes
in three columns (x, y, depth) with x varying first and then y,
something like:
x y depth
1 1 some value
2 1 ...
3 1 ...
1 2 ...
2 2 ...
3 2 ...
Linear2DSet can be good for this; I know the xy grid bounds and steps.
To load the FlatField sample set as I parse this file I do:
for (int y=0; y < yGridSize.intValue(); y++) {
for (int x=0; x < xGridSize.intValue(); x++) {
line = data.readLine();
tokens = new StringTokenizer(line);
// skip over x & y and get depth
tokens.nextToken(); tokens.nextToken();
dataArr[0][x + xGridSize.intValue()*y]
Float.valueOf(tokens.nextToken()).doubleValue();
}
}
image.setSamples(dataArr);
Does this load dataArr correctly for visad? Thanks,
-- mohamad
LANL
"William L. Hibbard" wrote:
> Hi Mohamad,
>
> Most of the examples/TestNN.java demos (where 00 <= NN <= 54)
> use FlatFields whose domain sets are Linear1DSet, Linear2DSet
> or Linear3DSet, which extend Gridded1DSet, Gridded2DSet and
> Gridded3DSet. These programs demonstrate many different ways
> of displaying data. These FlatFields are constructed by calls
> to FlatField.makeField. When its last parameter is false,
> makeField returns a FlatField whose domain Set is Linear.
> The dimension is the dimension of the domain type of the
> FunctionType that is the first parameter of makeField.
>
> Cheers,
> Bill
>
> ----------------------------------------------------------
> Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI 53706
> whibbard@xxxxxxxxxxxxx 608-263-4427 fax: 608-263-6738
> http://www.ssec.wisc.edu/~billh/vis.html
>