Re: Data not rendering as IsoContour

Hello Bill,

I used visad source updated from cvs.VisAD.sourceforge.net today, and
modified ShadowType.java and ContourControl.java.

bvalues[0] always seems to be true, spatialManifoldDimension is always
2, and fvalues[0] is always NaN.

Here is a series of stack traces, using DisplayImpl.printStack(), from
when the behaviour is seen.

Thanks
Russell






visad.DisplayException: printStack: ContourControl line 540, surfaceValue==NaN
        at visad.DisplayImpl.printStack(DisplayImpl.java:2241)
        at visad.ContourControl.getMainContours(ContourControl.java:540)
        at 
visad.ShadowFunctionOrSetType.doTransform(ShadowFunctionOrSetType.java:601)
        at 
visad.java3d.ShadowFunctionOrSetTypeJ3D.doTransform(ShadowFunctionOrSetTypeJ3D.java:100)
        at 
visad.java3d.ShadowFunctionOrSetTypeJ3D.recurseRange(ShadowFunctionOrSetTypeJ3D.java:1001)
        at 
visad.ShadowFunctionOrSetType.doTransform(ShadowFunctionOrSetType.java:2947)
        at 
visad.java3d.ShadowFunctionOrSetTypeJ3D.doTransform(ShadowFunctionOrSetTypeJ3D.java:100)
        at 
visad.java3d.DefaultRendererJ3D.doTransform(DefaultRendererJ3D.java:99)
        at visad.java3d.RendererJ3D.doAction(RendererJ3D.java:181)
        at visad.DisplayImpl.doAction(DisplayImpl.java:1557)
        at visad.ActionImpl.run(ActionImpl.java:353)
        at visad.util.ThreadPool$ThreadMinnow.run(ThreadPool.java:95)
visad.DisplayException: printStack: ContourControl line 540, surfaceValue==NaN
        at visad.DisplayImpl.printStack(DisplayImpl.java:2241)
        at visad.ContourControl.getMainContours(ContourControl.java:540)
        at 
visad.ShadowFunctionOrSetType.doTransform(ShadowFunctionOrSetType.java:601)
        at 
visad.java3d.ShadowFunctionOrSetTypeJ3D.doTransform(ShadowFunctionOrSetTypeJ3D.java:100)
        at 
visad.java3d.ShadowFunctionOrSetTypeJ3D.recurseRange(ShadowFunctionOrSetTypeJ3D.java:1001)
        at 
visad.ShadowFunctionOrSetType.doTransform(ShadowFunctionOrSetType.java:2947)
        at 
visad.java3d.ShadowFunctionOrSetTypeJ3D.doTransform(ShadowFunctionOrSetTypeJ3D.java:100)
        at 
visad.java3d.DefaultRendererJ3D.doTransform(DefaultRendererJ3D.java:99)
        at visad.java3d.RendererJ3D.doAction(RendererJ3D.java:181)
        at visad.DisplayImpl.doAction(DisplayImpl.java:1557)
        at visad.ActionImpl.run(ActionImpl.java:353)
        at visad.util.ThreadPool$ThreadMinnow.run(ThreadPool.java:95)
visad.DisplayException: printStack: ContourControl line 540, surfaceValue==NaN
        at visad.DisplayImpl.printStack(DisplayImpl.java:2241)
        at visad.ContourControl.getMainContours(ContourControl.java:540)
        at visad.ShadowType.makeContour(ShadowType.java:3479)
        at visad.java3d.ShadowTypeJ3D.makeContour(ShadowTypeJ3D.java:345)
        at 
visad.ShadowFunctionOrSetType.doTransform(ShadowFunctionOrSetType.java:2087)
        at 
visad.java3d.ShadowFunctionOrSetTypeJ3D.doTransform(ShadowFunctionOrSetTypeJ3D.java:100)
        at 
visad.java3d.ShadowFunctionOrSetTypeJ3D.recurseRange(ShadowFunctionOrSetTypeJ3D.java:1001)
        at 
