Re: Finding reference to the data actually being displayed after

Hi Don,

> We're doing some really vanilla 2D and 3D scatter plots loading data into 
> FlatField's for display.  We're also using SelectRangeWidget's for brushing 
> the data.  Everything's working like a charm!  Our users are now asking to 
> know after they finish brushing 1) how many points are left in the original 
> data set, and 2) can they dump the currently displayed data to a new file now 
> that they've filtered out all the unwanted stuff.  To take care of this, I 
> need to find a reference to the "data" actually being displayed.  Following 
> the data "trail" through the VisAD documentation, it's not clear to me where 
> to find the "getXXX()" accessor to the actually displayed data set.

There is no getXXX() accessor to find the data actually
selected. But there is a way to get at it, although its
a bit complex (I'm pretty sure it'll work).

You can define a new class that extends ShadowFunctionTypeJ3D
and overrides the assembleSelect() method. This method should
just call super.assembleSelect() withits same argument, then
save a copy of the return value. This will be a "boolean[][]
range_select" array, which is dimensioned:

  [1][number_of_points_in_FlatField]

The true values represent the range values selected for
display. Your extension of ShadowFunctionTypeJ3D should
include a method for getting this saved range_select array.
Note you will be overriding the implementation of
assembleSelect() in visad/ShadowType.java.

You'll need another class that extends DefaultRendererJ3D
and overrides the makeShadowFunctionType() method to
construct and return an instance of your class that extends
ShadowFunctionTypeJ3D. See visad/bom/BarbRendererJ3D.java
for an example of this.

Good luck,
Bill