Orfeo Toolbox  3.16
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 
50  typedef typename LabelObjectType::AttributesValueType AttributesValueType;
51  typedef typename LabelObjectType::AttributesMapType AttributesMapType;
53 
56 
58  itkStaticConstMacro(InputImageDimension, unsigned int,
59  TInputImage::ImageDimension);
60 
62  itkNewMacro(Self);
63 
65  itkTypeMacro(MinMaxAttributesLabelMapFilter,
66  LabelMapFilter);
67 
68 
70  AttributesMapType GetMinimum() const
71  {
72  return this->GetMinimumOutput()->Get();
73  }
74  AttributesMapObjectType* GetMinimumOutput();
75  const AttributesMapObjectType* GetMinimumOutput() const;
76 
78  AttributesMapType GetMaximum() const
79  {
80  return this->GetMaximumOutput()->Get();
81  }
82  AttributesMapObjectType* GetMaximumOutput();
83  const AttributesMapObjectType* GetMaximumOutput() const;
84 
85  virtual DataObjectPointerType MakeOutput(unsigned int idx);
86 
87 protected:
90 
91  virtual void GenerateData();
92 
93 private:
94  MinMaxAttributesLabelMapFilter(const Self&); //purposely not implemented
95  void operator=(const Self&); //purposely not implemented
96 
97  typedef typename InputImageType::LabelObjectContainerType LabelObjectContainerType;
98  typedef typename LabelObjectContainerType::const_iterator LabelObjectContainerConstIterator;
99 
100 
101 }; // end of class
102 
103 } // end namespace otb
104 
105 #ifndef OTB_MANUAL_INSTANTIATION
107 #endif
108 
109 #endif
110 
111 

Generated at Sun Feb 3 2013 00:37:02 for Orfeo Toolbox with doxygen 1.8.1.1