More GriddedNDSet Questions

Kenneth Evans evans at aps.anl.gov
Fri Apr 6 10:29:48 MDT 2007


Hi,

 

I guess I still don't understand GriddedNDSets.  What I am trying to do this
time is the following:

 

I have a 2D array of intensity data as found, for example in an image.  If I
plot that as (x, y) -> Intensity using a Linear2DSet:

 

Linear2DSet( xMin, xMax, nX, yMin, yMax, nY)

 

Then I get a plot with the pixels showing as squares.  The squares are
centered at the values in the set and extend past the axes.

 

If I do the same thing, using a Gridded2DSet:

 

Gridded2DDoubleSet(domainType, new double[][] {xVals[0], yVals[0]}, nX, nY);

 

where xVals[0] is {xMin, ., xMax, Xmin,.} etc. (that is, they are intended
to be the same values as used in the Linear2DSet), then the squares get
turned into triangles, and nothing extends beyond the axes.  The two plots
don't "look" the same.  Apart from the overextending, the second appears
washed out.

 

In general, I want to do coordinate transformations, so the xVals and yVals
will be arbitrary.  In that case there will be distortion of the pixels, and
I can see that interpolation of some sort is necessary.  It just seems that
two results should look the same as long as there is no distortion.

 

Am I doing something wrong or is this just the way it is?

 

            -Ken



More information about the visad mailing list