ITK  6.0.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 * https://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
23namespace itk
24{
66template <typename TPixel, unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
67class ITK_TEMPLATE_EXPORT LaplacianOperator : public NeighborhoodOperator<TPixel, VDimension, TAllocator>
68{
69public:
70
74
76 itkOverrideGetNameOfClassMacro(LaplacianOperator);
77
78 using typename Superclass::SizeType;
79
81 {
82 for (unsigned int i = 0; i < VDimension; ++i)
83 {
84 m_DerivativeScalings[i] = 1.0;
85 }
86 }
87
89 void
91
92 void
93 PrintSelf(std::ostream & os, Indent indent) const override
94 {
95 Superclass::PrintSelf(os, indent);
96
97 os << indent << "DerivativeScalings: " << m_DerivativeScalings << std::endl;
98 }
99
103 void
104 SetDerivativeScalings(const double * s);
105 itkGetConstMacro(DerivativeScalings, const double *);
108protected:
110 using typename Superclass::CoefficientVector;
111
115
118 void
119 Fill(const CoefficientVector &) override;
120
121private:
123 double m_DerivativeScalings[VDimension]{};
124};
125} // namespace itk
126
127#ifndef ITK_MANUAL_INSTANTIATION
128# include "itkLaplacianOperator.hxx"
129#endif
130
131#endif
Control indentation during Print() invocation.
Definition: itkIndent.h:50
A NeighborhoodOperator for use in calculating the Laplacian at a pixel.
void SetDerivativeScalings(const double *s)
void PrintSelf(std::ostream &os, Indent indent) const override
CoefficientVector GenerateCoefficients() override
void Fill(const CoefficientVector &) override
typename std::vector< PixelRealType > CoefficientVector
Virtual class that defines a common interface to all neighborhood operator subtypes.
typename std::vector< PixelRealType > CoefficientVector
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....