Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

Re: Display of two objects

Hi Lourena,

> I have a single file containing information about a river salinity and
> bathymetry(the ground).
>
> I would like to:
> - read this file and create two different objects (ground and salinity
> volume);

Most file format adapters (e.g., Plain for netCDF) will
read a file as one Data object, but VisAD includes methods
for splitting data objects. Such as the extract() method
of Field, which lets you split a Field like:

  ((x, y) -> (salinity, bathymetry))

into:

  ((x, y) -> salinity)

and:

  ((x, y) -> bathymetry)

> - construct a scene graph with both;
> - display them together at a spreadsheet cell.

Just pass each Data object to the setData() method of
a different DataReferenceImpl, and pass those to the
addReference() methods of a single DisplayImpl. I am
not sure how to do this with SpreadSheet cells.

> I would also like to be able to manipulate them separately, for example,
> performing clipping at the volume
> representing the salinity, triangulating the bathymetry, or just showing
> one of them at a time, etc.

Clipping applies to the whole Display, not to individual
depicted Data objects. To clip only one, they would have
to be in side-by-side Displays.

Individually enabling and disabling their depiction can be
done with calls to the toggle() methods of their DataRenderers.

> I don't have much experience using VisAD, so don't know how to
> accomplish these tasks exactly.

The first order of business is to spend some time working
through Ugo's excellent tutorial.

> Should I custom a DataRenderer, DisplayRenderer and a ShadowType?

These are very advanced subjects. You can do almost everything
without thinking about such things. First study the tutorial.

Good luck,
Bill


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690