RTK  2.7.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>
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  using GradientImageType =
54  typename TOutputImage::template RebindImageType<VectorPixelType, TOutputImage::ImageDimension>;
56  typename TOutputImage::ValueType,
57  typename TOutputImage::ValueType,
61 
63  itkNewMacro(Self);
64 
66  itkOverrideGetNameOfClassMacro(LaplacianImageFilter);
67 
68  void
69  SetWeights(const TOutputImage * weights);
70  typename TOutputImage::ConstPointer
71  GetWeights();
72 
73 protected:
75  ~LaplacianImageFilter() override = default;
76 
78  void
79  GenerateData() override;
80 
82  void
83  GenerateOutputInformation() override;
84 
88 };
89 } // namespace rtk
90 
91 
92 #ifndef ITK_MANUAL_INSTANTIATION
93 # include "rtkLaplacianImageFilter.hxx"
94 #endif
95 
96 #endif
typename TOutputImage::template RebindImageType< VectorPixelType, TOutputImage::ImageDimension > GradientImageType
MultiplyImageFilterType::Pointer m_Multiply
Computes the gradient of an image using forward difference.
typename TOutputImage::Pointer OutputImagePointer
DivergenceFilterType::Pointer m_Divergence
Computes the backward differences divergence (adjoint of the forward differences gradient) of the inp...
GradientFilterType::Pointer m_Gradient