Commit fac420d1 authored by Manuel Grizonnet's avatar Manuel Grizonnet
Browse files

BUG: mantis 1142- make support for itk 4.9 conditional

Adapted from the patch provided by sebastic (see
https://bugs.orfeo-toolbox.org/view.php?id=1142)

Allow to maintain compatibility with itk 4.9 conditional (ITK do not maintain
backward compatibility with FundamentalTypes after release 4.9)
parent d65819d5
...@@ -18,7 +18,13 @@ ...@@ -18,7 +18,13 @@
#ifndef _otbConfigurationManager_h #ifndef _otbConfigurationManager_h
#define _otbConfigurationManager_h #define _otbConfigurationManager_h
#include "itkVersion.h"
#if ITK_VERSION_MAJOR < 4 || (ITK_VERSION_MAJOR == 4 && ITK_VERSION_MINOR <= 8)
#include "itksys/FundamentalType.h"
#else
#include "itk_kwiml.h" #include "itk_kwiml.h"
#endif
#include <string> #include <string>
#include <boost/cstdint.hpp> #include <boost/cstdint.hpp>
...@@ -38,7 +44,11 @@ namespace otb ...@@ -38,7 +44,11 @@ namespace otb
class ConfigurationManager class ConfigurationManager
{ {
public: public:
#if ITK_VERSION_MAJOR < 4 || (ITK_VERSION_MAJOR == 4 && ITK_VERSION_MINOR <= 8)
typedef ::itksysFundamentalType_UInt64 RAMValueType;
#else
typedef KWIML_INT_uint64_t RAMValueType; typedef KWIML_INT_uint64_t RAMValueType;
#endif
/** /**
* DEMDirectory is a directory were DEM tiles are stored. * DEMDirectory is a directory were DEM tiles are stored.
......
...@@ -19,7 +19,11 @@ ...@@ -19,7 +19,11 @@
#define __otbPipelineMemoryPrintCalculator_h #define __otbPipelineMemoryPrintCalculator_h
#include "itkProcessObject.h" #include "itkProcessObject.h"
#if ITK_VERSION_MAJOR < 4 || (ITK_VERSION_MAJOR == 4 && ITK_VERSION_MINOR <= 8)
#include "itksys/FundamentalType.h"
#else
#include "itk_kwiml.h" #include "itk_kwiml.h"
#endif
#include <set> #include <set>
namespace otb namespace otb
...@@ -75,7 +79,11 @@ public: ...@@ -75,7 +79,11 @@ public:
typedef ProcessObjectType::Pointer ProcessObjectPointerType; typedef ProcessObjectType::Pointer ProcessObjectPointerType;
typedef itk::DataObject DataObjectType; typedef itk::DataObject DataObjectType;
typedef DataObjectType::Pointer DataObjectPointerType; typedef DataObjectType::Pointer DataObjectPointerType;
#if ITK_VERSION_MAJOR < 4 || (ITK_VERSION_MAJOR == 4 && ITK_VERSION_MINOR <= 8)
typedef ::itksysFundamentalType_UInt64 MemoryPrintType;
#else
typedef KWIML_INT_uint64_t MemoryPrintType; typedef KWIML_INT_uint64_t MemoryPrintType;
#endif
typedef std::set<const ProcessObjectType *> ProcessObjectPointerSetType; typedef std::set<const ProcessObjectType *> ProcessObjectPointerSetType;
/** Run-time type information (and related methods). */ /** Run-time type information (and related methods). */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment