I use the GetCursorData() function in ImagePlaneWidget for selecting the seed points with left mouse button click . <br><br>Regards<br>Darshan<br><br><div class="gmail_quote">On Sun, Oct 31, 2010 at 10:08 AM, Luis Ibanez <span dir="ltr">&lt;<a href="mailto:luis.ibanez@kitware.com">luis.ibanez@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;">Hi Xiaopen,<br><br>Capture the &quot;EndPickEvent&quot; with an Observer,<br>and in the execute method of the observer,<br>
extract the coordinates of the point with code<br>similar to:<br><br>  double data[3];<br>  picker-&gt;GetPickPosition( data );<br>
<br>  itk::Point&lt; double, 3 &gt; pickedPoint;<br>  pickedPoint[0] = data[0];<br>  pickedPoint[1] = data[1];<br>  pickedPoint[2] = data[2];<br>  <br><br>---<br><br>See the example:<br><br>VTK/Examples/Annotation/Python/annotatePick.py<br>

<br><br>   Regards,<br><br><br>         Luis<br><br>----------------------------------------------------------------<br><div class="gmail_quote"><div><div></div><div class="h5">On Mon, Oct 25, 2010 at 2:15 AM, Xiaopeng Yang <span dir="ltr">&lt;<a href="mailto:yxp233@postech.ac.kr" target="_blank">yxp233@postech.ac.kr</a>&gt;</span> wrote:<br>

</div></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div></div><div class="h5">








<div link="blue" vlink="purple" lang="EN-US">

<div>

<p class="MsoNormal">Hello everyone,</p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">I am working on developing a simple medical image segmentation
program, which provide interactive selection and automatic saving function of multiple
seed points. That means when left-clicking on one of the CT slices, the 3D position
of that point will be automatically saved to the code. </p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">I applied ImagePlaneWidget to pick the position of certain
clicked point. The position and intensity value can be shown on the screen. But
I have no idea how to program to save the position to the code. Could you give
me a hand about how to solve this problem?</p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">Here is the code of ImagePlaneWidget:</p>

<p class="MsoNormal"> </p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">  vtkImagePlaneWidget * zImagePlaneWidget
=  vtkImagePlaneWidget::New();</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> </span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">  zImagePlaneWidget-&gt;DisplayTextOn();</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> 
zImagePlaneWidget-&gt;SetInput(vtkImporter-&gt;GetOutput());</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> 
zImagePlaneWidget-&gt;SetPlaneOrientationToZAxes();</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> 
zImagePlaneWidget-&gt;SetSliceIndex(size[0]/2);</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">  zImagePlaneWidget-&gt;SetPicker(picker);</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> 
zImagePlaneWidget-&gt;RestrictPlaneToVolumeOn();</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">  zImagePlaneWidget-&gt;SetKeyPressActivationValue(<span style="color: rgb(163, 21, 21);">&#39;y&#39;</span>);</span></p>


<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> 
zImagePlaneWidget-&gt;GetPlaneProperty()-&gt;SetColor(1, 0, 0);</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> 
zImagePlaneWidget-&gt;SetTexturePlaneProperty(ipwProp);</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> 
zImagePlaneWidget-&gt;SetResliceInterpolateToNearestNeighbour();</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> </span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">  zImagePlaneWidget-&gt;SetInteractor( iren );</span></p>

<p class="MsoNormal" style="text-indent: 12pt;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">zImagePlaneWidget-&gt;On();</span></p>

<p class="MsoNormal" style="text-indent: 12pt;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> </span></p>

<p class="MsoNormal">Thanks very much.</p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">Best regards,</p>

<p class="MsoNormal">Yang</p>

</div>

</div>


<br></div></div>_____________________________________<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>
<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 <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br>