Skip to content
Snippets Groups Projects
Commit b5318820 authored by Antoine Regimbeau's avatar Antoine Regimbeau
Browse files

ENH: add support for ComplexInputImageParameter

parent 1503f8d0
No related branches found
No related tags found
1 merge request!12Complex image integration
...@@ -592,11 +592,16 @@ public: ...@@ -592,11 +592,16 @@ public:
{ \ { \
Image##Type::Pointer ret; \ Image##Type::Pointer ret; \
Parameter* param = GetParameterByKey(parameter); \ Parameter* param = GetParameterByKey(parameter); \
if (dynamic_cast<InputImageParameter*>(param)) \ InputImageParameter* paramDown = dynamic_cast<InputImageParameter*>(param); \
ComplexInputImageParameter* paramDownC = dynamic_cast<ComplexInputImageParameter*>(param); \
if ( paramDown ) \
{ \ { \
InputImageParameter* paramDown = dynamic_cast<InputImageParameter*>(param); \
ret = paramDown->Get##Image(); \ ret = paramDown->Get##Image(); \
} \ } \
else if ( paramDownC ) /* Support of ComplexInputImageParameter */ \
{ \
ret = paramDownC->Get##Image(); \
} \
return ret; \ return ret; \
} }
......
...@@ -66,6 +66,27 @@ public: ...@@ -66,6 +66,27 @@ public:
ComplexFloatVectorImageType* GetComplexFloatVectorImage(); ComplexFloatVectorImageType* GetComplexFloatVectorImage();
ComplexDoubleVectorImageType* GetComplexDoubleVectorImage(); ComplexDoubleVectorImageType* GetComplexDoubleVectorImage();
/* Support for ComplexInputImageParameter. This has been done to support
the macro otbGetParameterImageMacro of otbWrapperApplication.h */
UInt8ImageType* GetUInt8Image();
UInt16ImageType* GetUInt16Image();
Int16ImageType* GetInt16Image();
UInt32ImageType* GetUInt32Image();
Int32ImageType* GetInt32Image();
FloatImageType* GetFloatImage();
DoubleImageType* GetDoubleImage();
UInt8VectorImageType* GetUInt8VectorImage();
UInt16VectorImageType* GetUInt16VectorImage();
Int16VectorImageType* GetInt16VectorImage();
UInt32VectorImageType* GetUInt32VectorImage();
Int32VectorImageType* GetInt32VectorImage();
FloatVectorImageType* GetFloatVectorImage();
DoubleVectorImageType* GetDoubleVectorImage();
UInt8RGBImageType* GetUInt8RGBImage();
UInt8RGBAImageType* GetUInt8RGBAImage();
/** Get the input image as templated image type. */ /** Get the input image as templated image type. */
template <class TImageType> template <class TImageType>
TImageType* GetImage(); TImageType* GetImage();
......
...@@ -133,6 +133,35 @@ ComplexInputImageParameter::ClearValue() ...@@ -133,6 +133,35 @@ ComplexInputImageParameter::ClearValue()
m_UseFilename = true; m_UseFilename = true;
} }
/* Support for ComplexInputImageParameter. This has been done to support
the macro otbGetParameterImageMacro of otbWrapperApplication.h */
#define otbGetFalseImageMacro(image) \
image##Type * \
ComplexInputImageParameter::Get##image () \
{ \
return nullptr; \
}
otbGetFalseImageMacro(DoubleImage);
otbGetFalseImageMacro(DoubleVectorImage);
otbGetFalseImageMacro(FloatImage);
otbGetFalseImageMacro(FloatVectorImage);
otbGetFalseImageMacro(Int16Image);
otbGetFalseImageMacro(Int16VectorImage);
otbGetFalseImageMacro(UInt16Image);
otbGetFalseImageMacro(UInt16VectorImage);
otbGetFalseImageMacro(Int32Image);
otbGetFalseImageMacro(Int32VectorImage);
otbGetFalseImageMacro(UInt32Image);
otbGetFalseImageMacro(UInt32VectorImage);
otbGetFalseImageMacro(UInt8Image);
otbGetFalseImageMacro(UInt8VectorImage);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment