[Insight-users] Multi Resolution : error in "new"

Luis Ibanez luis . ibanez at kitware . com
Thu, 30 Oct 2003 18:42:05 -0500


Hi Robert,


You are #defining the "new" keyword.


     #ifdef _DEBUG
     #define new DEBUG_NEW
     #undef THIS_FILE
     static char THIS_FILE[] = __FILE__;
     #endif



The itkNewMacro() uses the new operator inside.

My guess is that you redefinion of "new" is
conflicting with the code of the itkNewMacro().

Please remove this "new" #define.

You may want to look at the code of the
itkNewMacro() defined in

     Insight/Code/Common/itkMacro.h

and balance this with the definion you
have of "DEBUG_NEW".

BTW: ITK uses SmartPointers, so you don't
need to use something like DEBUG_NEW,
at least not for ITK objects.



Regards,


     Luis



--------------------------------
Robert-Paul Buitendijk wrote:
 > Hi luis
 >
 > here are the relevant files from my project.
 >
 > tnx RP
 >
 > -----Oorspronkelijk bericht-----
 > Van: Luis Ibanez [mailto:luis . ibanez at kitware . com]
 > Verzonden: woensdag 29 oktober 2003 1:08
 > Aan: Robert-Paul Buitendijk
 > CC: Insight-users at public . kitware . com
 > Onderwerp: Re: [Insight-users] Multi Resolution
 >
 >
 >
 > Hi Robert,
 >
 > The itkNewMacro() is a very fundamental macro in ITK. If your
 > application produces compilation errors on this code, it certainly
 > means that your have a configuration problem.
 >
 > Could you please post the CMakeLists.txt file that you are using for
 > your project ?
 >
 > The original error message will also be helpful.
 >
 >
 > Thanks
 >
 >
 >    Luis
 >
 >
 > -------------------------------------
 > Robert-Paul Buitendijk wrote:
 >
 >>Hello
 >>
 >>I tried to make a multi resolution registration but i get an error.
 >>The code in the example which i copied gives some errors.
 >>The file is attached below.
 >>
 >>itkNewMacro( Self ); allready gets an error. did i miss a directory which
 >
 > i
 >
 >>should have linked.
 >>
 >>Tnx Robert
 >>
 >>