ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
rtkFFTProjectionsConvolutionImageFilter.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 rtkFFTProjectionsConvolutionImageFilter_h
20#define rtkFFTProjectionsConvolutionImageFilter_h
21
22#include <itkConceptChecking.h>
24
25#include "rtkConfiguration.h"
26#include "rtkMacro.h"
27
28namespace rtk
29{
30
43
44template <class TInputImage, class TOutputImage, class TFFTPrecision>
45class ITK_TEMPLATE_EXPORT FFTProjectionsConvolutionImageFilter
46 : public itk::ImageToImageFilter<TInputImage, TOutputImage>
47{
48public:
49 ITK_DISALLOW_COPY_AND_MOVE(FFTProjectionsConvolutionImageFilter);
50
56
58 using InputImageType = TInputImage;
59 using OutputImageType = TOutputImage;
60 using RegionType = typename InputImageType::RegionType;
61 using IndexType = typename InputImageType::IndexType;
62 using SizeType = typename InputImageType::SizeType;
63
65 using FFTInputImagePointer = typename FFTInputImageType::Pointer;
66 using FFTOutputImageType = typename itk::Image<std::complex<TFFTPrecision>, TInputImage::ImageDimension>;
67 using FFTOutputImagePointer = typename FFTOutputImageType::Pointer;
69
71 static constexpr unsigned int ImageDimension = TOutputImage::ImageDimension;
72
74 itkOverrideGetNameOfClassMacro(FFTProjectionsConvolutionImageFilter);
75
89 itkGetConstMacro(GreatestPrimeFactor, int);
91
95 itkGetConstMacro(TruncationCorrection, double);
96 itkSetMacro(TruncationCorrection, double);
97
101 itkGetConstMacro(ZeroPadFactors, ZeroPadFactorsType);
102 virtual void
104 {
105 if (m_ZeroPadFactors != _arg)
106 {
107 m_ZeroPadFactors = _arg;
108 m_ZeroPadFactors[0] = std::max(m_ZeroPadFactors[0], 1);
109 m_ZeroPadFactors[1] = std::max(m_ZeroPadFactors[1], 1);
110 m_ZeroPadFactors[0] = std::min(m_ZeroPadFactors[0], 2);
111 m_ZeroPadFactors[1] = std::min(m_ZeroPadFactors[1], 2);
112 this->Modified();
113 }
114 }
115
117
118protected:
121
122 void
124
125 void
127
128 void
130
131 void
132 ThreadedGenerateData(const RegionType & outputRegionForThread, ThreadIdType threadId) override;
133
139 PadInputImageRegion(const RegionType & inputRegion);
141 GetPaddedImageRegion(const RegionType & inputRegion);
142
143 void
144 PrintSelf(std::ostream & os, itk::Indent indent) const override;
145
146 [[nodiscard]] bool
147 IsPrime(int n) const;
148
149 [[nodiscard]] int
151
154 virtual void
156
162 virtual void
164 typename std::vector<TFFTPrecision> m_TruncationMirrorWeights;
165
169
174
175private:
180 int
182
187
193}; // end of class
194
195} // end namespace rtk
196
197#ifndef ITK_MANUAL_INSTANTIATION
198# include "rtkFFTProjectionsConvolutionImageFilter.hxx"
199#endif
200
201#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
Control indentation during Print() invocation.
Definition itkIndent.h:53
virtual void Modified() const
Implements transparent reference counting.
A templated class holding a n-Dimensional vector.
Definition itkVector.h:63
virtual void UpdateFFTProjectionsConvolutionKernel(SizeType size)=0
RegionType GetPaddedImageRegion(const RegionType &inputRegion)
void PrintSelf(std::ostream &os, itk::Indent indent) const override
~FFTProjectionsConvolutionImageFilter() override=default
typename itk::Image< TFFTPrecision, TInputImage::ImageDimension > FFTInputImageType
void ThreadedGenerateData(const RegionType &outputRegionForThread, ThreadIdType threadId) override
virtual FFTInputImagePointer PadInputImageRegion(const RegionType &inputRegion)
typename itk::Image< std::complex< TFFTPrecision >, TInputImage::ImageDimension > FFTOutputImageType
itk::ImageToImageFilter< TInputImage, TOutputImage > Superclass
#define itkConceptMacro(name, conceptType)
Compile-time check that a template argument satisfies an itk::Concept.
unsigned int ThreadIdType
Definition itkIntTypes.h:98
#define itkSetMacro(name, type)