Orfeo Toolbox  4.0
otbUnaryFunctorNeighborhoodVectorImageFilter.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 __otbUnaryFunctorNeighborhoodVectorImageFilter_h
19 #define __otbUnaryFunctorNeighborhoodVectorImageFilter_h
20 
21 #include "itkInPlaceImageFilter.h"
24 
25 namespace otb
26 {
36 template <class TInputImage, class TOutputImage, class TFunction>
38  : public itk::InPlaceImageFilter<TInputImage, TOutputImage>
39 {
40 public:
46 
48  itkNewMacro(Self);
49 
51  itkTypeMacro(UnaryFunctorNeighborhoodVectorImageFilter, InPlaceImageFilter);
52 
54  itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension);
55  itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension);
56 
58  typedef TFunction FunctorType;
59  typedef TInputImage InputImageType;
60  typedef typename InputImageType::ConstPointer InputImagePointer;
61  typedef typename InputImageType::RegionType InputImageRegionType;
62  typedef typename InputImageType::PixelType InputImagePixelType;
63  typedef TOutputImage OutputImageType;
64  typedef typename OutputImageType::Pointer OutputImagePointer;
65  typedef typename OutputImageType::RegionType OutputImageRegionType;
66  typedef typename OutputImageType::PixelType OutputImagePixelType;
67 
69 
74  FunctorType& GetFunctor()
75  {
76  return m_Functor;
77  }
78 
85  void SetFunctor(const FunctorType& functor)
86  {
87  m_Functor = functor;
88  this->Modified();
89  }
90 
93  typedef typename NeighborhoodIteratorType::RadiusType
95 
101  itkSetMacro(Radius, RadiusType);
102  itkGetMacro(Radius, RadiusType);
103 
104 protected:
107 
118  virtual void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
119  itk::ThreadIdType threadId);
120 
125  virtual void GenerateOutputInformation(void);
126 
128 
129 private:
130  UnaryFunctorNeighborhoodVectorImageFilter(const Self &); //purposely not implemented
131  void operator =(const Self&); //purposely not implemented
132 
134 }; // end of class
135 
136 } // namespace otb
137 
138 #ifndef OTB_MANUAL_INSTANTIATION
140 #endif
141 
142 #endif
143 
144 

Generated at Sat Mar 8 2014 16:23:16 for Orfeo Toolbox with doxygen 1.8.3.1