[Insight-users] how to debug ITK program--diffeomorhpic demons at example (Baoyun Li)
Kaveh Kohan
kaveh.kohan at yahoo.com
Thu Jan 15 01:10:24 EST 2009
Baoyun,
I had exactly the same problem, I tried many Linux system but the problem persisted. I tried to debug it in the Windows using .Net and it works!!
So, I don't think that there is anything wrong with the code but perhaps gdb (or ddd) has some issues with it! why? I have no idea.
I have access to a Windows machine with .Net installed, you can debug it there and compile it again on your Linux machine.
By the way, if you manage to find the problem, please let us know.
Regards,
Kaveh
Dear Luis and All:
I am trying to debug cmake based ITK program. And I took diffeomorphic Demons (dowload for ITK journal)?as example see attated file.
I then build ITK and diffeomprohic Demons in Debug model. I can run the diffeomporphic demons, but?I have some trouble to go inside the sub-function at here
%%%%%%%%%%%%%%%%%%%%%%%%%
switch ( imageIO->GetNumberOfDimensions() )
{
case 2:
DemonsRegistrationFunction<2>(args);
break;
case 3:
{
float a1=(float)2;
float a2=(float)3;
add_them(a1,a2);
DemonsRegistrationFunction<3>(args);
break;
}
default:
std::cout << "Unsuported dimension" << std::endl;
exit( EXIT_FAILURE );
}
return EXIT_SUCCESS;
?
%%%%%%%%%%%%
add-them(a1,a2) is small code added by me, I can go inside add-them(a1,a2)? by step or setting breakpoint, but I can not go inside
DemonsRegistrationFunction<3>(args) in either way. The program will run till finish.
?
?
I tried DDD and gdb, can any body tell me what happened.
?
Thanks
?
Baoyun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090114/2232b356/attachment.htm>
More information about the Insight-users
mailing list