ITK  6.0.0
Insight Toolkit
itkFFTWHalfHermitianToRealInverseFFTImageFilter.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#ifndef itkFFTWHalfHermitianToRealInverseFFTImageFilter_h
19#define itkFFTWHalfHermitianToRealInverseFFTImageFilter_h
20
22#include "itkFFTWCommon.h"
23
25
26namespace itk
27{
50template <typename TInputImage,
51 typename TOutputImage = Image<typename TInputImage::PixelType::value_type, TInputImage::ImageDimension>>
53 : public HalfHermitianToRealInverseFFTImageFilter<TInputImage, TOutputImage>
54{
55public:
56 ITK_DISALLOW_COPY_AND_MOVE(FFTWHalfHermitianToRealInverseFFTImageFilter);
57
59 using InputImageType = TInputImage;
60 using InputPixelType = typename InputImageType::PixelType;
62 using OutputImageType = TOutputImage;
63 using OutputPixelType = typename OutputImageType::PixelType;
66
71
78
80 itkNewMacro(Self);
81
83 itkOverrideGetNameOfClassMacro(FFTWHalfHermitianToRealInverseFFTImageFilter);
84
86 static constexpr unsigned int ImageDimension = InputImageType::ImageDimension;
87
97 virtual void
98 SetPlanRigor(const int & value)
99 {
100#ifndef ITK_USE_CUFFTW
101 // Use that method to check the value.
103#endif
104 if (m_PlanRigor != value)
105 {
106 m_PlanRigor = value;
107 this->Modified();
108 }
109 }
110 itkGetConstReferenceMacro(PlanRigor, int);
111 void
112 SetPlanRigor(const std::string & name)
113 {
114#ifndef ITK_USE_CUFFTW
115 this->SetPlanRigor(FFTWGlobalConfiguration::GetPlanRigorValue(name));
116#endif
117 }
122
123protected:
126
127 void
128 UpdateOutputData(DataObject * output) override;
129
130 void
132
133 void
134 DynamicThreadedGenerateData(const OutputRegionType & outputRegionForThread) override;
135
136 void
137 PrintSelf(std::ostream & os, Indent indent) const override;
138
139private:
140 bool m_CanUseDestructiveAlgorithm{};
141
142 int m_PlanRigor{};
143};
144
145
146// Describe whether input/output are real- or complex-valued
147// for factory registration
148template <>
150{
151 template <typename TUnderlying>
152 using InputPixelType = std::complex<TUnderlying>;
153 template <typename TUnderlying>
154 using OutputPixelType = TUnderlying;
155 using FilterDimensions = std::integer_sequence<unsigned int, 4, 3, 2, 1>;
156};
157
158} // namespace itk
159
160#ifndef ITK_MANUAL_INSTANTIATION
161# include "itkFFTWHalfHermitianToRealInverseFFTImageFilter.hxx"
162#endif
163
164#endif // itkFFTWHalfHermitianToRealInverseFFTImageFilter_h
Base class for all data objects in ITK.
static int GetPlanRigorValue(const std::string &name)
static std::string GetPlanRigorName(const int value)
SizeValueType GetSizeGreatestPrimeFactor() const override
void UpdateOutputData(DataObject *output) override
void DynamicThreadedGenerateData(const OutputRegionType &outputRegionForThread) override
~FFTWHalfHermitianToRealInverseFFTImageFilter() override=default
void PrintSelf(std::ostream &os, Indent indent) const override
Base class for specialized complex-to-real inverse Fast Fourier Transform.
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType
Definition: itkIntTypes.h:86
Helper defining pixel traits for templated FFT image filters.