21 #ifndef otbMetaImageFunction_hxx
22 #define otbMetaImageFunction_hxx
31 template <
class TOutputPrecision,
class TCoordRep>
36 template <
class TOutputPrecision,
class TCoordRep>
39 this->ClearFunctions();
42 template <
class TOutputPrecision,
class TCoordRep>
45 m_FunctionContainer.push_back(
function);
48 template <
class TOutputPrecision,
class TCoordRep>
51 m_FunctionContainer.clear();
54 template <
class TOutputPrecision,
class TCoordRep>
57 return m_FunctionContainer.size();
60 template <
class TOutputPrecision,
class TCoordRep>
63 return m_FunctionContainer.at(index);
66 template <
class TOutputPrecision,
class TCoordRep>
69 typename FunctionContainerType::iterator fIt = m_FunctionContainer.begin() + index;
70 m_FunctionContainer.erase(fIt);
73 template <
class TOutputPrecision,
class TCoordRep>
80 typename FunctionContainerType::const_iterator fIt = m_FunctionContainer.begin();
81 while (fIt != m_FunctionContainer.end())
84 unsigned int currentSize =
static_cast<unsigned int>(resp.GetSize());
87 OutputType currentVector = (*fIt)->Evaluate(point);
90 unsigned int currentVectorSize =
static_cast<unsigned int>(currentVector.GetSize());
93 resp.SetSize(currentSize + currentVectorSize,
false);
96 for (
unsigned int i = 0; i < currentVectorSize; ++i)
98 resp.SetElement(currentSize + i,
static_cast<ValueType>(currentVector[i]));
109 template <
class TOutputPrecision,
class TCoordRep>
112 Superclass::PrintSelf(os, indent);
113 os << indent <<
"Number of image functions: " << this->GetNumberOfFunctions() << std::endl;