<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:12pt"><div>Hi,</div><div><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;">I used vtk 5.8.0 and pcl 1.5.1.</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;">Here 's my problem: I have 2 views that displays 2 objects that represent the same objet scanned from differents points of view. I need to place them in the same point of view. <br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;">Like this when I
 rotate/ or move the camera in one view I can see the 2 objects moving/rotating exactly the same.</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;">For this, i do:</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;">--------------------</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family:
 arial,helvetica,sans-serif; background-color: transparent; font-style: normal;">an init method when i link the 2 cameras:</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;">vtkSmartPointer&lt;vtkCamera&gt; cam1 = renderer1-&gt;GetActiveCamera();<br>vtkSmartPointer&lt;vtkCamera&gt; cam2 = renderer2-&gt;GetActiveCamera();<br><br>matrixCam1-&gt;DeepCopy( cam1-&gt;GetViewTransformObject()-&gt;GetMatrix() );<br>matrixCam2-&gt;DeepCopy( cam2-&gt;GetViewTransformObject()-&gt;GetMatrix() );<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>vtkSmartPointer&lt;vtkMatrix4x4&gt; mat1Invert = vtkMatrix4x4::New();<br>vtkMatrix4x4::Invert( matrixCam1, mat1Invert);<br><br>vtkMatrix4x4::Multiply4x4(mat1Invert, matrixCam2,
 deltaMat);<br>vtkMatrix4x4::Invert( deltaMat, deltaMatInv);</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;">Then during mouse event I do:</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial,helvetica,sans-serif; background-color:
 transparent; font-style: normal;">// Get the 2 cam<br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;">vtkSmartPointer&lt;vtkCamera&gt; cam1 = renderer1-&gt;GetActiveCamera();</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;">vtkSmartPointer&lt;vtkCamera&gt; cam2 = renderer2-&gt;GetActiveCamera();<br><br>vtkSmartPointer&lt;vtkMatrix4x4&gt; camTo = vtkMatrix4x4::New();<br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;">vtkMatrix4x4::Multiply4x4(matrixCam1, deltaMat, camTo ); <br>&nbsp;&nbsp;&nbsp;
 <br>cam2-&gt;GetViewTransformObject()-&gt;SetMatrix( camTo );<br>cam2-&gt;Modified();<br><br>Renderer2-&gt;GetRenderWindow()-&gt;Render();</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;">--------------------<br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;">When using this on my view1 (move/rotate the camera), the display on view2 is ok and updates well. But when I move/rotate from view2&nbsp; the update in&nbsp; view1 is wrong,&nbsp; I recover an older
 view matrix whereas, I modify both matrix in my code.</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;">Any ideas ?</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;">Thank you<br></div></div></body></html>