RE: your mail

Hi Michelle,

First, I would call the SpreadSheet's setAutoDetect(false) method
to disable automatic mapping detection, since you are just going
to set up your own maps anyway.

Then you are going to construct an array of ScalarMaps, which you
will pass to BasicSSCell's setMaps() method, to define your maps.
An example of the ScalarMap constructor is:
    ScalarMap map = new ScalarMap(rtype, Display.XAxis);

Where "rtype" is the RealType from your data's MathType that
identifies which aspect of your data you want mapped, and
Display.XAxis signifies a mapping to the display's X axis.

For example, if you have an image with MathType:
      ((x, y) -> (r, g, b))
a common set of mappings might be:
     x -> Display.XAxis
     y -> Display.YAxis
     r -> Display.Red
     g -> Display.Green
     b -> Display.Blue

If you are confused, I suggest you check out Ugo Taddei's
VisAD tutorial at:

It will give you a rundown of VisAD basics such as MathTypes
and ScalarMaps.


At 04:21 PM 6/10/2003, you wrote:
>Hi Curtis,
>It turns out that I needed Java 3D to be re-installed on my computer to see
>the image in 3D! 
>What I'm trying to do now is replace the current default mappings that come
>up when I first load small.v5d with my own mappings. I've been tracing
>through all this code and it looks like the data structure that holds the
>actual mappings is ScalarMaps[]? 
>I looked through the classes you mentioned, but I was wondering where the
>actual mappings within ScalarMap[] are assigned. Or is it maps[]? I want to
>just copy that method (wherever it may be) and hard code a different set of
>mappings. But I'm having a hard time determining where that lies without
>getting sent from class to class within the visAD package.
>"The mapping dialog is brought up by a call to FancySSCell.addMapDialog().
>The ScalarMap array is created by MappingDialog when the "Done" button is
>clicked at  Then, FancySSCell.addMapDialog()
>takes that array and passes it to its setMapsAuto() method, which calls
>BasicSSCell.setMaps() after switching to the proper cell dimension for those
>mappings (under the right conditions).
>The maps are actually added in BasicSSCell.setMaps() at BasicSSCell:1629."

  • 2003 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: