<br>Hi Erkang,<br><br>The LiverTumorSegmentation application uses VTK.<br><br>Therefore, you may want to use the class:<br><br><a href="http://www.vtk.org/doc/nightly/html/classvtkLineWidget.html">http://www.vtk.org/doc/nightly/html/classvtkLineWidget.html</a><br>
<br>Note that you can force the line to <br>be aligned with a plane by using the<br>methods<br><br> void <a class="el" href="http://www.vtk.org/doc/nightly/html/classvtkLineWidget.html#aaa561f1a3cc726fdc7441a485959570a">SetAlignToXAxis</a> ()
<br> void <a class="el" href="http://www.vtk.org/doc/nightly/html/classvtkLineWidget.html#a669f7f3a4c912311b03d4c61b93d5469">SetAlignToYAxis</a> ()
<br> void <a class="el" href="http://www.vtk.org/doc/nightly/html/classvtkLineWidget.html#a73ed44c5ba19db4c1ee99c8f259c63bd">SetAlignToZAxis</a> ()<br><br><br><br> Regards,<br><br><br> Luis<br><br><br><br>---------------------------------------------------<br>
<div class="gmail_quote">On Thu, Apr 15, 2010 at 10:20 AM, Erkang Cheng <span dir="ltr"><<a href="mailto:ekyaya@gmail.com">ekyaya@gmail.com</a>></span> wrote:<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>Could anyone help me? I
follow the example in InsightApplication titled
"LiverTumorSegmentation". I want to draw a line one the window.<br><br>The story is that, I want to interact the window which display a image or one slice of 3D data (like DICOM). <br><br>The
operation is that when I click one point, and mouse move on the window,
then LeftButtonUp. These action could related to a line. <br>
<br>I want to save the positions of all the points on the line and draw this line on the window.<br><br>I
follow the example in InsightApplication titled
"LiverTumorSegmentation". In this application, I can get the point when
I click on the window, also, I can get the points when mouse move.<br>
<br>So, I want to draw this line on the window. How to do this?<br><br>My
idea is that, suppose that there are two points p1 and p2, p1 is the
point I click on the window, when mouse move, p2 is current point, I
want to draw a line from p1 to p2. Then update p1 as p2. This could
turn into a line. I use this method in MFC which can draw a line.<br>
<br>But, I don't know how to draw a line in a vtkRenderWindow? what's the coordinate of the vtkRenderWindow?<br><br>Is there is example similar to my question? <br><br>Thanks a lot.
<br>_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br></blockquote></div><br>