ITK  4.9.0
Insight Segmentation and Registration Toolkit
itkDerivativeOperator.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkDerivativeOperator_h
19 #define itkDerivativeOperator_h
20 
22 
23 namespace itk
24 {
65 template< typename TPixel, unsigned int VDimension = 2,
66  typename TAllocator = NeighborhoodAllocator< TPixel > >
68  public NeighborhoodOperator< TPixel, VDimension, TAllocator >
69 {
70 public:
71 
74  typedef NeighborhoodOperator<
75  TPixel, VDimension, TAllocator > Superclass;
76 
77  typedef typename Superclass::PixelType PixelType;
79 
82 
84  DerivativeOperator(const Self & other):
85  NeighborhoodOperator< TPixel, VDimension, TAllocator >(other)
86  { m_Order = other.m_Order; }
87 
89  Self & operator=(const Self & other)
90  {
91  if(this != &other)
92  {
93  Superclass::operator=(other);
94  m_Order = other.m_Order;
95  }
96  return *this;
97  }
99 
101  void SetOrder(const unsigned int & order)
102  {
103  this->m_Order = order;
104  }
105 
107  unsigned int GetOrder() const { return m_Order; }
108 
110  virtual void PrintSelf(std::ostream & os, Indent i) const
111  {
112  os << i << "DerivativeOperator { this=" << this
113  << ", m_Order = " << m_Order << "}" << std::endl;
115  }
117 
118 protected:
122 
125 
127  void Fill(const CoefficientVector & coeff)
129 
130 private:
132  unsigned int m_Order;
133 };
134 } // namespace itk
135 
136 #ifndef ITK_MANUAL_INSTANTIATION
137 #include "itkDerivativeOperator.hxx"
138 #endif
139 
140 #endif
Self & operator=(const Self &other)
Superclass::CoefficientVector CoefficientVector
NeighborhoodOperator< TPixel, VDimension, TAllocator > Superclass
A NeighborhoodOperator for taking an n-th order derivative at a pixel.
virtual void PrintSelf(std::ostream &os, Indent i) const override
unsigned int GetOrder() const
CoefficientVector GenerateCoefficients()
void Fill(const CoefficientVector &coeff)
Virtual class that defines a common interface to all neighborhood operator subtypes.
Superclass::PixelType PixelType
void SetOrder(const unsigned int &order)
virtual void FillCenteredDirectional(const CoefficientVector &)
Self & operator=(const Self &orig)
DerivativeOperator(const Self &other)
Control indentation during Print() invocation.
Definition: itkIndent.h:49
virtual void PrintSelf(std::ostream &os, Indent i) const
Superclass::PixelRealType PixelRealType
Indent GetNextIndent()