OTB  5.0.0
Orfeo Toolbox
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 
33 template<class TInputImage>
35  public itk::LabelMapFilter<TInputImage, TInputImage>
36 {
37 public:
43 
46  typedef TInputImage InputImageType;
47  typedef typename InputImageType::Pointer InputImagePointer;
48  typedef typename InputImageType::ConstPointer InputImageConstPointer;
49  typedef typename InputImageType::RegionType InputImageRegionType;
50  typedef typename InputImageType::PixelType InputImagePixelType;
51  typedef typename InputImageType::LabelObjectType LabelObjectType;
52  typedef typename InputImageType::ConstIterator ConstIteratorType;
53 
54  typedef typename LabelObjectType::AttributesValueType AttributesValueType;
55  typedef typename LabelObjectType::AttributesMapType AttributesMapType;
57 
60 
62  itkStaticConstMacro(InputImageDimension, unsigned int,
63  TInputImage::ImageDimension);
64 
66  itkNewMacro(Self);
67 
69  itkTypeMacro(MinMaxAttributesLabelMapFilter,
70  LabelMapFilter);
71 
72 
75  {
76  return this->GetMinimumOutput()->Get();
77  }
78  AttributesMapObjectType* GetMinimumOutput();
79  const AttributesMapObjectType* GetMinimumOutput() const;
81 
84  {
85  return this->GetMaximumOutput()->Get();
86  }
87  AttributesMapObjectType* GetMaximumOutput();
88  const AttributesMapObjectType* GetMaximumOutput() const;
90 
91  virtual DataObjectPointerType MakeOutput(DataObjectPointerArraySizeType idx);
92  using Superclass::MakeOutput;
93 
94 protected:
97 
98  virtual void GenerateData();
99 
100 private:
101  MinMaxAttributesLabelMapFilter(const Self&); //purposely not implemented
102  void operator=(const Self&); //purposely not implemented
103 
104  //typedef typename InputImageType::LabelObjectContainerType LabelObjectContainerType;
105  //typedef typename LabelObjectContainerType::const_iterator LabelObjectContainerConstIterator;
106 
107 
108 }; // end of class
109 
110 } // end namespace otb
111 
112 #ifndef OTB_MANUAL_INSTANTIATION
114 #endif
115 
116 #endif
117 
118 
itk::LabelMapFilter< TInputImage, TInputImage > Superclass
LabelObjectType::AttributesMapType AttributesMapType
itk::SimpleDataObjectDecorator< AttributesMapType > AttributesMapObjectType
LabelObjectType::AttributesValueType AttributesValueType
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
Computes the min/max of all attributes of a LabelMap where LabelObject type is compatible with otb::A...
itk::ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType