More GriddedNDSet Questions
Curtis Rueden
ctrueden at wisc.edu
Mon Apr 16 22:16:36 MDT 2007
Hi Ken,
Sorry for the trouble with the build. I have posted the previous version of
Makefile.WinNT, before the inclusion of those new directories:
http://skyking.microscopy.wisc.edu/curtis/Makefile.WinNT
>BTW can I run "nmake -f Makefile.WinNT debug classes" to get the JAR
>file at the same time, or do I have to do these separately?
Give it a shot; it will probably work (it works with regular make).
> Now that that part is fixed, I am having a problem with the aspect ratio.
I
> was using ProjectionControl.setAspectCartesian for the displayImplJ2D. I
> can't get that to work for displayImplJ3D, possibly because that one
scales
> and I don't know what to do about z.
As far as I know, the behavior should be the same for J2D and J3D. Test57
and Test58 in the examples directory call setAspectCartesian with Java3D an
d
Java2D, respectively, and it seems to work as expected. You could try
writing a small test program and switching between J2D and J3D to see if yo
u
can isolate a change in behavior.
> Also, I no longer have a box and TwoDDisplayRendererJ3D.setBoxOn(true)
> doesn't seem to work. Nor does TwoDDisplayRendererJ3D.setBoxAspect(new
> double[] {width, height, 1}) or anything else I've tried.
It is possible that your OS/Java/Java3D combination does not render the box
correctly, but I am a bit surprised. Are you running an older version of
Windows? I have seen XP with Java 1.4+ work correctly with Java3D 1.4+.
-Curtis
On 4/16/07, Tom Whittaker <tomw at ssec.wisc.edu> wrote:
>
> Sorry, Kenneth -- that's the latest makefile from our cvs reposityor and
> includes some directories added after the last release.
>
> I'll have to get the "right" version for you tomorrow -- but I'm tied up
> in meetings until
> after 1pm CDT. In the meantime, you could edit the makefile and remove
> the references to this
> directory, along with "loci/formats/gui" if there is one. Curtis might
> comment further...
>
> tom
>
> On 4/16/07, Kenneth Evans <evans at aps.anl.gov> wrote:
> >
> > HI,
> >
> >
> >
> > I got the Makefile.WinNT. It runs until it gets the following error:
> >
> >
> >
> > …
> >
> > javac -J-mx64m -g data\netcdf\in\*.java
> >
> > javac -J-mx64m -g data\netcdf\out\*.java
> >
> > javac -J-mx64m -g data\netcdf\*.java
> >
> > javac -J-mx64m -g ..\loci\formats\*.java
> >
> > javac -J-mx64m -g ..\loci\formats\codec\*.java
> >
> > error: cannot read: ..\loci\formats\codec\*.java
> >
> > 1 error
> >
> > NMAKE : fatal error U1077: 'c:\j2sdk1.4.2_06\bin\javac.EXE' : return
> > code '0x1'
> >
> > Stop.
> >
> > NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio
> > 8\VC\BIN\nmake.EXE"' : return code '0x2'
> >
> > Stop.
> >
> >
> >
> > [There doesn't seem to be a loci\formats\codec.]
> >
> >
> >
> > BTW can I run "nmake -f Makefile.WinNT debug classes" to get the JAR
> > file at the same time, or do I have to do these separately?
> >
> >
> >
> > Thanks,
> >
> >
> >
> > -Ken
> > ------------------------------
> >
> > *From:* owner-visad at unidata.ucar.edu [mailto:owner-visad at unidata.ucar.e
du]
> > *On Behalf Of *Tom Whittaker
> > *Sent:* Monday, April 16, 2007 1:29 PM
> > *To:* Kenneth Evans
> > *Cc:* Visad
> > *Subject:* Re: More GriddedNDSet Questions
> >
> >
> >
> > Kenneth:
> >
> > Sorry about that. You can pick up a copy of Makefile.WinNT at:
> >
> > <ftp://ftp.ssec.wisc.edu/pub/ssec/tomw/Makefile.WinNT>
> >
> > Also, on Windows you will need "nmake" to run this.
> >
> > We are gradually switching over to using ant for the builds, but you
> > will need Ant version 1.7 or above
> > on Windows. If you want to go that route, I've put the current ''
> > build.xml" file on that same server.
> >
> > There will be a VisAD update coming out soon -- just not finished
> > testing yet....
> >
> > tom
> >
> > On 4/16/07, *Kenneth Evans* <evans at aps.anl.gov> wrote:
> >
> > >> If you're ready to compile VisAD from its source…
> >
> >
> >
> > I thought I was and have done that before. There are two problems:
> >
> >
> >
> > 1. I am on Windows and when I extracted the new visad_src.jar, there
> > seems to be no Makefile.WinNT in the visad directory.
> >
> >
> >
> > 2. I recall it didn't make the visad.jar before. The way I am set up
> > now, it would be easy to replace the JAR file but not easy to set the b
uild
> > path. (The reason is that it is set up as an Eclipse plug-in.) So how
do I
> > make the JAR.
> >
> >
> >
> > The third problem is that I am leaving for Germany and France on Friday
> > (and would like to have this working). Consequently, my time is limite
d for
> > the trial and error approach.
> >
> >
> >
> > I can also do Cygwin builds, but I recall that didn't work before.
> >
> >
> >
> > Thanks for any help,
> >
> >
> >
> > -Ken
> > ------------------------------
> >
> > *From:* owner-visad at unidata.ucar.edu [mailto:owner-visad at unidata.ucar.e
du]
> > *On Behalf Of *Bill Hibbard
> > *Sent:* Sunday, April 15, 2007 3:17 PM
> >
> >
> > *To:* Kenneth Evans, Jr.; Visad
> > *Subject:* RE: More GriddedNDSet Questions
> >
> >
> >
> > Ken,
> >
> > All the evidence you present says that the system is using
> > texture mapping with your Linear2DSet and not using texture
> > mapping with your Gridded2DDoubleSet (the slowness is
> > consistent with not using texture mapping). If you're ready to
> > compile VisAD from its source, you could uncomment the
> > print statements for the computation of the isTextureMap
> > and curvedTexture flags, in the ShadowFunctionOrSetType.java
> > file in the visad package. Uncomment two sets of print
> > statements, between (at least in the old version of source
> > on my home machine) lines 453-477 and lines 713-733.
> > It would be a good idea to eliminate all displayed data
> > except the Field of interest, so you don't confuse with the
> > print output of other data.
> >
> > Feel free to send the results to the list, and we'll try to
> > figure out what's happening.
> >
> > Good luck,
> > Bill
> >
> > ----- Original Message -----
> > From: "Kenneth Evans, Jr."
> > To: Visad
> > Subject: RE: More GriddedNDSet Questions
> > Date: Sat, 14 Apr 2007 12:01:57 -0500
> >
> > Bill,
> >
> >
> >
> > I am attaching a picture of what I get with the Gridded2DDouble set.
> > They are triangles and don't extend beyond the plot range, whereas with
the
> > Linear2D set, they are pixels and extend .5 pixel beyond the plot bound
ary
> > (presumably TextureMaps). Moreover, the display is verrry slow in the
> > Gridded2DDouble case. The lines of code that are different in the two
cases
> > are:
> >
> >
> >
> > // Create the domain set
> >
> > if (xVals2D == null && yVals2D == null) {
> >
> > // Define a linear domain set with the indices
> >
> > domainSet = new * Linear2DSet*( xMin, xMax, nX, yMin, yMax, nY)
;
> >
> > System.* out*.* println*( "Linear2DSet");
> >
> > } else {
> >
> > xVals1D = new double [1][ nX * nY];
> >
> > yVals1D = new double [1][ nX * nY];
> >
> > xVals1D[0] = VUtils.*convert2DArrayTo1DArray*( xVals2D, nY, nX)
;
> >
> > yVals1D[0] = VUtils.*convert2DArrayTo1DArray*( yVals2D, nY, nX)
;
> >
> > domainSet = new * Gridded2DDoubleSet*( domainType, new double [
][]
> > {
> >
> > xVals1D [0], yVals1D [0]}, nX , nY );
> >
> > System.* out*.* println*( "Gridded2DDoubleSet");
> >
> > }
> >
> >
> >
> > This is from a generic 2D plot class. If you give it x and y values it
> > uses the Gridded2DDoubleSet, otherwise the Linear2DSet. I can send the
> > whole file, if necessary. The domainTypes are defined:
> >
> >
> >
> > // Define types
> >
> > xType = RealType.*getRealType*( xLabel, null, null);
> >
> > yType = RealType.*getRealType*( yLabel, null, null);
> >
> > RealType[] domainTypes = new RealType[2];
> >
> > domainTypes[0] = xType;
> >
> > domainTypes[1] = yType;
> >
> > domainType = new *RealTupleType* (domainTypes);
> >
> >
> >
> > The fact that it is slow is more important to me than that is using
> > triangles.
> >
> >
> >
> > gmc.getTextureEnable returns true in both cases. I don't explicitly se
t
> > it.
> >
> >
> >
> > The VisAD version is the Jan 07 version.
> >
> >
> >
> > Thanks,
> >
> >
> >
> > -Ken
> >
> >
> > ------------------------------
> >
> > *From:* owner-visad at unidata.ucar.edu [mailto:
> > owner-visad at unidata.ucar.edu] *On Behalf Of *Bill Hibbard
> > *Sent:* Monday, April 09, 2007 5:46 PM
> > *To:* Kenneth Evans, Jr.; Visad
> > *Subject:* RE: More GriddedNDSet Questions
> >
> >
> >
> > Hi Ken,
> >
> > Pairs of triangles indicate that the system is not using curved
> > texture maps. I don't understand why it would use square
> > texture maps with your LinearSet and not use curved texture
> > maps with your GriddedSet, unless (according to my reading
> > of the code in VisAD) you are making transparent surfaces.
> > I doubt that sending an image will help.
> >
> > Good luck,
> > Bill
> >
> > What I see is pairs of triangles when I zoom in. That is probably
> > what a curved texture map looks like? I can send an image if that woul
d
> > help, but I don't think I am seeing anything unusual. It's just it is
> > different when using a Gridded2DSet than when using a Linear2DSet, even
> > though the grid data is equivalent.
> >
> >
> >
> > --
> >
> > <http://a8-asy.a8ww.net/a8-ads/adftrclick?redirectid=en-mail_a_01>
> >
> > << Gridded2DSet.Triangles.png >>
> >
> >
> > --
> >
> > <http://a8-asy.a8ww.net/a8-ads/adftrclick?redirectid=en-mail_a_01>
> >
> >
> >
> >
> > --
> > Tom Whittaker
> > University of Wisconsin-Madison
> > Space Science & Engineering Center (SSEC)
> > Cooperative Institute for Meteorological Satellite Studies (CIMSS)
> > 1225 W. Dayton Street
> > Madison, WI 53706 USA
> > ph: +1 608 262 2759
> >
>
>
>
> --
> Tom Whittaker
> University of Wisconsin-Madison
> Space Science & Engineering Center (SSEC)
> Cooperative Institute for Meteorological Satellite Studies (CIMSS)
> 1225 W. Dayton Street
> Madison, WI 53706 USA
> ph: +1 608 262 2759
>
More information about the visad
mailing list