Hello Bill and the list,
> If you have a FlatField
> whose domain Set is a Gridded3DSet with manifold dimension
> = 2 (the result of the resample() call above), then with
> proper ScalarMaps your display should be a 'solid' surface,
> possibly transparent.
The result of 'getManifoldDimension()' on my Gridded3DSet is definately
'2', though the 'getDimension()' call returns '3'. However, the horizontal
slice still displays as a grid of points and not a 'solid' surface, and
the transparency still does not appear. At the end of this message I am
going to include a summary of how the MathTypes and ScalarMaps are
declared at the end of this message.
First I wanted to describe he other odd behaivior I'm experiencing. If the
FlatField is not re-initialized before each call to resample(), the
following exception occurs:
visad.SetException: Gridded3DSet.valueToGrid: ManifoldDimension must be 3
at visad.Gridded3DSet.valueToGrid(Gridded3DSet.java:686)
at visad.GriddedSet.valueToInterp(GriddedSet.java:319)
at visad.FlatField.resample(FlatField.java:3350)
at visad.FunctionImpl.resample(FunctionImpl.java:190)
at sennev.SEView1b.setCDLevel(sennev/SEView1b.java:213)
However, if I re-new the FlatField first, the exception does not occur.
The odd thing is that in BOTH cases, the Manifold dimension of the
accompanying domain set is 2, and the Domain dimension is 3. So although
the exception would indicate that the problem is with some aspect of the
manifold dimension, the manifold dimension is the same for the succesful
and unsuccesful cases.
Here are the declarations --
The RealType declarations:
// I know that the units should be the built-in lat/lon,
// I'm getting to that
latitude = RealType.getRealType("latitude", SI.meter, null);
longitude = RealType.getRealType("longitude", SI.meter, null);
depth = RealType.getRealType("depth", SI.meter, null);
se = RealType.getRealType("Signal_Excess");
The display Implementation:
display = new DisplayImplJ3D("display1");
The ScalarMaps:
latMap = new ScalarMap( latitude, Display.YAxis );
lonMap = new ScalarMap( longitude, Display.XAxis );
depthMap = new ScalarMap( depth, Display.ZAxis );
seAlphaMap = new ScalarMap( se, Display.Alpha );
seRGBMap = new ScalarMap(se, Display.RGB);
Declaring the arrays:
depthSlice = new float[NROWS][NCOLS];
seDomain = new float[3][NROWS*NCOLS];
flat_samples = new float[1][NROWS * NCOLS];
The 3D RealTupleType for domain:
domain_tuple3D = new RealTupleType(latitude, longitude, depth);
Declaring the Gridded3DSet, FlatField, and DataReference:
domain_set3D = new Gridded3DSet(domain_tuple3D, seDomain,
1,NROWS* NCOLS);
func_domain_rgbVal = new FunctionType( domain_tuple3D, se);
vals_ff = new FlatField( func_domain_rgbVal, domain_set3D);
se_data_ref = new DataReferenceImpl("data_ref");
vals_ff.setSamples( flat_samples , false );
se_data_ref.setData((FlatField)vals_ff.resample(domain_set3D
Adding the Reference to the Display:
display.addReference(se_data_ref, new ConstantMap[] { new
ConstantMap( 1.0f, Display.PointSize ) });
Thanks again for your help.
Patrick
On Tue, 16 Oct 2001, From: Bill Hibbard <hibbard@xxxxxxxxxxxxxxxxx> wrote:
> > Thanks for your help -- moving to the gridded set works great, except for
> > a couple of things.
> >
> > Trying to resample the FlatField over the newly created domain (to change
> > the z-axis value of the horizontal slice) creates the following exception:
> >
> > visad.SetException: Gridded3DSet.valueToGrid: ManifoldDimension must be 3
> > at visad.Gridded3DSet.valueToGrid(Gridded3DSet.java:686)
> > at visad.GriddedSet.valueToInterp(GriddedSet.java:319)
> > at visad.FlatField.resample(FlatField.java:3350)
> > at sennev.SEView1b.setCDLevel(sennev/SEView1b.java:205)
>
> This Exception indicates that the domain Set of your
> FlatField has domain dimension less than 3 (e.g., 2).
> Your original volume data should be a FlatField whose
> domain dimension = 3, and your Set argument to this
> FlatField's resample() method should have manifold
> dimension = 2. The resample method should return a
> FlatField whose domain Set has manifold dimension = 2.
>
> > This is not a severe problem as I am able to simply recreate the flatfield
> > without any memory or performance problems.
> >
> > The second issue is that using the gridded 3D set creates a grid of points
> > to make up the horizonal slice, whereas we are intending a 'solid',
> > continuous surface that is also transparent (using the Display.Alpha
> > scalar map). I can make the surface appear continuous by increasing the
> > point size until the entire plane is filled, although zooming in to the
> > display still makes the gaps between points apparent, but the alphaMap
> > seems to have no effect of making the surface transparent with the 3D set,
> > which worked previously using the 2D set mapped to a value on the Z-Axis.
>
> This is strange, and may be because of something about
>
> > | ____________
> > | / /
> > | / / <--- transparent, solid
> > | / . /
> > |/__:_________/
> > | /
> > | /
> > |/
> > /_____________
>
> Cheers, Bill
>
>