OTB  10.0.0
Orfeo Toolbox
grmGraphToOtbImage.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Generic Region Merging Library
4  Language: C++
5  author: Lassalle Pierre
6  contact: lassallepierre34@gmail.com
7 
8 
9 
10  Copyright (c) Centre National d'Etudes Spatiales. All rights reserved
11 
12 
13  This software is distributed WITHOUT ANY WARRANTY; without even
14  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  PURPOSE. See the above copyright notices for more information.
16 
17 =========================================================================*/
18 #ifndef GRM_GRAPH_TO_OTBIMAGE_H
19 #define GRM_GRAPH_TO_OTBIMAGE_H
20 #include <itkRGBPixel.h>
21 #include <itkImageRegion.h>
22 #include <otbImage.h>
23 #include <otbVectorImage.h>
24 #include <otbImageFileReader.h>
25 #include <otbImageFileWriter.h>
26 #include "grmGraph.h"
27 #include <string>
28 #include <stdlib.h>
29 #include <time.h>
30 #include "lpContour.h"
31 
32 namespace grm
33 {
34  template<class TGraph>
36  {
37  public:
38 
39  /* Some convenient typedefs */
40  typedef TGraph GraphType;
41  typedef typename GraphType::NodeType NodeType;
42  typedef std::vector< std::shared_ptr<NodeType> > NodeList;
43  typedef typename NodeList::const_iterator NodeConstIterator;
44  typedef unsigned int LabelPixelType;
46  typedef unsigned char ClusterPixelType;
49 
50 
52  const unsigned int width,
53  const unsigned int height);
54 
56  const unsigned int width,
57  const unsigned int height);
58  };
59 
60 } // end of namespace grm
61 #include "grmGraphToOtbImage.txx"
62 #endif
GraphType::NodeType NodeType
std::vector< std::shared_ptr< NodeType > > NodeList
otb::Image< LabelPixelType, 2 > LabelImageType
NodeList::const_iterator NodeConstIterator
LabelImageType::Pointer GetLabelImage(const GraphType &graph, const unsigned int width, const unsigned int height)
otb::VectorImage< ClusterPixelType, 2 > ClusteredImageType
unsigned char ClusterPixelType
ClusteredImageType::Pointer GetClusteredOutput(const GraphType &graph, const unsigned int width, const unsigned int height)
Creation of an "otb" image which contains metadata.
Definition: otbImage.h:92
itk::SmartPointer< Self > Pointer
Definition: otbImage.h:97
Creation of an "otb" vector image which contains metadata.
itk::SmartPointer< Self > Pointer
NodeType
Definition: otbDataNode.h:39