visad.ShadowFunctionOrSetType.doTransform(ShadowFunctionOrSetType.java:2947)
        at 
visad.java3d.ShadowFunctionOrSetTypeJ3D.doTransform(ShadowFunctionOrSetTypeJ3D.java:100)
        at 
visad.java3d.DefaultRendererJ3D.doTransform(DefaultRendererJ3D.java:99)
        at visad.java3d.RendererJ3D.doAction(RendererJ3D.java:181)
        at visad.DisplayImpl.doAction(DisplayImpl.java:1557)
        at visad.ActionImpl.run(ActionImpl.java:353)
        at visad.util.ThreadPool$ThreadMinnow.run(ThreadPool.java:95)
ShadowType.makeContour(): bvalues[0]==true
ShadowType.makeContour(): spatialManifoldDimension==2
ShadowType.makeContour(): fvalues[0]==NaN
visad.DisplayException: printStack: ContourControl line 540, surfaceValue==NaN
        at visad.DisplayImpl.printStack(DisplayImpl.java:2241)
        at visad.ContourControl.getMainContours(ContourControl.java:540)
        at 
visad.ShadowFunctionOrSetType.doTransform(ShadowFunctionOrSetType.java:601)
        at 
visad.java3d.ShadowFunctionOrSetTypeJ3D.doTransform(ShadowFunctionOrSetTypeJ3D.java:100)
        at 
visad.java3d.ShadowFunctionOrSetTypeJ3D.recurseRange(ShadowFunctionOrSetTypeJ3D.java:1001)
        at 
visad.ShadowFunctionOrSetType.doTransform(ShadowFunctionOrSetType.java:2947)
        at 
visad.java3d.ShadowFunctionOrSetTypeJ3D.doTransform(ShadowFunctionOrSetTypeJ3D.java:100)
        at 
visad.java3d.DefaultRendererJ3D.doTransform(DefaultRendererJ3D.java:99)
        at visad.java3d.RendererJ3D.doAction(RendererJ3D.java:181)
        at visad.DisplayImpl.doAction(DisplayImpl.java:1557)
        at visad.ActionImpl.run(ActionImpl.java:353)
        at visad.util.ThreadPool$ThreadMinnow.run(ThreadPool.java:95)
visad.DisplayException: printStack: ContourControl line 540, surfaceValue==NaN
        at visad.DisplayImpl.printStack(DisplayImpl.java:2241)
        at visad.ContourControl.getMainContours(ContourControl.java:540)
        at 
visad.ShadowFunctionOrSetType.doTransform(ShadowFunctionOrSetType.java:601)
        at 
visad.java3d.ShadowFunctionOrSetTypeJ3D.doTransform(ShadowFunctionOrSetTypeJ3D.java:100)
        at 
visad.java3d.ShadowFunctionOrSetTypeJ3D.recurseRange(ShadowFunctionOrSetTypeJ3D.java:1001)
        at 
visad.ShadowFunctionOrSetType.doTransform(ShadowFunctionOrSetType.java:2947)
        at 
visad.java3d.ShadowFunctionOrSetTypeJ3D.doTransform(ShadowFunctionOrSetTypeJ3D.java:100)
        at 
visad.java3d.DefaultRendererJ3D.doTransform(DefaultRendererJ3D.java:99)
        at visad.java3d.RendererJ3D.doAction(RendererJ3D.java:181)
        at visad.DisplayImpl.doAction(DisplayImpl.java:1557)
        at visad.ActionImpl.run(ActionImpl.java:353)
        at visad.util.ThreadPool$ThreadMinnow.run(ThreadPool.java:95)
visad.DisplayException: printStack: ContourControl line 540, surfaceValue==NaN
        at visad.DisplayImpl.printStack(DisplayImpl.java:2241)
        at visad.ContourControl.getMainContours(ContourControl.java:540)
        at visad.ShadowType.makeContour(ShadowType.java:3479)
        at visad.java3d.ShadowTypeJ3D.makeContour(ShadowTypeJ3D.java:345)
        at 
