[Insight-users] GDB debuging couldn't find method GetPixel()

Johnny 20673972 at student.uwa.edu.au
Thu Jul 28 21:05:34 EDT 2011


Hi all,

 

Could be a silly question but did confuse me quite a few days. Your help are
highly appreciated.

 

While I was trying to use GDB debugging my code, I wanted to see what value
the GetPixel(index) method returns.

 

The easiest way to reproduce this issue is using the source code
Examples/DataRepresentation/Image/Image3.cxx

Line113:  ImageType:PixelType pixelValue = image->GetPixel(pixelINdex);

 

I set the break at line 113. Then using expression "p
image->GetPixel(pixelIndex)" which is exactly the same in the code. 

However I always got the message "Couldn't find method
itk::SmartPointer<itk::Image<short unsined int, 3u>>::GetPixel"

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.

 

I did heard that GDB are somehow tricky to deal with templated methods. Is
this the  issue?

 

Btw I am using Intel mac osx, I cound not install ddd. Any suggestions for a
good visual debugger?

 

 

Cheers

 

Johnny

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110729/a9720bcd/attachment.htm>


More information about the Insight-users mailing list