[Insight-developers] Compile Time ITK version testing?

Williams, Norman K norman-k-williams at uiowa.edu
Tue Dec 11 09:14:39 EST 2007


It turns out that my submission to the Insight Journal is failing on the IJ dashboard, because it depends on at least revision 3.0 of ITK.

Is there a compile time check for the ITK version?  I looked at itkVersion.h and it defines a class that will give you the ITK version numbers at runtime.  But I need to do something like this:

#include <itkSpatialOrientationAdapter.h>
#if ITK_VERSION > 3.0
typedef itk::SpatialOrientationAdapter SOAdapter;
#else
typedef itk::SpatialOrientationAdapter<3> SOAdapter;
#endif


More information about the Insight-developers mailing list