Camera and Property Linking
During a visualization session, it is sometimes necessary to keep the values of two properties synchronized. For example, you may have two slice filters applied to two separate data sources and you may want the two slice planes to be always the same. This can be accomplished by "linking" the plane of the two filters. There are a few types of links.
A camera link links cameras from two views together. A change in one, propagates to the other, and vice versa. Camera linking can be quickly established by right clicking in a view and selecting "Link Views..." (make sure not the move the mouse after right clicking as this would zoom instead of bringing the context menu). A popup window is presented with the ability to name the link, and cancel. The link is created when the user clicks on another view.
When Camera Linking, it is possible to enable Interactive View Link, to show part of the first window into the other one. To use this, simply use the same mechanism as linking cameras between two views, just make sure you check the Interactive View Link checkbox.
Object (proxy) Linking
Object linking allows the linking of two pipeline or view object together. If an object has any property with the same name as the other object, those properties will be linked. For example:
- Two sphere sources will have all of their properties linked.
- A sphere source and a cylinder source will have only Radius and Center linked.
- The planes of two clip filters can be linked.
Object links can be created from the Manage Links dialog (Tools -> Manage Links ...). Simply select the name of the link and the two objects and press OK.
Property linking allows the linking of individual properties of pipeline objects together. For example:
- A sphere's Phi Resolution and Theta Resolution can be linked.
- A cylinder's radius and a sphere's radius can be linked.
- A cylinder's radius cannot be linked with a sphere's center (different number of elements)
Property links can be created from the Manage Links dialog (Tools -> Manage Links ...). First choose "Property link" as the Mode then select the objects and their properties to link and press OK.
Editing and Deleting Links
Links can be edited and deleted using the Manage Links dialog (Tools -> Manage Links ...). Select the link you want to edit and them press Edit... or Remove.
Implementation Overview for Developeres
- Implemented in server manager:
- vtkSMCameraLink, vtkSMPropertyLink, vtkSMProxyLink share a common vtkSMLink base class.
- vtkSM*Link classes support bi-directional links, with multiple "inputs" and multiple "outputs".
- If an "input" changes, the values are copied to the "outputs."
- GUI side
- All links are bi-directional.
- All links are between only two objects. In other words, the vtkSM*Link objects have two inputs and two outputs. If it were not bi-directional, it would be one input and one output.
- Camera linking is called View linking.