ITK  5.2.0
Insight Toolkit
itkLaplacianOperator.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
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 {
66 template <typename TPixel, unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
67 class ITK_TEMPLATE_EXPORT LaplacianOperator : public NeighborhoodOperator<TPixel, VDimension, TAllocator>
68 {
69 public:
70 
73 
76 
77  using PixelType = typename Superclass::PixelType;
78  using SizeType = typename Superclass::SizeType;
79 
82  {
83  for (unsigned i = 0; i < VDimension; ++i)
84  {
85  m_DerivativeScalings[i] = 1.0;
86  }
87  }
89 
91  void
92  CreateOperator();
93 
95  void
96  PrintSelf(std::ostream & os, Indent i) const override
97  {
98  os << i << "LaplacianOperator { this=" << this << "}" << std::endl;
99  Superclass::PrintSelf(os, i.GetNextIndent());
100  }
102 
106  void
107  SetDerivativeScalings(const double * s);
108 
109 protected:
113 
116  GenerateCoefficients() override;
117 
120  void
121  Fill(const CoefficientVector &) override;
122 
123 private:
125  double m_DerivativeScalings[VDimension];
126 };
127 } // namespace itk
128 
129 #ifndef ITK_MANUAL_INSTANTIATION
130 # include "itkLaplacianOperator.hxx"
131 #endif
132 
133 #endif
itk::LaplacianOperator::PrintSelf
void PrintSelf(std::ostream &os, Indent i) const override
Definition: itkLaplacianOperator.h:96
itk::Indent::GetNextIndent
Indent GetNextIndent() const
itk::NeighborhoodOperator::PixelType
TPixel PixelType
Definition: itkNeighborhoodOperator.h:85
itk::NeighborhoodOperator
Virtual class that defines a common interface to all neighborhood operator subtypes.
Definition: itkNeighborhoodOperator.h:72
itkNeighborhoodOperator.h
itk::GTest::TypedefsAndConstructors::Dimension2::SizeType
ImageBaseType::SizeType SizeType
Definition: itkGTestTypedefsAndConstructors.h:49
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::LaplacianOperator::PixelType
typename Superclass::PixelType PixelType
Definition: itkLaplacianOperator.h:77
itk::LaplacianOperator::SizeType
typename Superclass::SizeType SizeType
Definition: itkLaplacianOperator.h:78
itk::LaplacianOperator::CoefficientVector
typename Superclass::CoefficientVector CoefficientVector
Definition: itkLaplacianOperator.h:112
itk::LaplacianOperator::LaplacianOperator
LaplacianOperator()
Definition: itkLaplacianOperator.h:81
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::NeighborhoodOperator::CoefficientVector
std::vector< PixelRealType > CoefficientVector
Definition: itkNeighborhoodOperator.h:148
itk::LaplacianOperator
A NeighborhoodOperator for use in calculating the Laplacian at a pixel.
Definition: itkLaplacianOperator.h:67