Hi Xiaopeng,<br><br>Please look at the code in IGSTK:<br><br> IGSTK/Source/igstkView.cxx<br><br><br>Search for "m_PointPicker".<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"><<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">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 & 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: "Courier New"; color: blue;">#define</span><span style="font-size: 10pt; font-family: "Courier New";"> N_SEEDS 20</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"; color: blue;">int</span><span style="font-size: 10pt; font-family: "Courier New";"> 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: "Courier New";">{</span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: "Courier New";"> <span style="color: green;">// seed points</span></span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: "Courier New";"> <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: "Courier New";"> { 158,
210, 203 },</span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: "Courier New";"> { 182,
206, 193 },</span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: "Courier New";"> { 283,
186, 193 },</span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: "Courier New";"> { 318,
204, 188 },</span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: "Courier New";"> { 340,
226, 179 },</span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: "Courier New";"> { 136,
229, 178 },</span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: "Courier New";"> { 227,
180, 178 },</span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: "Courier New";"> { 343,
233, 178 },</span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: "Courier New";"> { 331,
239, 174 },</span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: "Courier New";"> { 387,
244, 172 },</span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: "Courier New";"> { 123,
287, 142 },</span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: "Courier New";"> { 197,
249, 142 },</span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: "Courier New";"> { 132,
204, 142 },</span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: "Courier New";"> { 204,
136, 142 },</span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: "Courier New";">
{ 271,
196, 142 },</span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: "Courier New";"> { 288,
119, 142 },</span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: "Courier New";"> { 156,
337, 104 },</span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: "Courier New";"> { 124,
238, 101 },</span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: "Courier New";"> { 106,
207, 79 }, </span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: "Courier New";"> { 87,
215, 35 }</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";"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: "Courier New";">
};</span></p>
<p class="MsoNormal"><span style="font-family: "Courier New";">…</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: "Courier New";">}</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>