ITK  4.9.0
Insight Segmentation and Registration Toolkit
itkLaplacianOperator.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 itkLaplacianOperator_h
19 #define itkLaplacianOperator_h
20 
22 
23 namespace itk
24 {
62 template< typename TPixel, unsigned int VDimension = 2,
63  typename TAllocator = NeighborhoodAllocator< TPixel > >
65  public NeighborhoodOperator< TPixel, VDimension, TAllocator >
66 {
67 public:
68 
71 
74 
75  typedef typename Superclass::PixelType PixelType;
76  typedef typename Superclass::SizeType SizeType;
77 
80  {
81  for ( unsigned i = 0; i < VDimension; ++i )
82  {
83  m_DerivativeScalings[i] = 1.0;
84  }
85  }
87 
89  LaplacianOperator(const Self & other):
90  NeighborhoodOperator< TPixel, VDimension, TAllocator >(other)
91  {
92  for ( unsigned i = 0; i < VDimension; ++i )
93  {
95  }
96  }
98 
100  void CreateOperator();
101 
103  Self & operator=(const Self & other)
104  {
105  Superclass::operator=(other);
106  return *this;
107  }
109 
111  virtual void PrintSelf(std::ostream & os, Indent i) const
112  {
113  os << i << "LaplacianOperator { this=" << this
114  << "}" << std::endl;
116  }
118 
122  void SetDerivativeScalings(const double *s);
123 
124 protected:
128 
131 
134  void Fill(const CoefficientVector &);
135 
136 private:
138  double m_DerivativeScalings[VDimension];
139 };
140 } // namespace itk
141 
142 #ifndef ITK_MANUAL_INSTANTIATION
143 #include "itkLaplacianOperator.hxx"
144 #endif
145 
146 #endif
A NeighborhoodOperator for use in calculating the Laplacian at a pixel.
double m_DerivativeScalings[VDimension]
void Fill(const CoefficientVector &)
Superclass::CoefficientVector CoefficientVector
virtual void PrintSelf(std::ostream &os, Indent i) const
NeighborhoodOperator< TPixel, VDimension, TAllocator > Superclass
virtual void PrintSelf(std::ostream &os, Indent i) const override
CoefficientVector GenerateCoefficients()
Self & operator=(const Self &other)
std::vector< PixelRealType > CoefficientVector
Virtual class that defines a common interface to all neighborhood operator subtypes.
void SetDerivativeScalings(const double *s)
Self & operator=(const Self &orig)
Superclass::SizeType SizeType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
LaplacianOperator(const Self &other)
Superclass::PixelType PixelType
Indent GetNextIndent()