/*========================================================================= Program: Generic Region Merging Library Language: C++ author: Lassalle Pierre contact: lassallepierre34@gmail.com Copyright (c) Centre National d'Etudes Spatiales. All rights reserved 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 GRM_GRAPH_TO_OTBIMAGE_H #define GRM_GRAPH_TO_OTBIMAGE_H #include #include #include #include #include #include #include "grmGraph.h" #include #include #include #include "lpContour.h" namespace grm { template class GraphToOtbImage { public: /* Some convenient typedefs */ typedef TGraph GraphType; typedef typename GraphType::NodeType NodeType; typedef std::vector< std::shared_ptr > NodeList; typedef typename NodeList::const_iterator NodeConstIterator; typedef unsigned int LabelPixelType; typedef otb::Image LabelImageType; typedef unsigned char ClusterPixelType; typedef otb::VectorImage ClusteredImageType; using ContourOperator = lp::ContourOperations; LabelImageType::Pointer GetLabelImage(const GraphType& graph, const unsigned int width, const unsigned int height); ClusteredImageType::Pointer GetClusteredOutput(const GraphType& graph, const unsigned int width, const unsigned int height); }; } // end of namespace grm #include "grmGraphToOtbImage.txx" #endif