ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
rtkAddMatrixAndDiagonalImageFilter.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#ifndef rtkAddMatrixAndDiagonalImageFilter_h
19#define rtkAddMatrixAndDiagonalImageFilter_h
20
22#include "rtkMacro.h"
23
24namespace rtk
25{
40template <class TDiagonal,
41 class TMatrix = itk::Image<itk::Vector<typename TDiagonal::PixelType::ValueType,
42 TDiagonal::PixelType::Dimension * TDiagonal::PixelType::Dimension>,
43 TDiagonal::ImageDimension>>
44class ITK_TEMPLATE_EXPORT AddMatrixAndDiagonalImageFilter : public itk::ImageToImageFilter<TMatrix, TMatrix>
45{
46public:
47 ITK_DISALLOW_COPY_AND_MOVE(AddMatrixAndDiagonalImageFilter);
48
53
55 itkNewMacro(Self);
56
58 itkOverrideGetNameOfClassMacro(AddMatrixAndDiagonalImageFilter);
59
61 static constexpr unsigned int nChannels = TDiagonal::PixelType::Dimension;
62
64 using dataType = typename TDiagonal::PixelType::ValueType;
65
67 void
68 SetInputDiagonal(const TDiagonal * gradient);
69 void
70 SetInputMatrix(const TMatrix * hessian);
71
72protected:
75
76 void
78
80 void
81 DynamicThreadedGenerateData(const typename TDiagonal::RegionType & outputRegionForThread) override;
82
84 typename TDiagonal::ConstPointer
86 typename TMatrix::ConstPointer
88};
89} // namespace rtk
90
91
92#ifndef ITK_MANUAL_INSTANTIATION
93# include "rtkAddMatrixAndDiagonalImageFilter.hxx"
94#endif
95
96#endif
Base class for filters that take an image as input and produce an image as output.
Templated n-dimensional image class.
Definition itkImage.h:89
Implements transparent reference counting.
A templated class holding a n-Dimensional vector.
Definition itkVector.h:63
void DynamicThreadedGenerateData(const typename TDiagonal::RegionType &outputRegionForThread) override
typename TDiagonal::PixelType::ValueType dataType
void SetInputMatrix(const TMatrix *hessian)
TMatrix::ConstPointer GetInputMatrix()
void SetInputDiagonal(const TDiagonal *gradient)
~AddMatrixAndDiagonalImageFilter() override=default
itk::ImageToImageFilter< TMatrix, TMatrix > Superclass
TDiagonal::ConstPointer GetInputDiagonal()
void GenerateInputRequestedRegion() override