visad.ShadowFunctionOrSetType.doTransform(ShadowFunctionOrSetType.java:2087)
        at 
visad.java3d.ShadowFunctionOrSetTypeJ3D.doTransform(ShadowFunctionOrSetTypeJ3D.java:100)
        at 
visad.java3d.ShadowFunctionOrSetTypeJ3D.recurseRange(ShadowFunctionOrSetTypeJ3D.java:1001)
        at 
visad.ShadowFunctionOrSetType.doTransform(ShadowFunctionOrSetType.java:2947)
        at 
visad.java3d.ShadowFunctionOrSetTypeJ3D.doTransform(ShadowFunctionOrSetTypeJ3D.java:100)
        at 
visad.java3d.DefaultRendererJ3D.doTransform(DefaultRendererJ3D.java:99)
        at visad.java3d.RendererJ3D.doAction(RendererJ3D.java:181)
        at visad.DisplayImpl.doAction(DisplayImpl.java:1557)
        at visad.ActionImpl.run(ActionImpl.java:353)
        at visad.util.ThreadPool$ThreadMinnow.run(ThreadPool.java:95)
ShadowType.makeContour(): bvalues[0]==true
ShadowType.makeContour(): spatialManifoldDimension==2
ShadowType.makeContour(): fvalues[0]==NaN
visad.DisplayException: printStack: ContourControl line 540, surfaceValue==NaN
        at visad.DisplayImpl.printStack(DisplayImpl.java:2241)
        at visad.ContourControl.getMainContours(ContourControl.java:540)
        at 
visad.ShadowFunctionOrSetType.doTransform(ShadowFunctionOrSetType.java:601)
        at 
visad.java3d.ShadowFunctionOrSetTypeJ3D.doTransform(ShadowFunctionOrSetTypeJ3D.java:100)
        at 
visad.java3d.ShadowFunctionOrSetTypeJ3D.recurseRange(ShadowFunctionOrSetTypeJ3D.java:1001)
        at 
visad.ShadowFunctionOrSetType.doTransform(ShadowFunctionOrSetType.java:2947)
        at 
visad.java3d.ShadowFunctionOrSetTypeJ3D.doTransform(ShadowFunctionOrSetTypeJ3D.java:100)
        at 
visad.java3d.DefaultRendererJ3D.doTransform(DefaultRendererJ3D.java:99)
        at visad.java3d.RendererJ3D.doAction(RendererJ3D.java:181)
        at visad.DisplayImpl.doAction(DisplayImpl.java:1557)
        at visad.ActionImpl.run(ActionImpl.java:353)
        at visad.util.ThreadPool$ThreadMinnow.run(ThreadPool.java:95)
visad.DisplayException: printStack: ContourControl line 540, surfaceValue==NaN
        at visad.DisplayImpl.printStack(DisplayImpl.java:2241)
        at visad.ContourControl.getMainContours(ContourControl.java:540)
        at 
visad.ShadowFunctionOrSetType.doTransform(ShadowFunctionOrSetType.java:601)
        at 
visad.java3d.ShadowFunctionOrSetTypeJ3D.doTransform(ShadowFunctionOrSetTypeJ3D.java:100)
        at 
visad.java3d.ShadowFunctionOrSetTypeJ3D.recurseRange(ShadowFunctionOrSetTypeJ3D.java:1001)
        at 
visad.ShadowFunctionOrSetType.doTransform(ShadowFunctionOrSetType.java:2947)
        at 
visad.java3d.ShadowFunctionOrSetTypeJ3D.doTransform(ShadowFunctionOrSetTypeJ3D.java:100)
        at 
visad.java3d.DefaultRendererJ3D.doTransform(DefaultRendererJ3D.java:99)
        at visad.java3d.RendererJ3D.doAction(RendererJ3D.java:181)
        at visad.DisplayImpl.doAction(DisplayImpl.java:1557)
        at visad.ActionImpl.run(ActionImpl.java:353)
        at visad.util.ThreadPool$ThreadMinnow.run(ThreadPool.java:95)
