OTB  9.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
grm::GraphToOtbImage
Definition: grmGraphToOtbImage.h:35
grm
Definition: grmBaatzSegmenter.h:22
grm::GraphToOtbImage::LabelImageType
otb::Image< LabelPixelType, 2 > LabelImageType
Definition: grmGraphToOtbImage.h:45
grm::GraphToOtbImage::ClusteredImageType
otb::VectorImage< ClusterPixelType, 2 > ClusteredImageType
Definition: grmGraphToOtbImage.h:47
otbVectorImage.h
otb::VectorImage::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbVectorImage.h:53
otbImage.h
otb::Image
Creation of an "otb" image which contains metadata.
Definition: otbImage.h:89
grm::GraphToOtbImage::GetClusteredOutput
ClusteredImageType::Pointer GetClusteredOutput(const GraphType &graph, const unsigned int width, const unsigned int height)
grm::GraphToOtbImage::NodeType
GraphType::NodeType NodeType
Definition: grmGraphToOtbImage.h:41
grm::GraphToOtbImage::NodeList
std::vector< std::shared_ptr< NodeType > > NodeList
Definition: grmGraphToOtbImage.h:42
grm::GraphToOtbImage::NodeConstIterator
NodeList::const_iterator NodeConstIterator
Definition: grmGraphToOtbImage.h:43
otb::NodeType
NodeType
Definition: otbDataNode.h:39
lp::ContourOperations
Definition: lpContour.h:55
grm::GraphToOtbImage::LabelPixelType
unsigned int LabelPixelType
Definition: grmGraphToOtbImage.h:44
otbImageFileWriter.h
grm::GraphToOtbImage::GraphType
TGraph GraphType
Definition: grmGraphToOtbImage.h:40
grm::GraphToOtbImage::ClusterPixelType
unsigned char ClusterPixelType
Definition: grmGraphToOtbImage.h:46
grm::GraphToOtbImage::GetLabelImage
LabelImageType::Pointer GetLabelImage(const GraphType &graph, const unsigned int width, const unsigned int height)
otb::Image::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbImage.h:97
lpContour.h
grmGraph.h
otbImageFileReader.h
otb::VectorImage
Creation of an "otb" vector image which contains metadata.
Definition: otbVectorImage.h:45