Orfeo Toolbox  3.16
itkUnaryFunctorImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkUnaryFunctorImageFilter.h,v $
5  Language: C++
6  Date: $Date: 2008-10-07 17:31:02 $
7  Version: $Revision: 1.25 $
8 
9  Copyright (c) Insight Software Consortium. All rights reserved.
10  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11 
12  This software is distributed WITHOUT ANY WARRANTY; without even
13  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14  PURPOSE. See the above copyright notices for more information.
15 
16 =========================================================================*/
17 #ifndef __itkUnaryFunctorImageFilter_h
18 #define __itkUnaryFunctorImageFilter_h
19 
20 #include "itkInPlaceImageFilter.h"
22 
23 namespace itk
24 {
25 
42 template <class TInputImage, class TOutputImage, class TFunction >
43 class ITK_EXPORT UnaryFunctorImageFilter : public InPlaceImageFilter<TInputImage,TOutputImage>
44 {
45 public:
51 
53  itkNewMacro(Self);
54 
57 
59  typedef TFunction FunctorType;
60 
61  typedef TInputImage InputImageType;
62  typedef typename InputImageType::ConstPointer InputImagePointer;
63  typedef typename InputImageType::RegionType InputImageRegionType;
64  typedef typename InputImageType::PixelType InputImagePixelType;
65 
66  typedef TOutputImage OutputImageType;
67  typedef typename OutputImageType::Pointer OutputImagePointer;
68  typedef typename OutputImageType::RegionType OutputImageRegionType;
69  typedef typename OutputImageType::PixelType OutputImagePixelType;
70 
75  FunctorType& GetFunctor() { return m_Functor; };
76  const FunctorType& GetFunctor() const { return m_Functor; }
77 
84  void SetFunctor(const FunctorType& functor)
85  {
86  if (m_Functor != functor)
87  {
88  m_Functor = functor;
89  this->Modified();
90  }
91  }
92 
93 protected:
96 
105  virtual void GenerateOutputInformation();
106 
117  void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
118  int threadId );
119 
120 private:
121  UnaryFunctorImageFilter(const Self&); //purposely not implemented
122  void operator=(const Self&); //purposely not implemented
123 
125 };
126 
127 } // end namespace itk
128 
129 #ifndef ITK_MANUAL_INSTANTIATION
131 #endif
132 
133 #endif

Generated at Sun Feb 3 2013 00:10:43 for Orfeo Toolbox with doxygen 1.8.1.1