visad.DisplayException: printStack: ContourControl line 540, surfaceValue==NaN
        at visad.DisplayImpl.printStack(DisplayImpl.java:2241)
        at visad.ContourControl.getMainContours(ContourControl.java:540)
        at visad.ShadowType.makeContour(ShadowType.java:3479)
        at visad.java3d.ShadowTypeJ3D.makeContour(ShadowTypeJ3D.java:345)
        at 
visad.ShadowFunctionOrSetType.doTransform(ShadowFunctionOrSetType.java:2087)
        at 
visad.java3d.ShadowFunctionOrSetTypeJ3D.doTransform(ShadowFunctionOrSetTypeJ3D.java:100)
        at 
visad.java3d.ShadowFunctionOrSetTypeJ3D.recurseRange(ShadowFunctionOrSetTypeJ3D.java:1001)
        at 
visad.ShadowFunctionOrSetType.doTransform(ShadowFunctionOrSetType.java:2947)
        at 
visad.java3d.ShadowFunctionOrSetTypeJ3D.doTransform(ShadowFunctionOrSetTypeJ3D.java:100)
        at 
visad.java3d.DefaultRendererJ3D.doTransform(DefaultRendererJ3D.java:99)
        at visad.java3d.RendererJ3D.doAction(RendererJ3D.java:181)
        at visad.DisplayImpl.doAction(DisplayImpl.java:1557)
        at visad.ActionImpl.run(ActionImpl.java:353)
        at visad.util.ThreadPool$ThreadMinnow.run(ThreadPool.java:95)
ShadowType.makeContour(): bvalues[0]==true
ShadowType.makeContour(): spatialManifoldDimension==2
ShadowType.makeContour(): fvalues[0]==NaN
visad.DisplayException: printStack: ContourControl line 540, surfaceValue==NaN
        at visad.DisplayImpl.printStack(DisplayImpl.java:2241)
        at visad.ContourControl.getMainContours(ContourControl.java:540)
        at 
visad.ShadowFunctionOrSetType.doTransform(ShadowFunctionOrSetType.java:601)
        at 
visad.java3d.ShadowFunctionOrSetTypeJ3D.doTransform(ShadowFunctionOrSetTypeJ3D.java:100)
        at 
visad.java3d.ShadowFunctionOrSetTypeJ3D.recurseRange(ShadowFunctionOrSetTypeJ3D.java:1001)
        at 
visad.ShadowFunctionOrSetType.doTransform(ShadowFunctionOrSetType.java:2947)
        at 
visad.java3d.ShadowFunctionOrSetTypeJ3D.doTransform(ShadowFunctionOrSetTypeJ3D.java:100)
        at 
visad.java3d.DefaultRendererJ3D.doTransform(DefaultRendererJ3D.java:99)
        at visad.java3d.RendererJ3D.doAction(RendererJ3D.java:181)
        at visad.DisplayImpl.doAction(DisplayImpl.java:1557)
        at visad.ActionImpl.run(ActionImpl.java:353)
        at visad.util.ThreadPool$ThreadMinnow.run(ThreadPool.java:95)
visad.DisplayException: printStack: ContourControl line 540, surfaceValue==NaN
        at visad.DisplayImpl.printStack(DisplayImpl.java:2241)
        at visad.ContourControl.getMainContours(ContourControl.java:540)
        at 
visad.ShadowFunctionOrSetType.doTransform(ShadowFunctionOrSetType.java:601)
        at 
visad.java3d.ShadowFunctionOrSetTypeJ3D.doTransform(ShadowFunctionOrSetTypeJ3D.java:100)
        at 
visad.java3d.ShadowFunctionOrSetTypeJ3D.recurseRange(ShadowFunctionOrSetTypeJ3D.java:1001)
        at 
visad.ShadowFunctionOrSetType.doTransform(ShadowFunctionOrSetType.java:2947)
        at 
