[Insight-users] how to debug ITK program--diffeomorhpic demons at example
Luis Ibanez
luis.ibanez at kitware.com
Sat Feb 7 13:10:43 EST 2009
Hi Baoyun,
reconfigure you application with CMake and set the
variable
CMAKE_BUILD_TYPE to "Debug"
This will add the "-g" flag to your compilation commands
in the generated Makefiles.
Regards,
Luis
-----------------
Baoyun Li wrote:
>
>
> 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
>
>
>
>
>
>
>
>
>
>
More information about the Insight-users
mailing list