<font color="#000000"><font size="2"><font face="tahoma,sans-serif">Hi<br><br>I&#39;m trying to build 2 independent views with the option of independent filtering <b>and </b>joined filtering of the same data/object.  I want 2 users to use ParaView with independent head-tracking, allow them to independently apply filters to the same dataset, have the option of sharing the filters between them and sharing the views.<br>
<br>In my test code attached below, the trackers are not able to control the viewpoint of either windows.  <br>The actual plugin code with 1 tracker and 1 view works: <a href="https://github.com/alexisylchan/ParaView/blob/master/Plugins/VRPN/pqVRPNStarter.cxx">https://github.com/alexisylchan/ParaView/blob/master/Plugins/VRPN/pqVRPNStarter.cxx</a><br>
<br><br><b>Test code:</b></font></font></font><br>   <font size="1"><span style="font-family: tahoma,sans-serif;"> // Normal geometry creation</span><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    vtkConeSource* cone = vtkConeSource::New();</span><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;">    vtkPolyDataMapper * coneMapper = vtkPolyDataMapper::New();</span><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    coneMapper-&gt;SetInputConnection(cone-&gt;GetOutputPort());</span><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;">    vtkActor* coneActor = vtkActor::New();</span><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    coneActor-&gt;SetMapper(coneMapper);</span><br style="font-family: tahoma,sans-serif;">
<br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    coneActor-&gt;SetPosition(10,0,0);</span><br style="font-family: tahoma,sans-serif;"><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;">    vtkPolyDataReader* reader = vtkPolyDataReader::New();</span><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    reader-&gt;SetFileName(&quot;D:/alexisc/good-spindle.vtk&quot;);</span><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;"> </span><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    </span><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    vtkPolyDataMapper* mapper = vtkPolyDataMapper::New();</span><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;">    mapper-&gt;SetInputConnection(reader-&gt;GetOutputPort());</span><br style="font-family: tahoma,sans-serif;"><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    vtkActor* actor = vtkActor::New();</span><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;">    actor-&gt;SetMapper(mapper);</span><br style="font-family: tahoma,sans-serif;"><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    actor-&gt;SetScale(0.01, 0.01, 0.01);</span><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;">    vtkAxesActor* axesActor = vtkAxesActor::New();  </span><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">      </span><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;">    vtkRenderer* renderer = vtkRenderer::New();</span><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    renderer-&gt;AddViewProp(actor);    </span><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;">    renderer-&gt;AddViewProp(axesActor);</span><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    renderer-&gt;AddViewProp(coneActor);</span><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;">    </span><br style="font-family: tahoma,sans-serif;"><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    vtkRenderWindow* window = vtkRenderWindow::New();</span><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;">    window-&gt;SetSize(1000,1000);</span><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    window-&gt;AddRenderer(renderer); </span><br style="font-family: tahoma,sans-serif;">
<br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    //Add second window</span><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    vtkRenderWindow* window2 = vtkRenderWindow::New();</span><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;">    window2-&gt;SetSize(1000,1000);</span><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    window2-&gt;AddRenderer(renderer); </span><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;">    </span><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    /////////////////////////FIRST TRACKER////////////////////////////</span><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;">    //Create connection to VRPN Tracker using vtkInteractionDevice.lib</span><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    vtkVRPNTracker* tracker = vtkVRPNTracker::New();</span><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;">    tracker-&gt;SetDeviceName(&quot;Tracker0@tracker1-cs:3883&quot;); </span><br style="font-family: tahoma,sans-serif;"><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    </span><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;">    //My custom Tracker placement</span><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    tracker-&gt;SetTracker2WorldTranslation(-7.47, 0, -1.5);</span><br style="font-family: tahoma,sans-serif;">
<br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    // Rotate 90 around x so that tracker is pointing upwards instead of towards view direction.</span><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;">    double t2w[3][3] = { 1, 0,  0,</span><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">                         0, 0, -1, </span><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;">                         0, 1,  0 };</span><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    double t2wQuat[4];</span><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;">    vtkMath::Matrix3x3ToQuaternion(t2w, t2wQuat);</span><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    tracker-&gt;SetTracker2WorldRotation(t2wQuat);</span><br style="font-family: tahoma,sans-serif;">
<br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    tracker-&gt;Initialize();</span><br style="font-family: tahoma,sans-serif;"><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    //Create device interactor style (defined in vtkInteractionDevice.lib) that determines how the device manipulates camera viewpoint</span><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;">    vtkVRPNTrackerStyleCamera* trackerStyleCamera = vtkVRPNTrackerStyleCamera::New();</span><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    trackerStyleCamera-&gt;SetTracker(tracker);</span><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;">    trackerStyleCamera-&gt;SetRenderer(renderer);</span><br style="font-family: tahoma,sans-serif;"><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    /////////////////////////SECOND TRACKER////////////////////////////</span><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;">    //Create connection to VRPN Tracker using vtkInteractionDevice.lib</span><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    vtkVRPNTracker* tracker2 = vtkVRPNTracker::New();</span><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;">    tracker2-&gt;SetDeviceName(&quot;Tracker1@tracker1-cs:3883&quot;); </span><br style="font-family: tahoma,sans-serif;"><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    </span><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;">    //My custom Tracker placement</span><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    tracker2-&gt;SetTracker2WorldTranslation(-7.0, 0, -1.5);</span><br style="font-family: tahoma,sans-serif;">
<br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    // Rotate 90 around x so that tracker is pointing upwards instead of towards view direction.</span><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;">    double t2w2[3][3] = { 1, 0,  0,</span><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">                         0, 0, -1, </span><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;">                         0, 1,  0 };</span><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    double t2wQuat2[4];</span><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;">    vtkMath::Matrix3x3ToQuaternion(t2w2, t2wQuat2);</span><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    tracker2-&gt;SetTracker2WorldRotation(t2wQuat2);</span><br style="font-family: tahoma,sans-serif;">
<br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    tracker2-&gt;Initialize();  </span><br style="font-family: tahoma,sans-serif;"><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    //Create device interactor style (defined in vtkInteractionDevice.lib) that determines how the device manipulates camera viewpoint</span><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;">    vtkVRPNTrackerStyleCamera* trackerStyleCamera2 = vtkVRPNTrackerStyleCamera::New();</span><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    trackerStyleCamera2-&gt;SetTracker(tracker2);</span><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;">    trackerStyleCamera2-&gt;SetRenderer(renderer);</span><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    //////////////////////////////////////////////////////////////////////////////</span><br style="font-family: tahoma,sans-serif;">
<br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    vtkDeviceInteractor* inputInteractor = vtkDeviceInteractor::New();</span><br style="font-family: tahoma,sans-serif;"><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;">    //Add first tracker to Device Interactor</span><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    inputInteractor-&gt;AddInteractionDevice(tracker);</span><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;">    inputInteractor-&gt;AddDeviceInteractorStyle(trackerStyleCamera);</span><br style="font-family: tahoma,sans-serif;"><br style="font-family: tahoma,sans-serif;"><br style="font-family: tahoma,sans-serif;">
<br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    vtkDeviceInteractor* inputInteractor2 = vtkDeviceInteractor::New();</span><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    //Add second tracker to second Device Interactor</span><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;">    inputInteractor2-&gt;AddInteractionDevice(tracker2);</span><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    inputInteractor2-&gt;AddDeviceInteractorStyle(trackerStyleCamera2);</span><br style="font-family: tahoma,sans-serif;">
<br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    vtkInteractionDeviceManager* idManager = vtkInteractionDeviceManager::New();</span><br style="font-family: tahoma,sans-serif;">
<br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    //Get vtkRenderWindowInteractor from the Interaction Device Manager (defined in vtkInteractionDevice.lib)</span><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;">    vtkRenderWindowInteractor* interactor = idManager-&gt;GetInteractor(inputInteractor);</span><br style="font-family: tahoma,sans-serif;"><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;">    //Get second interactor</span><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    vtkRenderWindowInteractor* interactor2 = idManager-&gt;GetInteractor(inputInteractor2);</span><br style="font-family: tahoma,sans-serif;">
<br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    //Set the vtkRenderWindowInteractor&#39;s style (trackballcamera) and window </span><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;">    vtkInteractorStyleTrackballCamera* interactorStyle = vtkInteractorStyleTrackballCamera::New();</span><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    interactor-&gt;SetRenderWindow(window);</span><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;">    interactor-&gt;SetInteractorStyle(interactorStyle); </span><br style="font-family: tahoma,sans-serif;"><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    //Get second interactorStyle</span><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;">    vtkInteractorStyleTrackballCamera* interactorStyle2 = vtkInteractorStyleTrackballCamera::New();</span><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    interactor2-&gt;SetRenderWindow(window2);</span><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;">    interactor2-&gt;SetInteractorStyle(interactorStyle2); </span><br style="font-family: tahoma,sans-serif;"><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    interactor-&gt;Initialize(); </span><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;">    interactor2-&gt;Initialize();</span><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    // Clean up</span><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;">    //    cone-&gt;Delete();</span><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    reader-&gt;Delete();</span><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;">    mapper-&gt;Delete();</span><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    actor-&gt;Delete();</span><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;">    renderer-&gt;Delete();</span><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;"> </span><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;">    window-&gt;Delete();</span><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    tracker-&gt;Delete();</span><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;">    trackerStyleCamera-&gt;Delete();</span><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    inputInteractor-&gt;Delete();</span><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;">    idManager-&gt;Delete();</span><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    interactorStyle-&gt;Delete();</span><br style="font-family: tahoma,sans-serif;">
<br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    window2-&gt;Delete();</span><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    tracker2-&gt;Delete();</span><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;">    trackerStyleCamera2-&gt;Delete();</span><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    inputInteractor2-&gt;Delete(); </span><br style="font-family: tahoma,sans-serif;">
<br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    interactorStyle2-&gt;Delete(); </span><br style="font-family: tahoma,sans-serif;"><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    // Start interacting</span><br style="font-family: tahoma,sans-serif;">
<span style="font-family: tahoma,sans-serif;">    interactor-&gt;Start(); </span><br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">    interactor2-&gt;Start();</span><br style="font-family: tahoma,sans-serif;">
</font><br><br><div class="gmail_quote">On Mon, Feb 28, 2011 at 10:49 AM, Utkarsh Ayachit <span dir="ltr">&lt;<a href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
What exactly are you trying to do? vtkSMMultiViewRenderModuleProxy is<br>
deprecated, but it was never meant to be used directly anyways -- one<br>
simply created a view proxy and used it. Which is still true. Simply<br>
create multiple &quot;RenderView&quot; proxies and set &quot;ViewPosition&quot; and<br>
&quot;ViewSize&quot; properties on them to set up the layout.<br>
<br>
Utkarsh<br>
<div><div></div><div class="h5"><br>
<br>
On Sun, Feb 27, 2011 at 4:44 PM, Alexis Chan &lt;<a href="mailto:alexisc@stanfordalumni.org">alexisc@stanfordalumni.org</a>&gt; wrote:<br>
&gt; Hi<br>
&gt;<br>
&gt; I am interested in implementing multiple views (multiple interactors and<br>
&gt; multiple renderers). I think this is a pretty good example for me to follow:<br>
&gt; <a href="http://www.paraview.org/Wiki/Multiple_views" target="_blank">http://www.paraview.org/Wiki/Multiple_views</a><br>
&gt;<br>
&gt; But I cannot find vtkSMMultiViewRenderModuleProxy  in my clone of the<br>
&gt; ParaView git repository.<br>
&gt;<br>
&gt; Has the class been deprecated?<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Alexis YL Chan<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at<br>
&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the ParaView Wiki at:<br>
&gt; <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
&gt;<br>
&gt;<br>
</blockquote></div><br><br clear="all"><br>-- <br>Alexis YL Chan <a href="http://alexisylchan.wordpress.com/" target="_blank"></a><br>