I'm referring to an example shown below from the url you suggested. But
I'm wondering how to specify the Data object,
"d:\\visad\\data\\tes5.csv", before calling getType() on it. I don't
know of a Data constructor that can take in a string. Also, when I get
the FunctionType and call getDomain() on the FunctionType, it returns a
RealTupleType and I think TupleType.TupleComponents.length would then
give me the number of input fields. Would that be one way to extract the
number of input fields?
// get the MathType of a Data object named 'vis5d'
FunctionType vis5d_type = (FunctionType) vis5d.getType();
// extract time, the domain of the FunctionType
RealType time = (RealType) vis5d_type.getDomain().getComponent(0);
Also, if the exception was thrown because index was in the domain of the
function and it was mapped to iso-contour, are there other fields in the
Visad range that would produce the same error when index is mapped to
it? What about other input fields in the domain besides index?
Michelle Kam (408) 742-2881
Lockheed Martin Space Systems Co. SSM/ATC/MSIS
1111 Lockheed Martin Way, Sunnyvale, CA 94089
From: Bill Hibbard [mailto:billh@xxxxxxxxxxxxx]
Sent: Tuesday, July 22, 2003 3:38 AM
To: Kam, Michelle C
Subject: RE: ShadowFunctionOrSetType
> (index) -> (Time, x, y, z, q1, q2, q3, q4)
> Time[fmt=HH:mm:ss], x, y, z, q1, q2, q3, q4
> Here is an example of a mapping that throws the exception with
> "terminal LEGAL unimplemented: ShadowFunctionOrSetType.doTransform":
> index -> iso-contour
> q1 -> flow1radial
> q2 -> cyan
> q3 -> red
> q4 -> flow2Azimuth
> time -> value
> x -> Z offset
> y -> yellow
> z -> x offset
DataRenderers look for illegal combinations of MathType and
ScalarMaps. Default DataRenderers look for various patterns of
MathType and ScalarMaps that they know how to render - if they
cannot match a pattern but they are not illegal then you get
this 'LEGAL unimplemented' Exception. See
ShadowFunctionOrSetType.checkIndices() for the logic.
The specific reason you get this Exception is that you have a
ScalarMap 'index -> iso-contour' where index occurs in a
This question never comes up in a practical setting. If you
are interested in the theory of VisAD, then digging into the
code is really the wrong place. Start with my PhD thesis and
papers, then the Developer's Guide and DataRenderer tutorial.
> I was also wondering if there is a way in VisAD to find the number of
> input fields in a csv file. So in the email I sent earlier, there were
> input fields in the Visad mapping dialog box on the left column and
> wondering how to determine that number.
When TextForm or any VisAD file adapter returns a Data
object, you can answer questions like this by analyzing the
for a brief introduction to analyzing MathTypes.