[Insight-users] MaskImageFilter wiki example
Chr. Rossmanith
cr at neuro.ma.uni-heidelberg.de
Wed Feb 15 08:49:36 EST 2012
I've added
#include "itkConfigure.h"
to the example.
Christina
Am 15.02.2012 14:41, schrieb Bill Lorensen:
> ITK_VERSION_MAJOR is in
> itkConfigure.h
>
> If you have not included at least one itk .h file, it will be undefined.
>
> On Wed, Feb 15, 2012 at 8:19 AM, David Doria<daviddoria at gmail.com> wrote:
>> 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;
>> }
>>
>>
>> _____________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Kitware offers ITK Training Courses, for more information visit:
>> http://www.kitware.com/products/protraining.html
>>
>> Please keep messages on-topic and check the ITK FAQ at:
>> http://www.itk.org/Wiki/ITK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.itk.org/mailman/listinfo/insight-users
>>
>
>
More information about the Insight-users
mailing list