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

We want to keep the interaction we have in 3.0 that creates surface selections, highlighted in purple wireframe. We will call doing this, creating the active selection. We will expand upon this interaction by introducing new types of selections in the 3D view, and by allowing the user to create the active selection from other views. Depending on the type of active view, the particular begin selection button(s) will be change. For the 3D view, we will add, probably via a dropdown menu next to the current rubber band icon, a button that starts a rubber band selection that will create a frustum selection, selecting all cells behind the screen rectangle, not just the nearest. For the bar char view there will be three start selection buttons, one that lets the user pick one or more bars, another that lets the user created arbitrary ranges, and another that lets the user adjust the boundaries of the current selection. Selecting in any view, will 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 view has the ability to create a vtkSelection for some or all of the datasets shown inside it. For example, the 3D windows have code that lets the user draw a rubber band on the screen and creates from that an ID selection of the surface cells shown within the rubber band. The histogram window allows the user to click on sets of bars and produces a THRESHOLD selection. The spreadsheet view lets the user choose various rows and produces an ID selection. Each representation also has an associated input vtkSelection along with the ability to highlight that selection - if that selection is appropriate to the view and the visible data within the view.

The implementation of 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 vtkSelection and update that representation's input. Other interested representations, including the selection inspector, will see that change view the proxy link and automatically update their own displays.

Implementation

Selections are created by various mechanisms by the application. A rubber band interface allows the creation of an id selection corresponding to surface cells. The selection inspector panel allows the manual entry of a selection. In all cases the client modifies properties of a proxy for a vtkSelectionSource to create the vtkSelection on the server. This vtkSelection and the related vtkDataSets, are inputs to the vtkExtractSelection filter which then does whatever subsetting operation is described in the vtkSelection.

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
  • pqSelectionLinksManager - manages creation of selection links between different representations of the same source.