[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20040302: IDV data probe visibility



>From: Tom Whittaker <address@hidden>
>Organization: UCAR/Unidata
>Keywords: 200403021732.i22HWYrV007855

Hi Tom-

>When I put a Data Probe on top of a sequence of images, I can zoom way in and 
>still see the little probe square -- it looks like you put it at z=0 (in the 
>z=-1:+1 space).

Yup.

>However, if I make a time series plot, I get the box plus a vertical line to 
>the z=-1 level ("ground").  Problem is that when I zoom, the box disappears --
>since it looks like the box was put at the z=+1 position.  If my perspective 
>is "looking straight down" it appears that the whole probe is gone (since I 
>really cannot see the line).

That's why we put the probe on the end. ;-)  Unfortunately, the line
is not manipulable so once the probe is gone you can't really
move it.

>While my gut reaction is to ask that the "time series probe" box be simply 
>moved to z=0, this really won't help when it's used with true 3D data, right?
>I figure the probe box would more often than note end up inside some 
>isosurface ;-)

That is correct.

>Bottom line is that this is a problem, and I don't have an obvious solution 
>for it, but I want to mention it in case others ask about the "disappearing 
>probes".  I just don't know what the possiblities are...but I think the probes
>should not be made invisible just because I zoom in...

The only thing I could think of would be to add a listener on the
probe to projection changes (zooms) and set the Z position to be no higher
than the front clipping plane.  The problem there is that to do that,
it means removing the reference and readding with a new ConstantMap
which causes the entire display to be rebuilt.  If Bill can figure
a way that removing/adding a ConstantMap would act similarly to 
removing/adding a ScalarMap (i.e., only the affected data is 
retransformed) that would save a lot of CPU cycles.  I believe the
relevant code is in DisplayImpl.removeMap(ScalarMap, int) at:

      // trigger events
      if (map instanceof ConstantMap) {
        if (!RendererVector.isEmpty()) {
          reDisplayAll();
        }
      }
      else { // !(map instanceof ConstantMap)
        if (!RendererVector.isEmpty()) {
          ScalarType st = map.getScalar();
          if (st != null) { // not necessary for !(map instanceof ConstantMap)
            Vector temp = (Vector) RendererVector.clone();
            Iterator renderers = temp.iterator();
            while (renderers.hasNext()) {
              DataRenderer renderer = (DataRenderer) renderers.next();
              DataDisplayLink[] links = renderer.getLinks();
              for (int i=0; i<links.length; i++) {
                if (MathType.findScalarType(links[i].getType(), st)) {
                  DataReference ref = links[i].getDataReference();
                  if (ref != null) ref.incTick();
                }
              }
            }
          }
        }

If I'm wrong about this Bill (i.e. adding/removing references with
ConstantMaps causes a reDisplayAll()), please let me know.

>Bill:  this is FYI -- maybe you've got some ideas...

I'm all ears. ;-)

Don
NOTE: All email exchanges with Unidata User Support are recorded in the
Unidata inquiry tracking system and then made publically available
through the web.  If you do not want to have your interactions made
available in this way, you must let us know in each email you send to us.