Hi all,<br><br>This answer are just for future searches in the list. <br>The code and approach are right. The problem was other, that&#39;s don&#39;t need to be mentioned here since aren&#39;t VTK related.<br><br>Regards,<br>
<br>Wagner Sales<br><br><div class="gmail_quote">2008/5/14 Wagner Sales &lt;<a href="mailto:wsales@gmail.com">wsales@gmail.com</a>&gt;:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi all,<br><br>The following message was sent in some minutes ago.<br>I&#39;m trying to show marked points in a 2D view from a dataset in 3D view of segmented data from this dataset. To explain more:<br>a) I have a DICOM dataset<br>

b)
In 2D view I was marked some points to use in segmentation, done by
ITK. The segmentation works fine, then I think my points are marked ok.<br>
c) After segmentation, I extract the polydata and show in a 3D view.<br>d)
Then, I try to create new points in 2D view and show in 3D. The points
are created, but in 3D appears in a different location.<br>Well, I
think I need to convert the coordinates from the point and after that
set manually the position of the point (a vtkActor) in 3D view.<br>
<br>Are I&#39;m correct? If yes, how to convert these coordinates? Are another more simple approach?<br><br>Well, taking a look at my VTK book and some examples, I think I need to translate the dataset to global coordinates. This are done by the following code:<br>

<br>double *Point::translateCoordinates(int x, int y, int z)<br>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // m_CurrentImageData are a vtkImageData instance<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(!m_CurrentImageData)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xyzCoords[0] = 0.0;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xyzCoords[1] = 0.0;<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xyzCoords[2] = 0.0;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return xyzCoords;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; q[0] = x;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; q[1] = y;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; q[2] = z;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cellNum = m_CurrentImageData-&gt;ComputeCellId(q);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; subID = m_CurrentImageData-&gt;GetCell( cellNum )-&gt;GetParametricCenter(paraCoords);<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int &amp;subIDadd = subID;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_CurrentImageData-&gt;GetCell(cellNum)-&gt;EvaluateLocation(subIDadd, paraCoords, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xyzCoords, vtkcellweights);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return xyzCoords;<br>}<br><br>Then I&#39;m trying to set the actor position using xyzCoords, but not working ( the point are in wrong position yet ). Any help?<br>

<br>Thks in advance,<br><font color="#888888"><font color="#888888"><br>Wagner Sales</font>
</font></blockquote></div><br>