visad.java3d.ShadowFunctionOrSetTypeJ3D.doTransform(ShadowFunctionOrSetTypeJ3D.java:100)
        at 
visad.java3d.DefaultRendererJ3D.doTransform(DefaultRendererJ3D.java:99)
        at visad.java3d.RendererJ3D.doAction(RendererJ3D.java:181)
        at visad.DisplayImpl.doAction(DisplayImpl.java:1557)
        at visad.ActionImpl.run(ActionImpl.java:353)
        at visad.util.ThreadPool$ThreadMinnow.run(ThreadPool.java:95)
visad.DisplayException: printStack: ContourControl line 540, surfaceValue==NaN
        at visad.DisplayImpl.printStack(DisplayImpl.java:2241)
        at visad.ContourContro=NaN
        at visad.DisplayImpl.printStack(DisplayImpl.java:2241)
        at visad.ContourControl.getMainContours(ContourControl.java:540)
        at 
visad.ShadowFunctionOrSetType.doTransform(ShadowFunctionOrSetType.java:601)
        at 
visad.java3d.ShadowFunctionOrSetTypeJ3D.doTransform(ShadowFunctionOrSetTypeJ3D.java:100)
        at 
visad.java3d.ShadowFunctionOrSetTypeJ3D.recurseRange(ShadowFunctionOrSetTypeJ3D.java:1001)
        at 
visad.ShadowFunctionOrSetType.doTransform(ShadowFunctionOrSetType.java:2947)
        at 
visad.java3d.ShadowFunctionOrSetTypeJ3D.doTransform(ShadowFunctionOrSetTypeJ3D.java:100)
        at 
visad.java3d.DefaultRendererJ3D.doTransform(DefaultRendererJ3D.java:99)
        at visad.java3d.RendererJ3D.doAction(RendererJ3D.java:181)
        at visad.DisplayImpl.doAction(DisplayImpl.java:1557)
        at visad.ActionImpl.run(ActionImpl.java:353)
        at visad.util.ThreadPool$ThreadMinnow.run(ThreadPool.java:95)
visad.DisplayException: printStack: ContourControl line 540, surfaceValue==NaN
        at visad.DisplayImpl.printStack(DisplayImpl.java:2241)
        at visad.ContourControl.getMainContours(ContourControl.java:540)
        at 
visad.ShadowFunctionOrSetType.doTransform(ShadowFunctionOrSetType.java:601)
        at 
visad.java3d.ShadowFunctionOrSetTypeJ3D.doTransform(ShadowFunctionOrSetTypeJ3D.java:100)
        at 
visad.java3d.ShadowFunctionOrSetTypeJ3D.recurseRange(ShadowFunctionOrSetTypeJ3D.java:1001)
        at 
visad.ShadowFunctionOrSetType.doTransform(ShadowFunctionOrSetType.java:2947)
        at 
visad.java3d.ShadowFunctionOrSetTypeJ3D.doTransform(ShadowFunctionOrSetTypeJ3D.java:100)
        at 
visad.java3d.DefaultRendererJ3D.doTransform(DefaultRendererJ3D.java:99)
        at visad.java3d.RendererJ3D.doAction(RendererJ3D.java:181)
        at visad.DisplayImpl.doAction(DisplayImpl.java:1557)
        at visad.ActionImpl.run(ActionImpl.java:353)
        at visad.util.ThreadPool$ThreadMinnow.run(ThreadPool.java:95)
visad.DisplayException: printStack: ContourControl line 540, surfaceValue==NaN
        at visad.DisplayImpl.printSt3479)
        at visad.java3d.ShadowTypeJ3D.makeContour(ShadowTypeJ3D.java:345)
        at 
visad.ShadowFunctionOrSetType.doTransform(ShadowFunctionOrSetType.java:2087)
        at 
visad.java3d.ShadowFunctionOrSetTypeJ3D.doTransform(ShadowFunctionOrSetTypeJ3D.java:100)
        at 
