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
At 04:21 PM 6/10/2003, you wrote:
>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 MappingDialog.java:1125-1126. 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."