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());