visad.java3d.ShadowFunctionOrSetTypeJ3D.recurseRange(ShadowFunctionOrSetTypeJ3D.java:1001)
        at 
visad.ShadowFunctionOrSetType.doTransform(ShadowFunctionOrSetType.java:2947)
        at 
visad.java3d.ShadowFunctionOrSetTypeJ3D.doTransform(ShadowFunctionOrSetTypeJ3D.java:100)
        at 
visad.java3d.DefaultRendererJ3D.doTransform(DefaultRendererJ3D.java:99)
        at visad.java3d.RendererJ3D.doAction(RendererJ3D.java:181)
        at visad.DisplayImpl.doAction(DisplayImpl.java:1557)
        at visad.ActionImpl.run(ActionImpl.java:353)
        at visad.util.ThreadPool$ThreadMinnow.run(ThreadPool.java:95)
ShadowType.makeContour(): bvalues[0]==true
ShadowType.makeContour(): spatialManifoldDimension==2
ShadowType.makeContour(): fvalues[0]==NaN
 







On Tue, Aug 12, 2003 at 08:36:52AM -0500, Bill Hibbard wrote:
> Hi Russell,
> 
> If you are willing, you may be able to diagnose this problem
> yourself. First, make sure you are using the latest source
> from the VisAD ftp server. You'll want to run from compiled
> source, so you can insert print statements. The focus should
> be the makeContour() method of visad/ShadowType.java. At about
> the 83rd line of this method there is a line:
> 
>   if (bvalues[0]) {
> 
> Insert a print of bvalues[0] before this - it should be true.
> If it's false, then you want to focus on visad/ContourControl.java
> and why mainContours (the source of bvalues[0]) is false, by
> inserting calls to DisplayImpl.printStack("your message here")
> at the various places where mainContours gets set (stack dumps
> are useful for understanding the circumstances under which
> bvalues[0] is being set).
> 
> If bvalues[0] is true then, back in ShadowType.makeContour(),
> you'll want to make sure spatialManifoldDimension == 3 (so it
> will try to make an iso-suface) and that fvalues[0] (the level
> for the isosurface) has a reasonable value. Print fvalues[0]
> before:
> 
>   if (fvalues[0] == fvalues[0]) {
> 
> at about the 101st line of makeContour(). If fvalues[0] has
> an unreasonable value (NaN, or the minimum value of the Field
> are likely unreasonable values), then insert calls to
> DisplayImpl.printStack("your message here") at the various
> places where surfaceValue is set in visad/ContourControl.java
> 
> Please let us know what you find.
> 
> Thanks,
> Bill
> 
> 
> On Tue, 12 Aug 2003, Russell Steicke wrote:
> 
> > Hello,
> >
> > We have a strange problem with ScalarMaps and rendering with IsoContour.
> > Under certain circumstances the data will render correctly, but most of
> > the time the data will not be displayed at all.
> >
> > We've tried to duplicate the behaviour with a simple example, but
> > haven't been able to do that.
> >
> > The symptoms are that when we have data mapped to IsoContour, nothing
> > will be displayed.  If we then add a ScalarMap from D to RGB or Red or
> > Green or Blue or ZAxis, where D is any data that is actually present on
> > the display, all the IsoContour mapped data will appear, including data
> > unrelated to D.  We can also make the IsoContour mapped data appear by
> > explicitly calling setContourInterval() on a ContourControl, which will
> > make _all_ the IsoContour mapped data appear, not just the data
> > associated with that ContourControl.
> >
> > There are obviously workarounds here, but it would be better to find out
> > where the problem lies.  Does anyone have any ideas about this?
> >
> > Thanks
> > Russell
> >
> >
> > --
> > Russell Steicke
> >
> > -- Fortune says:
> > What does it mean if there is no fortune for you?
> 
> 
> 


-- 
Russell Steicke

-- Fortune says:
"They're unfriendly, which is fortunate, really.  They'd be difficult to like."
                -- Avon