Bill, The below approach appears to be working nicely. The bad news is that it appears to have maybe uncovered a "bug" in VisAD's brushing widgets in that valid points appear to be "eliminated" because of truncating display values at the upper end?!? Attached is a screen dump showing what's happening to the "f1" parameter in the data set currently being displayed prior to any brushing operations. f1's max is 6040.451843 while the widget is showing a max value of 6040.451, which apparently causes that data row to be dropped from the display. In the lower left-hand-corner of the screen dump, you can see that the rangeSelect[0].length is 1303, which is the correct number of rows in the dataset, while the remainingPts is 1302, found by cycling through the rangeSelect[][] array looking for false value. Since no brushing has occured, both should show 1303. The row found to be "false" is the row containing the f1 max of 6040.451843, which is consistent with the above assertions. Truncation at the lower bounds is not a problem. thanks... dlf <<brushingError.jpg>> -----Original Message----- Sent: Tuesday, March 08, 2005 11:58 AM Cc: visad@xxxxxxxxxxxxxxxx after brushing ... 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
Attachment:
brushingError.jpg
Description: brushingError.jpg
visad
archives: