Dear all,<br><br>I&#39;m trying to compute the display coordinates of my polydata object. I have an original object and use a vtkTransformPolyDataFilter to generate another polydata object from it. Then I start to compute the display coordinates of corresponding points on the original and generated object. I also pass the generated point set to another function to do the same computation. However, I find the results are not the same.<br>

<br>Here is the code. For example, I compute once in function A and the pass the object to function B to compute again,<br><br><b>void functionA()<br>{<br>  for (int index = 0; index &lt; 14; index++)<br>    {<br>        original_points-&gt;GetPoint(landmarks[index], p1);<br>

        renderer-&gt;SetWorldPoint(p1);<br>        renderer-&gt;WorldToDisplay();<br>        renderer-&gt;GetDisplayPoint(r1);         // r1 = (171, 398, 0)<br><br>        transformed_points-&gt;GetPoint(landmarks[index], p2);<br>

        renderer-&gt;SetWorldPoint(p2);<br>        renderer-&gt;WorldToDisplay();<br>        renderer-&gt;GetDisplayPoint(r2);        // r2 = (173, 398, 0)<br>    }<br><br>    functionB(transformed_points);<br>}</b><br><br>

And in function B,<br><br><b>void functionB(transformed_points)<br>{<br>  for (int index = 0; index &lt; 14; index++)<br>    {<br>        points-&gt;GetPoint(landmarks[index], p1);<br>        ren-&gt;SetWorldPoint(p1);<br>

        ren-&gt;WorldToDisplay();<br>        ren-&gt;GetDisplayPoint(r1);              // r1 = (171, 398, 0) it is the same in function A<br><br>        tpoints-&gt;GetPoint(landmarks[index], p2);<br>        ren-&gt;SetWorldPoint(p2);<br>

        ren-&gt;WorldToDisplay();<br>        ren-&gt;GetDisplayPoint(r2);              // r2 = (-22, 715, 15) which is significantly different from A<br>    }<br>}</b><br><br>In A and B the pipeline of combining the points and actors are the same, and the camera was kept the same. But why the results just not right?<br>

<br>Thank you very much if anyone can help me solve this annoying problem. I extremely appreciate your help.<br><br>Best wishes<br>Long<br>