ITK  5.4.0
Insight Toolkit
itkBSplineDecompositionImageFilter.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/*=========================================================================
19 *
20 * Portions of this file are subject to the VTK Toolkit Version 3 copyright.
21 *
22 * Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
23 *
24 * For complete copyright, license and disclaimer of warranty information
25 * please refer to the NOTICE file at the top of the ITK source tree.
26 *
27 *=========================================================================*/
28#ifndef itkBSplineDecompositionImageFilter_h
29#define itkBSplineDecompositionImageFilter_h
30
31#include <vector>
32
34#include "vnl/vnl_matrix.h"
35
37
38namespace itk
39{
73template <typename TInputImage, typename TOutputImage>
74class ITK_TEMPLATE_EXPORT BSplineDecompositionImageFilter : public ImageToImageFilter<TInputImage, TOutputImage>
75{
76public:
77 ITK_DISALLOW_COPY_AND_MOVE(BSplineDecompositionImageFilter);
78
84
86 itkOverrideGetNameOfClassMacro(BSplineDecompositionImageFilter);
87
89 itkNewMacro(Self);
90
92 using typename Superclass::InputImageType;
93 using typename Superclass::InputImagePointer;
94 using typename Superclass::InputImageConstPointer;
95 using typename Superclass::OutputImagePointer;
96
98
100 static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
101 static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
102
105
106 using SplinePolesVectorType = std::vector<double>;
107
110 void
111 SetSplineOrder(unsigned int SplineOrder);
112
113 itkGetConstMacro(SplineOrder, unsigned int);
114
116 itkGetConstMacro(SplinePoles, SplinePolesVectorType);
117
119 itkGetConstMacro(NumberOfPoles, unsigned int);
120
121
122#ifdef ITK_USE_CONCEPT_CHECKING
123 // Begin concept checking
125 itkConceptMacro(InputConvertibleToOutputCheck,
128 // End concept checking
129#endif
130
131protected:
134 void
135 PrintSelf(std::ostream & os, Indent indent) const override;
136
137 void
138 GenerateData() override;
139
141 void
143
145 void
147
148private:
149 using CoefficientsVectorType = std::vector<CoeffType>;
150
152 virtual void
154
156 virtual bool
158
161 void
163
165 virtual void
167
170 virtual void
172
175 void
177
180 void
182
185 void
187
188 // Variables needed by the smoothing spline routine.
189
192
194 typename TInputImage::SizeType m_DataLength{};
195
197 unsigned int m_SplineOrder{ 0 };
198
199 SplinePolesVectorType m_SplinePoles{};
200
201 unsigned int m_NumberOfPoles{};
202
204 double m_Tolerance{ 1e-10 };
205
207 unsigned int m_IteratorDirection{ 0 };
208};
209} // namespace itk
210
211#ifndef ITK_MANUAL_INSTANTIATION
212# include "itkBSplineDecompositionImageFilter.hxx"
213#endif
214
215#endif
Calculates the B-Spline coefficients of an image. Spline order may be from 0 to 5.
virtual void SetInitialAntiCausalCoefficient(double z)
void CopyScratchToCoefficients(OutputLinearIterator &)
virtual void SetInitialCausalCoefficient(double z)
void PrintSelf(std::ostream &os, Indent indent) const override
void EnlargeOutputRequestedRegion(DataObject *output) override
typename itk::NumericTraits< typename TOutputImage::PixelType >::RealType CoeffType
~BSplineDecompositionImageFilter() override=default
void GenerateInputRequestedRegion() override
void CopyCoefficientsToScratch(OutputLinearIterator &)
void SetSplineOrder(unsigned int SplineOrder)
Base class for all data objects in ITK.
A multi-dimensional image iterator that visits image pixels within a region in a "scan-line" order.
Base class for all process objects that output image data.
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
Definition: itkIndent.h:50
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
#define itkConceptMacro(name, concept)
static constexpr double e
Definition: itkMath.h:56
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....