Commit cde3116d authored by Julien Michel's avatar Julien Michel

COMP: Splitting InputImageParameter into several targets, to avoid eating too...

COMP: Splitting InputImageParameter into several targets, to avoid eating too much memory when building it
parent d8e59289
......@@ -11,6 +11,13 @@ set(OTBApplicationEngine_SRC
otbWrapperInputFilenameListParameter.cxx
otbWrapperOutputImageParameter.cxx
otbWrapperInputImageParameter.cxx
otbWrapperInputImageParameterUInt8.cxx
otbWrapperInputImageParameterInt16.cxx
otbWrapperInputImageParameterUInt16.cxx
otbWrapperInputImageParameterInt32.cxx
otbWrapperInputImageParameterUInt32.cxx
otbWrapperInputImageParameterFloat.cxx
otbWrapperInputImageParameterDouble.cxx
otbWrapperParameterKey.cxx
otbWrapperDocExampleStructure.cxx
otbWrapperInputVectorDataParameter.cxx
......
......@@ -18,7 +18,7 @@
#include "otbWrapperInputImageParameter.h"
#include "itksys/SystemTools.hxx"
#include "otbWrapperTypes.h"
#include "otbWrapperInputImageParameterMacros.h"
#include <boost/algorithm/string.hpp>
namespace otb
......@@ -80,30 +80,6 @@ InputImageParameter::GetImage()
return this->GetImage<FloatVectorImageType>();
}
#define otbGetImageMacro(image) \
image##Type * \
InputImageParameter::Get##image () \
{ \
return this->GetImage< image##Type > (); \
}
otbGetImageMacro(UInt8Image)
otbGetImageMacro(UInt16Image);
otbGetImageMacro(Int16Image);
otbGetImageMacro(UInt32Image);
otbGetImageMacro(Int32Image);
otbGetImageMacro(FloatImage);
otbGetImageMacro(DoubleImage);
otbGetImageMacro(UInt8VectorImage);
otbGetImageMacro(UInt16VectorImage);
otbGetImageMacro(Int16VectorImage);
otbGetImageMacro(UInt32VectorImage);
otbGetImageMacro(Int32VectorImage);
otbGetImageMacro(FloatVectorImage);
otbGetImageMacro(DoubleVectorImage);
otbGetImageMacro(UInt8RGBImage);
otbGetImageMacro(UInt8RGBAImage);
......@@ -136,60 +112,6 @@ InputImageParameter::ClearValue()
m_UseFilename = true;
}
#define otbCastImageMacro(InputImageType, OutputImageType, theMethod) \
template<> OutputImageType * \
InputImageParameter::CastImage<InputImageType , OutputImageType>() \
{ \
return this->theMethod<InputImageType , OutputImageType>(); \
}
#define otbGenericCastImageMacro(InputImageType, theMethod, prefix) \
otbCastImageMacro(InputImageType, UInt8##prefix##ImageType, theMethod) \
otbCastImageMacro(InputImageType, UInt16##prefix##ImageType, theMethod) \
otbCastImageMacro(InputImageType, Int16##prefix##ImageType, theMethod) \
otbCastImageMacro(InputImageType, UInt32##prefix##ImageType, theMethod) \
otbCastImageMacro(InputImageType, Int32##prefix##ImageType, theMethod) \
otbCastImageMacro(InputImageType, Float##prefix##ImageType, theMethod) \
otbCastImageMacro(InputImageType, Double##prefix##ImageType, theMethod)
/*********************************************************************
********************** Image -> Image
**********************************************************************/
otbGenericCastImageMacro(UInt8ImageType, SimpleCastImage, )
otbGenericCastImageMacro(Int16ImageType, SimpleCastImage, )
otbGenericCastImageMacro(UInt16ImageType, SimpleCastImage, )
otbGenericCastImageMacro(Int32ImageType, SimpleCastImage, )
otbGenericCastImageMacro(UInt32ImageType, SimpleCastImage, )
otbGenericCastImageMacro(FloatImageType, SimpleCastImage, )
otbGenericCastImageMacro(DoubleImageType, SimpleCastImage, )
/*********************************************************************
********************** VectorImage -> VectorImage
**********************************************************************/
otbGenericCastImageMacro(UInt8VectorImageType, SimpleCastImage, Vector)
otbGenericCastImageMacro(Int16VectorImageType, SimpleCastImage, Vector)
otbGenericCastImageMacro(UInt16VectorImageType, SimpleCastImage, Vector)
otbGenericCastImageMacro(Int32VectorImageType, SimpleCastImage, Vector)
otbGenericCastImageMacro(UInt32VectorImageType, SimpleCastImage, Vector)
otbGenericCastImageMacro(FloatVectorImageType, SimpleCastImage, Vector)
otbGenericCastImageMacro(DoubleVectorImageType, SimpleCastImage, Vector)
/*********************************************************************
********************** Image -> VectorImage
**********************************************************************/
otbGenericCastImageMacro(UInt8ImageType, CastVectorImageFromImage, Vector)
otbGenericCastImageMacro(Int16ImageType, CastVectorImageFromImage, Vector)
otbGenericCastImageMacro(UInt16ImageType, CastVectorImageFromImage, Vector)
otbGenericCastImageMacro(Int32ImageType, CastVectorImageFromImage, Vector)
otbGenericCastImageMacro(UInt32ImageType, CastVectorImageFromImage, Vector)
otbGenericCastImageMacro(FloatImageType, CastVectorImageFromImage, Vector)
otbGenericCastImageMacro(DoubleImageType, CastVectorImageFromImage, Vector)
}
}
/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#include "otbWrapperInputImageParameter.h"
#include "itksys/SystemTools.hxx"
#include "otbWrapperTypes.h"
#include "otbWrapperInputImageParameterMacros.h"
#include <boost/algorithm/string.hpp>
namespace otb
{
namespace Wrapper
{
otbGetImageMacro(DoubleImage);
otbGetImageMacro(DoubleVectorImage)
otbGenericCastImageMacro(DoubleImageType, SimpleCastImage, )
otbGenericCastImageMacro(DoubleVectorImageType, SimpleCastImage, Vector)
otbGenericCastImageMacro(DoubleImageType, CastVectorImageFromImage, Vector)
}
}
/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#include "otbWrapperInputImageParameter.h"
#include "otbWrapperInputImageParameterMacros.h"
#include "itksys/SystemTools.hxx"
#include "otbWrapperTypes.h"
#include <boost/algorithm/string.hpp>
namespace otb
{
namespace Wrapper
{
otbGetImageMacro(FloatImage);
otbGetImageMacro(FloatVectorImage)
otbGenericCastImageMacro(FloatImageType, SimpleCastImage, )
otbGenericCastImageMacro(FloatVectorImageType, SimpleCastImage, Vector)
otbGenericCastImageMacro(FloatImageType, CastVectorImageFromImage, Vector)
}
}
/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#include "otbWrapperInputImageParameter.h"
#include "itksys/SystemTools.hxx"
#include "otbWrapperTypes.h"
#include "otbWrapperInputImageParameterMacros.h"
#include <boost/algorithm/string.hpp>
namespace otb
{
namespace Wrapper
{
otbGetImageMacro(Int16Image);
otbGetImageMacro(Int16VectorImage)
otbGenericCastImageMacro(Int16ImageType, SimpleCastImage, )
otbGenericCastImageMacro(Int16VectorImageType, SimpleCastImage, Vector)
otbGenericCastImageMacro(Int16ImageType, CastVectorImageFromImage, Vector)
}
}
/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#include "otbWrapperInputImageParameter.h"
#include "itksys/SystemTools.hxx"
#include "otbWrapperTypes.h"
#include "otbWrapperInputImageParameterMacros.h"
#include <boost/algorithm/string.hpp>
namespace otb
{
namespace Wrapper
{
otbGetImageMacro(Int32Image);
otbGetImageMacro(Int32VectorImage)
otbGenericCastImageMacro(Int32ImageType, SimpleCastImage, )
otbGenericCastImageMacro(Int32VectorImageType, SimpleCastImage, Vector)
otbGenericCastImageMacro(Int32ImageType, CastVectorImageFromImage, Vector)
}
}
/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __otbWrapperInputImageParameterMacros__h
#define __otbWrapperInputImageParameterMacros__h
#define otbGetImageMacro(image) \
image##Type * \
InputImageParameter::Get##image () \
{ \
return this->GetImage< image##Type > (); \
}
#define otbCastImageMacro(InputImageType, OutputImageType, theMethod) \
template<> OutputImageType * \
InputImageParameter::CastImage<InputImageType , OutputImageType>() \
{ \
return this->theMethod<InputImageType , OutputImageType>(); \
}
#define otbGenericCastImageMacro(InputImageType, theMethod, prefix) \
otbCastImageMacro(InputImageType, UInt8##prefix##ImageType, theMethod) \
otbCastImageMacro(InputImageType, UInt16##prefix##ImageType, theMethod) \
otbCastImageMacro(InputImageType, Int16##prefix##ImageType, theMethod) \
otbCastImageMacro(InputImageType, UInt32##prefix##ImageType, theMethod) \
otbCastImageMacro(InputImageType, Int32##prefix##ImageType, theMethod) \
otbCastImageMacro(InputImageType, Float##prefix##ImageType, theMethod) \
otbCastImageMacro(InputImageType, Double##prefix##ImageType, theMethod)
#endif
/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#include "otbWrapperInputImageParameter.h"
#include "itksys/SystemTools.hxx"
#include "otbWrapperTypes.h"
#include "otbWrapperInputImageParameterMacros.h"
#include <boost/algorithm/string.hpp>
namespace otb
{
namespace Wrapper
{
otbGetImageMacro(UInt16Image);
otbGetImageMacro(UInt16VectorImage)
otbGenericCastImageMacro(UInt16ImageType, SimpleCastImage, )
otbGenericCastImageMacro(UInt16VectorImageType, SimpleCastImage, Vector)
otbGenericCastImageMacro(UInt16ImageType, CastVectorImageFromImage, Vector)
}
}
/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#include "otbWrapperInputImageParameter.h"
#include "itksys/SystemTools.hxx"
#include "otbWrapperTypes.h"
#include "otbWrapperInputImageParameterMacros.h"
#include <boost/algorithm/string.hpp>
namespace otb
{
namespace Wrapper
{
otbGetImageMacro(UInt32Image);
otbGetImageMacro(UInt32VectorImage)
otbGenericCastImageMacro(UInt32ImageType, SimpleCastImage, )
otbGenericCastImageMacro(UInt32VectorImageType, SimpleCastImage, Vector)
otbGenericCastImageMacro(UInt32ImageType, CastVectorImageFromImage, Vector)
}
}
/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#include "otbWrapperInputImageParameter.h"
#include "itksys/SystemTools.hxx"
#include "otbWrapperTypes.h"
#include "otbWrapperInputImageParameterMacros.h"
#include <boost/algorithm/string.hpp>
namespace otb
{
namespace Wrapper
{
otbGetImageMacro(UInt8Image);
otbGetImageMacro(UInt8VectorImage)
otbGenericCastImageMacro(UInt8ImageType, SimpleCastImage, )
otbGenericCastImageMacro(UInt8VectorImageType, SimpleCastImage, Vector)
otbGenericCastImageMacro(UInt8ImageType, CastVectorImageFromImage, Vector)
}
}
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