Hi Johnny,<br><br>GDB has recently greatly improved C++ support.  You may have better luck with a newer version of GDB.<br><br>The problem I have run into previously is with GDB resolving the SmartPointer, not the templated methods.  So, you may have to do something like:<br>
<br>p (*(image.m_Pointer)).GetPixel(pixelIndex)<br><br>If you use vim, I like pyclewn (which works on top of GDB).  If you want a GUI, maybe KDevelop4?<br><br>Best,<br>Matt<br><br><div class="gmail_quote">On Thu, Jul 28, 2011 at 9:05 PM, Johnny <span dir="ltr">&lt;<a href="mailto:20673972@student.uwa.edu.au">20673972@student.uwa.edu.au</a>&gt;</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;"><div link="blue" vlink="purple" lang="EN-AU"><div><p class="MsoNormal">Hi all,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Could be a silly question but did confuse me quite a few days. Your help are highly appreciated.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">
While I was trying to use GDB debugging my code, I wanted to see what value the GetPixel(index) method returns.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">The easiest way to reproduce this issue is using the source code Examples/DataRepresentation/Image/Image3.cxx<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">Line113:  ImageType:PixelType pixelValue = image-&gt;GetPixel(pixelINdex);<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">I set the break at line 113. Then using expression “p image-&gt;GetPixel(pixelIndex)” which is exactly the same in the code. <u></u><u></u></p>
<p class="MsoNormal">However I always got the message “Couldn’t find method itk::SmartPointer&lt;itk::Image&lt;short unsined int, 3u&gt;&gt;::GetPixel”<u></u><u></u></p><p class="MsoNormal">What was confusing me is if I continued the program, it run OK, which means it could find the method. I just could not get it from debuging command.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">I did heard that GDB are somehow tricky to deal with templated methods. Is this the  issue?<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">
Btw I am using Intel mac osx, I cound not install ddd. Any suggestions for a good visual debugger?<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Cheers<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Johnny<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></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>