ITK  4.8.0
Insight Segmentation and Registration Toolkit
itkHigherOrderAccurateDerivativeOperator.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 itkHigherOrderAccurateDerivativeOperator_h
19 #define itkHigherOrderAccurateDerivativeOperator_h
20 
22 
23 namespace itk
24 {
25 
60 template< class TPixel, unsigned int VDimension = 2,
61  class TAllocator = NeighborhoodAllocator< TPixel > >
63  public NeighborhoodOperator< TPixel, VDimension, TAllocator >
64 {
65 public:
66 
69  typedef NeighborhoodOperator<
70  TPixel, VDimension, TAllocator > Superclass;
71 
72  typedef typename Superclass::PixelType PixelType;
74 
77 
80  m_Order(1),
82  {}
83 
86  NeighborhoodOperator< TPixel, VDimension, TAllocator >(other)
87  { m_Order = other.m_Order; }
88 
90  Self & operator=(const Self & other)
91  {
92  Superclass::operator=(other);
93  m_Order = other.m_Order;
94  return *this;
95  }
97 
99  void SetOrder(const unsigned int & order)
100  {
101  this->m_Order = order;
102  }
103 
105  unsigned int GetOrder() const { return m_Order; }
106 
110  void SetOrderOfAccuracy(const unsigned int & order)
111  {
112  this->m_OrderOfAccuracy = order;
113  }
114 
115  unsigned int GetOrderOfAccuracy() const { return m_OrderOfAccuracy; }
116 
118  virtual void PrintSelf(std::ostream & os, Indent i) const
119  {
120  os << i << "HigherOrderAccurateDerivativeOperator { this=" << this
121  << ", m_Order = " << m_Order
122  << ", m_OrderOfAccuracy = " << m_OrderOfAccuracy << "}" << std::endl;
124  }
126 
127 protected:
131 
134 
136  void Fill(const CoefficientVector & coeff)
138 private:
141 
143  unsigned int m_Order;
144 
146  unsigned int m_OrderOfAccuracy;
147 };
148 
149 } // namespace itk
150 
151 #ifndef ITK_MANUAL_INSTANTIATION
152 #include "itkHigherOrderAccurateDerivativeOperator.hxx"
153 #endif
154 
155 #endif
A NeighborhoodOperator for calculating an n-th order accurate derivative at a pixel.
A light-weight container object for storing an N-dimensional neighborhood of values.
virtual void PrintSelf(std::ostream &os, Indent i) const override
NumericTraits< TPixel >::RealType PixelRealType
CoefficientVector GenerateFirstOrderCoefficients()
std::vector< PixelRealType > CoefficientVector
Virtual class that defines a common interface to all neighborhood operator subtypes.
virtual void PrintSelf(std::ostream &os, Indent i) const
NeighborhoodOperator< TPixel, VDimension, TAllocator > Superclass
virtual void FillCenteredDirectional(const CoefficientVector &)
Self & operator=(const Self &orig)
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Indent GetNextIndent()