RTK  2.6.0
Reconstruction Toolkit
rtkLaplacianImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright RTK 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  * 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 
19 #ifndef rtkLaplacianImageFilter_h
20 #define rtkLaplacianImageFilter_h
21 
24 #include "itkMultiplyImageFilter.h"
25 
26 namespace rtk
27 {
28 
41 template <typename TOutputImage, typename TGradientImage>
42 class ITK_TEMPLATE_EXPORT LaplacianImageFilter : public itk::ImageToImageFilter<TOutputImage, TOutputImage>
43 {
44 public:
45  ITK_DISALLOW_COPY_AND_MOVE(LaplacianImageFilter);
46 
51  using OutputImagePointer = typename TOutputImage::Pointer;
53  typename TOutputImage::ValueType,
54  typename TOutputImage::ValueType,
55  TGradientImage>;
58 
60  itkNewMacro(Self);
61 
63 #ifdef itkOverrideGetNameOfClassMacro
64  itkOverrideGetNameOfClassMacro(LaplacianImageFilter);
65 #else
67 #endif
68 
69 
70  void
71  SetWeights(const TOutputImage * weights);
72  typename TOutputImage::ConstPointer
73  GetWeights();
74 
75 protected:
77  ~LaplacianImageFilter() override = default;
78 
80  void
81  GenerateData() override;
82 
84  void
85  GenerateOutputInformation() override;
86 
90 };
91 } // namespace rtk
92 
93 
94 #ifndef ITK_MANUAL_INSTANTIATION
95 # include "rtkLaplacianImageFilter.hxx"
96 #endif
97 
98 #endif
typename OutputImageType::Pointer OutputImagePointer
Computes the gradient of an image using forward difference.
DivergenceFilterType::Pointer m_Divergence
GradientFilterType::Pointer m_Gradient
MultiplyImageFilterType::Pointer m_Multiply
Computes the backward differences divergence (adjoint of the forward differences gradient) of the inp...