Orfeo Toolbox  4.2
otbMinMaxAttributesLabelMapFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3 Program: ORFEO Toolbox
4 Language: C++
5 Date: $Date$
6 Version: $Revision$
7 
8 
9 Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
10 See OTBCopyright.txt for details.
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 __otbMinMaxAttributesLabelMapFilter_h
19 #define __otbMinMaxAttributesLabelMapFilter_h
20 
21 #include "itkLabelMapFilter.h"
23 
24 namespace otb {
25 
31 template<class TInputImage>
33  public itk::LabelMapFilter<TInputImage, TInputImage>
34 {
35 public:
41 
43  typedef TInputImage InputImageType;
44  typedef typename InputImageType::Pointer InputImagePointer;
45  typedef typename InputImageType::ConstPointer InputImageConstPointer;
46  typedef typename InputImageType::RegionType InputImageRegionType;
47  typedef typename InputImageType::PixelType InputImagePixelType;
48  typedef typename InputImageType::LabelObjectType LabelObjectType;
49  typedef typename InputImageType::ConstIterator ConstIteratorType;
50 
51  typedef typename LabelObjectType::AttributesValueType AttributesValueType;
52  typedef typename LabelObjectType::AttributesMapType AttributesMapType;
54 
57 
59  itkStaticConstMacro(InputImageDimension, unsigned int,
60  TInputImage::ImageDimension);
61 
63  itkNewMacro(Self);
64 
66  itkTypeMacro(MinMaxAttributesLabelMapFilter,
67  LabelMapFilter);
68 
69 
71  AttributesMapType GetMinimum() const
72  {
73  return this->GetMinimumOutput()->Get();
74  }
75  AttributesMapObjectType* GetMinimumOutput();
76  const AttributesMapObjectType* GetMinimumOutput() const;
77 
79  AttributesMapType GetMaximum() const
80  {
81  return this->GetMaximumOutput()->Get();
82  }
83  AttributesMapObjectType* GetMaximumOutput();
84  const AttributesMapObjectType* GetMaximumOutput() const;
85 
86  virtual DataObjectPointerType MakeOutput(unsigned int idx);
87 
88 protected:
91 
92  virtual void GenerateData();
93 
94 private:
95  MinMaxAttributesLabelMapFilter(const Self&); //purposely not implemented
96  void operator=(const Self&); //purposely not implemented
97 
98  //typedef typename InputImageType::LabelObjectContainerType LabelObjectContainerType;
99  //typedef typename LabelObjectContainerType::const_iterator LabelObjectContainerConstIterator;
100 
101 
102 }; // end of class
103 
104 } // end namespace otb
105 
106 #ifndef OTB_MANUAL_INSTANTIATION
108 #endif
109 
110 #endif
111 
112 

Generated at Sat Aug 30 2014 16:14:23 for Orfeo Toolbox with doxygen 1.8.3.1