[Insight-users] MaskImageFilter wiki example

David Doria daviddoria at gmail.com
Wed Feb 15 08:19:46 EST 2012


On Wed, Feb 15, 2012 at 7:59 AM, Chr. Rossmanith <
cr at neuro.ma.uni-heidelberg.de> wrote:

> Hi,
>
> does the conditional compilation (part of the code see below) really work?
> I have to put  #include "itkImage.h" before #if, otherwise I get the #if
> branch instead of the #else branch even if I use ITKv4. For testing
> purposes I had some output which showed ITK_VERSION_MAJOR with value 4 but
> despite that the expression ITK_VERSION_MAJOR<4 was evaluated as true.
>
> Christina Rossmanith
>

You're right - it doesn't seem to be defined properly -  I see both of
these outputs when building against ITKv4.

#include <iostream>

#if ITK_VERSION_MAJOR < 4
  #pragma message "less than 4"
#endif

#if ITK_VERSION_MAJOR == 0
  #pragma message "zero"
#endif

int main(int argc, char *argv[])
{
  return 0;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20120215/e2da57d2/attachment.htm>


More information about the Insight-users mailing list