21 #ifndef otbClosePathFunctor_h
22 #define otbClosePathFunctor_h
40 template <
class TInput,
class TOutput>
59 newPath->Initialize();
60 typename TInput::VertexType lastVertex;
62 if (input->GetVertexList()->Size() > 0)
65 lastVertex = input->GetVertexList()->Begin().Value();
69 newPath->AddVertex(vertexIt.Value());
70 lastVertex = vertexIt.Value();
72 if (lastVertex != input->GetVertexList()->Begin().Value())
74 newPath->AddVertex(input->GetVertexList()->Begin().Value());
78 newPath->SetMetaDataDictionary(input->GetMetaDataDictionary());
This filter close the input path, making the last point equal to the first one.
TInput::VertexListType::ConstPointer VertexListConstPointerType
OutputPathType::Pointer OutputPathPointerType
virtual ~ClosePathFunctor()
OutputPathPointerType operator()(const TInput *input)
TInput::VertexListType::ConstIterator VertexListConstIteratorType
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.