Hi Xiaopeng,<br><br>Please look at the code in IGSTK:<br><br>   IGSTK/Source/igstkView.cxx<br><br><br>Search for &quot;m_PointPicker&quot;.<br><br>---<br><br>You will find the code at:<br><br>       <a href="http://www.igstk.org">http://www.igstk.org</a><br>
<br>IGSTK is based on ITK and VTK.<br><br><br>  Regards,<br><br><br>        Luis<br><br>------------------------------------------------------------------------<br><div class="gmail_quote">On Tue, Oct 19, 2010 at 8:24 PM, Xiaopeng Yang <span dir="ltr">&lt;<a href="mailto:yxp233@postech.ac.kr">yxp233@postech.ac.kr</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;">








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

<div>

<p class="MsoNormal">Dear members,</p>

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

<p class="MsoNormal">Usually, when we segment liver from CT image by ITK, we need
to manually input the seed points to our code (attached for reference),
however, it is time demanding. What I want to achieve is that, visualize the CT
image by VTK, then by clicking some points (seed points), they are
automatically saved to our code. Is there any existing example in ITK &amp; VTK
for this purpose? If not, what is the best way to achieve the goal?</p>

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

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: blue;">#define</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> N_SEEDS 20</span></p>

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

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: blue;">int</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> main( <span style="color: blue;">int</span> argc, <span style="color: blue;">char</span> *argv[] )</span></p>


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

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

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">  <span style="color: blue;">long</span> <span style="color: blue;">int</span> seed_points[N_SEEDS][3] = {</span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">                                                            {     158, 
210, 203    },</span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">                                                            {     182, 
206, 193    },</span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">                                                            {     283, 
186, 193    },</span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">                                                            {     318, 
204, 188    },</span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">                                                            {     340, 
226, 179    },</span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">                                                            {     136, 
229, 178    },</span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">                                                            {     227, 
180, 178    },</span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">                                                            {     343, 
233, 178    },</span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">                                                            {     331, 
239, 174    },</span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">                                                            {     387, 
244, 172    },</span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">                                                            {     123, 
287, 142    },</span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">                                                            {     197, 
249, 142    },</span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">                                                            {     132, 
204, 142    },</span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">                                                            {     204, 
136, 142    },</span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">                                         
                  {     271, 
196, 142    },</span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">                                                            {     288, 
119, 142    },</span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">                                                            {     156, 
337, 104    },</span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">                                                            {     124, 
238, 101    },</span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">                                                            {     106, 
207, 79     },                      </span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">                                                            {     87, 
215, 35      }</span></p>

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

<p class="MsoNormal" style=""><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;;">                                      
};</span></p>

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

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">}</span></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>