Skip to content

15761 : Adding a LinkedSelection Feature

The aim of this new feature is to link the selection of two pipeline sources: the two sources share the selection objects for each of their output ports.

This feature is useful to directly link the selection of two tables for instance, where one describe the result of one simulation for each row, and the other the parameters of the simulation for each row. Linking the selection allow to directly select the parameters values when selecting a simulation result (using any kind of view).

Note that the selection is supposed to be consistent across the two selected sources, there is no selection conversion of any kind.

Usage

  • Create two pipeline sources/filters
  • Open Link Manager / Create a new link
  • A new type of link exist, Selection Link, create a Selection Link, between two sources
  • Select some points or cells on one of the linked sources using any selection mean
  • The other source is selected as well
  • Note : Actual selection port are shared between sources, it means block selection and frustrum selection works, but their own way. eg. a frustrum selection on two linked sources will select the same frustrum on both sources, not te same id.
  • Note : A shortcut exist on the pipeline browser, create two sources, select one, right click on the other, link to selection.

Technical stuff

  1. Generalizing following method in vtkSMLink.h
  • GetNumberOfLinkedObjects
  • GetLinkedObjectDirection
  • GetLinkedProxy
  1. Deprecating specialized version of following methods in vtkSMPropertyLink, vtkSMProxyLink, vtkSMCameraLink
  • GetLinkedObjectDirection
  • GetNumberOfLinkedObjects
  1. Updating tests and classes accordingly to deprecation

  2. Implementing a vtkSMSelectionLink class which allows to link selection between input proxy and output proxy, with protobuf support and tests

  3. Adding a SelectionLink entry in link editor

  4. Modifying pqSelectionManager to handle multiple selection through Selection Link

  5. Adding a public method to pqSelectionManager::hasActiveSelection(), the old way to get this info via getSelectedPort() != NULL is still working, updating codes accordingly

  6. Adding an argument to public slot pqSelectionManager::clearSelection( pqOutputPort ) which allow to clear selection of only one pqOutputPort. Default argument is null and allow use of this method with full retro compatibility

  7. Adding a public method pqSelectionManager::getSelectedPorts() which return all selected pqOutputPorts, getSelectedPort return the first selected pqOutputPort, or NULL if they are none

  8. Adding private slot called when a link is added/removed in order to update the pqSelectionManager in this case and associated selected port

  9. Removing getSelectionSourceProxy from pqSelectionManagerImplementation as it is unused

  10. Removing pqSelectionManagerImplementation::clearSelection and reimplementing pqSelectionManager::clearSelection

  11. Reimplementing onItemRemoved in order to remove linked selection if any

  12. Reimplementing select method in order to fill the selectedPorts set using SelectionLink and render them.

  13. Adding a pqLinksModel::FindLinksFromProxy which allow to find all links containing a specific proxy, in a certain optional direction

  14. Adding pqLinksModel SelectionLink method and enum

  15. Adding pqLinksModel signals linkAdded(int linkType) and linkRemoved()

  16. Correcting issue with link registered too late : 15785 http://www.paraview.org/Bug/view.php?id=15785

  17. Correcting segfault with Undo/Redo and link (via UNDO_EXCLUDE ) : 15347 http://www.paraview.org/Bug/view.php?id=15347

Merge request reports