go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkMultiOrderBSplineDecompositionImageFilter.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright UMC Utrecht and contributors
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 * http://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 Program: Insight Segmentation & Registration Toolkit
21 Module: $RCSfile: itkMultiOrderBSplineDecompositionImageFilter.h,v $
22 Date: $Date: 2010-03-19 07:06:01 $
23 Version: $Revision: 1.12 $
24
25 Copyright (c) Insight Software Consortium. All rights reserved.
26 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
27
28 Portions of this code are covered under the VTK copyright.
29 See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm for details.
30
31 This software is distributed WITHOUT ANY WARRANTY; without even
32 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
33 PURPOSE. See the above copyright notices for more information.
34
35=========================================================================*/
36#ifndef itkMultiOrderBSplineDecompositionImageFilter_h
37#define itkMultiOrderBSplineDecompositionImageFilter_h
38
39#include <vector>
40
41#include "itkImageLinearIteratorWithIndex.h"
42#include <vnl/vnl_matrix.h>
43
44#include "itkImageToImageFilter.h"
45
46namespace itk
47{
80template <class TInputImage, class TOutputImage>
82 : public ImageToImageFilter<TInputImage, TOutputImage>
83{
84public:
86
89 using Superclass = ImageToImageFilter<TInputImage, TOutputImage>;
90 using Pointer = SmartPointer<Self>;
91 using ConstPointer = SmartPointer<const Self>;
92
94 itkTypeMacro(MultiOrderBSplineDecompositionImageFilter, ImageToImageFilter);
95
97 itkNewMacro(Self);
98
100 using typename Superclass::InputImageType;
101 using typename Superclass::InputImagePointer;
102 using typename Superclass::InputImageConstPointer;
103 using typename Superclass::OutputImagePointer;
104
105 using CoeffType = typename itk::NumericTraits<typename TOutputImage::PixelType>::RealType;
106
108 itkStaticConstMacro(ImageDimension, unsigned int, TInputImage::ImageDimension);
109 itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension);
110
112 using OutputLinearIterator = ImageLinearIteratorWithIndex<TOutputImage>;
113
116 void
117 SetSplineOrder(unsigned int order);
118
119 void
120 SetSplineOrder(unsigned int dimension, unsigned int order);
121
122 void
123 GetSplineOrder(unsigned int dimension)
124 {
125 return m_SplineOrder[dimension];
126 }
127
128
129#ifdef ITK_USE_CONCEPT_CHECKING
131 itkConceptMacro(DimensionCheck, (Concept::SameDimension<ImageDimension, OutputImageDimension>));
132 itkConceptMacro(InputConvertibleToOutputCheck,
133 (Concept::Convertible<typename TInputImage::PixelType, typename TOutputImage::PixelType>));
134 itkConceptMacro(DoubleConvertibleToOutputCheck, (Concept::Convertible<double, typename TOutputImage::PixelType>));
136#endif
137
138protected:
141 void
142 PrintSelf(std::ostream & os, Indent indent) const override;
143
144 void
145 GenerateData() override;
146
148 void
150
152 void
153 EnlargeOutputRequestedRegion(DataObject * output) override;
154
156 std::vector<CoeffType> m_Scratch{}; // temp storage for processing of Coefficients
157 typename TInputImage::SizeType m_DataLength{}; // Image size
158
159 unsigned int
160 m_SplineOrder[ImageDimension]{}; // User specified spline order per dimension (3rd or cubic is the default)
161 double m_SplinePoles[3]{}; // Poles calculated for a given spline order
162 int m_NumberOfPoles{}; // number of poles
163 double m_Tolerance{}; // Tolerance used for determining initial causal coefficient
164 unsigned int m_IteratorDirection{}; // Direction for iterator incrementing
165
166private:
168 virtual void
169 SetPoles(unsigned int dimension);
170
172 virtual bool
174
177 void
179
181 virtual void
183
185 virtual void
187
189 void
191
193 void
195
197 void
199};
200
201} // namespace itk
202
203#ifndef ITK_MANUAL_INSTANTIATION
204# include "itkMultiOrderBSplineDecompositionImageFilter.hxx"
205#endif
206
207#endif
Calculates the B-Spline coefficients of an image. Spline order may be per dimension from 0 to 5 per.
itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension)
typename itk::NumericTraits< typename TOutputImage::PixelType >::RealType CoeffType
virtual void SetPoles(unsigned int dimension)
virtual void SetInitialAntiCausalCoefficient(double z)
void CopyScratchToCoefficients(OutputLinearIterator &)
~MultiOrderBSplineDecompositionImageFilter() override=default
virtual void SetInitialCausalCoefficient(double z)
void SetSplineOrder(unsigned int dimension, unsigned int order)
void CopyCoefficientsToScratch(OutputLinearIterator &)
void PrintSelf(std::ostream &os, Indent indent) const override
void EnlargeOutputRequestedRegion(DataObject *output) override
itkStaticConstMacro(ImageDimension, unsigned int, TInputImage::ImageDimension)
ITK_DISALLOW_COPY_AND_MOVE(MultiOrderBSplineDecompositionImageFilter)


Generated on 2024-07-17 for elastix by doxygen 1.11.0 (9b424b03c9833626cd435af22a444888fbbb192d) elastix logo