Selection Again

From ParaQ Wiki
Jump to navigationJump to search

This page describes ongoing improvements to ParaView's selection capabilities.

Goals

  • Keep it easy to quickly inspect portions of the data.
  • Make it easy to use the portion of the data selected as input to additional filters.
  • Conform to the paraview paradigm of create filter-manipulate values-apply.
  • Reintroduce additional selection operations - frustum, threshold, location and value as time permits.
  • Link selections among all appropriate views, editing selection in any one will show feedback in all others that show the same data.

User Interface

Keep the interaction we have in 3.0 that creates surface selections. We will call this creating the active selection. We add, probably via a dropdown menu next to the current rubber band icon, the ability to change from creating a surface selection to creating one of the other types of selection (at least frustum). Other operations, like choosing a set of bars in the histogram view, also create (resetting if necessary) the active selection.

We will create a selection inspector panel which displays the active selection and allows the user to manually change it. When the selection is manually changed, there will be visual feedback in the appropriate view or views that show the selection. For surface selection the panel will be a list of those ids that were discovered with a rubber band operation. Ids can be added to or deleted from the list. For frustum selection the panel will be associated with a vtkBoxWidget like 3D widget that will show the bounds of the frustum and make it editable. Additional controls will be included on the panel. "Invert Selection" and "Preserve Topology" controls can be common to all selection types. Other controls, appropriate to each selection type will appear dependent on the active selection's type. "Partially Within" will appear for frustum selection for example. "Array Name" will be shown for threshold and value selection.

We will have a single extract selection filter that the user can apply to make the active selection permanent as the basis for additional filtering. When there is an active selection the filter will be created by copying in the contents of the active selection. It will not clear the active selection. When there is no active selection the filter will start off empty, selecting nothing. This object inspector panel for the filter will contain only one button - "Copy Active Selection". That button will replace any existing contents with the active selection. The active selection will remain unchanged. Information about the data subset represented by the panel can be discovered in other windows in the application.

To Add - images of mockups of selection panel

  • panel has INSIDE_OUT and PRESERVE_TOPOLOGY buttons and a swappable sub panel for
  • surface selection (GLOBAL_IDS,INDICES,PEDIGREE_IDS) with editable list of ids
  • frustum selection, buttons for PARTIALLY_WITHIN and link to 3dWidget that shows/manupilutes frustum outline
  • thresholds selection that lets user choose from the available point and cell scalar arrays and create a number of ranges to threshold within.
  • possibly values selection which looks similar to the thresholds panel, and locations selection wich is a list of points coordinates in world space

Selection Links

Changing the active selection should change the active view and if enabled by the user it should change any or all of the other views that show the data. So we should be able to rubber band select in one 3D view and have it show up in other views, or not, as the user needs. We should be able to change the threshold ranges and highlight different bars in the histogram view or views. Selecting bars in a histogram view should change the active histogram.

Linking between unrelelated views - should range selection be shown in 3D view? Most or all items should highlight particular values in the spreadsheet view.

The new representation view architecture enables selection linking. Each representation has the ability to create a vtkSelection for some or all of the datasets shown in it. For example, the 3D windows have code to let the user draw a rubber band on the screen and to convert that to an ID selection of the cell ids of all of the cells visible on within that rubber band. The histogram window allow the user to click on sets of bars and produce a THRESHOLD selection. The spreadsheet view lets the user choose various rows and produces an ID selection. Each representation also has an an associated input vtkSelection and has the ability to highlight the selection, if that selection is appropriate to the view and the visible data within the view.

Selection linking is then a matter of enabling proxy links between the input selections to each representation. A rubber band selection in one 3D view will produce a selection and then update the view's input. Other interested representations, including the selection inspector, then see that change and update their own displays.

Implementation

Important classes:

  • pqSelectionManager - nexus point to link selections operations in all views of the application.
  • pqRubberBandHelper - provides API to swap in/out interactor style for rubber banding
  • vtkSelection - data structure to describe the various subsetting operations
  • pqSelectionPanel (ie pqSelectThroughPanel, pqExtract*Panel) - UI to view and control a vtkSelection
  • vtkSMSelectionProxy (ie vtkSMExtract*Panel) client control over a vtkSelectionSource. Calls methods in vtkSelectionSource to create a vtkSelection.
  • vtkSelectionSource - server side source that that produces a vtkSelection
  • vtkExtractSelection - server side filter that takes a dataset and a vtkSelection and takes the subset described in the vtkSelection out of the data set