Hi Xiaopen,<br><br>Capture the "EndPickEvent" 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->GetPickPosition( data );<br>
<br> itk::Point< double, 3 > 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">On Mon, Oct 25, 2010 at 2:15 AM, Xiaopeng Yang <span dir="ltr"><<a href="mailto:yxp233@postech.ac.kr">yxp233@postech.ac.kr</a>></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;">
<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" style=""><span style="font-size: 10pt; font-family: "Courier New";"> vtkImagePlaneWidget * zImagePlaneWidget
= vtkImagePlaneWidget::New();</span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: "Courier New";"> </span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: "Courier New";"> zImagePlaneWidget->DisplayTextOn();</span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: "Courier New";">
zImagePlaneWidget->SetInput(vtkImporter->GetOutput());</span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: "Courier New";">
zImagePlaneWidget->SetPlaneOrientationToZAxes();</span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: "Courier New";">
zImagePlaneWidget->SetSliceIndex(size[0]/2);</span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: "Courier New";"> zImagePlaneWidget->SetPicker(picker);</span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: "Courier New";">
zImagePlaneWidget->RestrictPlaneToVolumeOn();</span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: "Courier New";"> zImagePlaneWidget->SetKeyPressActivationValue(<span style="color: rgb(163, 21, 21);">'y'</span>);</span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: "Courier New";">
zImagePlaneWidget->GetPlaneProperty()->SetColor(1, 0, 0);</span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: "Courier New";">
zImagePlaneWidget->SetTexturePlaneProperty(ipwProp);</span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: "Courier New";">
zImagePlaneWidget->SetResliceInterpolateToNearestNeighbour();</span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: "Courier New";"> </span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: "Courier New";"> zImagePlaneWidget->SetInteractor( iren );</span></p>
<p class="MsoNormal" style="text-indent: 12pt;"><span style="font-size: 10pt; font-family: "Courier New";">zImagePlaneWidget->On();</span></p>
<p class="MsoNormal" style="text-indent: 12pt;"><span style="font-size: 10pt; font-family: "Courier New";"> </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>_____________________________________<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>