Re: contour line labeling, and "turning off" picking

  • To: Donna L Gresh <gresh@xxxxxxxxxx>
  • Subject: Re: contour line labeling, and "turning off" picking
  • From: Bill Hibbard <billh@xxxxxxxxxxxxx>
  • Date: Sat, 11 Jan 2003 04:47:32 -0600 (CST)
Hi Donna,

> Two questions:
> I am using contour lines on a flat surface, which is working fine, however
> even though I am using ContourControl.enableLabels(true), no labels show up
> on my contour lines. I've tried fewer or more contours but it doesn't
> change things (I'm setting the increment by hand to be some fraction of the
> range; I found I needed to do that because apparently once the contour line
> values are set the first time the thing is run, after I change data sets
> the values were staying the same, and sometimes contour lines no longer
> appeared). Is there something else that needs to happen to make them show?

Contour labels are not currently implemented for contours
generated from IrregularSets. To get labels, you'll need
to resample to a GriddedSet. This isn't as bad as it sounds,
if the GriddedSet has high enough resolution.

I'll bet Tom Rink would enjoy the challenge of implementing
labels for contours from IrregularSets (he did such a great
job for the new contour labels for GriddedSets), if someone
can pay for the work (VisAD is free, but writing it isn't).

> Also, another (minor) problem, again relating to the fact that I'm swapping
> new data into the picture, relates to picking.  I am using a
> PickManipulationRendererJ3D to capture picks, and it is working correctly,
> however when a new data set is swapped in the doAction callback runs again,
> using the same value for getCloseIndex() as on whatever pick was last. This
> can cause problems. I want to somehow "zero out" the pick when I bring in a
> new data set. Is this possible?

We often face this sort of event problem in writing our
applications. The easiest approach is to set a flag when
you swap in new data, and then have the pick doAction()
ignore the first pick event after the flag is set (and
of course clear the flag, so it doesn't ignore events
forever).

Cheers,
Bill