ITK  5.2.0
Insight Toolkit
itkFFTWComplexToComplexFFTImageFilter.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  * 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  *=========================================================================*/
19 
20 #ifndef itkFFTWComplexToComplexFFTImageFilter_h
21 # define itkFFTWComplexToComplexFFTImageFilter_h
22 
23 # include "itkFFTWCommon.h"
24 
25 
26 namespace itk
27 {
58 template <typename TImage>
59 class ITK_TEMPLATE_EXPORT FFTWComplexToComplexFFTImageFilter : public ComplexToComplexFFTImageFilter<TImage>
60 {
61 public:
62  ITK_DISALLOW_COPY_AND_MOVE(FFTWComplexToComplexFFTImageFilter);
63 
69 
70  using ImageType = TImage;
71  using PixelType = typename ImageType::PixelType;
72  using InputImageType = typename Superclass::InputImageType;
73  using OutputImageType = typename Superclass::OutputImageType;
75 
76  // the proxy type is a wrapper for the fftw API
77  // since the proxy is only defined over double and float,
78  // trying to use any other pixel type is inoperative, as
79  // is trying to use double if only the float FFTW version is
80  // configured in, or float if only double is configured.
81  //
83 
85  itkNewMacro(Self);
86 
89 
90  static constexpr unsigned int ImageDimension = ImageType::ImageDimension;
91 
94 
106  virtual void
107  SetPlanRigor(const int & value)
108  {
109 # ifndef ITK_USE_CUFFTW
110  // use that method to check the value
112 # endif
113  if (m_PlanRigor != value)
114  {
115  m_PlanRigor = value;
116  this->Modified();
117  }
118  }
119  itkGetConstReferenceMacro(PlanRigor, int);
120  void
121  SetPlanRigor(const std::string & name)
122  {
123 # ifndef ITK_USE_CUFFTW
124  this->SetPlanRigor(FFTWGlobalConfiguration::GetPlanRigorValue(name));
125 # endif
126  }
128 
129 protected:
131  ~FFTWComplexToComplexFFTImageFilter() override = default;
132 
133  void
134  UpdateOutputData(DataObject * output) override;
135 
136  void
137  BeforeThreadedGenerateData() override;
138 
139  void
140  DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
141 
142  void
143  PrintSelf(std::ostream & os, Indent indent) const override;
144 
145 private:
147 
149 };
150 
151 
152 } // namespace itk
153 
154 # ifndef ITK_MANUAL_INSTANTIATION
155 # include "itkFFTWComplexToComplexFFTImageFilter.hxx"
156 # endif
157 
158 #endif // itkFFTWComplexToComplexFFTImageFilter_h
itk::FFTWComplexToComplexFFTImageFilter::m_CanUseDestructiveAlgorithm
bool m_CanUseDestructiveAlgorithm
Definition: itkFFTWComplexToComplexFFTImageFilter.h:146
itk::FFTWComplexToComplexFFTImageFilter::SetPlanRigor
virtual void SetPlanRigor(const int &value)
Definition: itkFFTWComplexToComplexFFTImageFilter.h:107
itk::ComplexToComplexFFTImageFilter::ImageSizeType
typename ImageType::SizeType ImageSizeType
Definition: itkComplexToComplexFFTImageFilter.h:113
itk::FFTWComplexToComplexFFTImageFilter::FFTWProxyType
typename fftw::Proxy< typename PixelType::value_type > FFTWProxyType
Definition: itkFFTWComplexToComplexFFTImageFilter.h:82
itk::GTest::TypedefsAndConstructors::Dimension2::SizeType
ImageBaseType::SizeType SizeType
Definition: itkGTestTypedefsAndConstructors.h:49
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::ComplexToComplexFFTImageFilter
Implements an API to enable the Fourier transform or the inverse Fourier transform of images with com...
Definition: itkComplexToComplexFFTImageFilter.h:76
itk::FFTWGlobalConfiguration::GetPlanRigorName
static std::string GetPlanRigorName(const int &value)
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::FFTWComplexToComplexFFTImageFilter::SetPlanRigor
void SetPlanRigor(const std::string &name)
Definition: itkFFTWComplexToComplexFFTImageFilter.h:121
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::FFTWGlobalConfiguration::GetPlanRigorValue
static int GetPlanRigorValue(const std::string &name)
itk::FFTWComplexToComplexFFTImageFilter
Implements an API to enable the Fourier transform or the inverse Fourier transform of images with com...
Definition: itkFFTWComplexToComplexFFTImageFilter.h:59
itkFFTWCommon.h
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::ComplexToComplexFFTImageFilter::ImageType
TImage ImageType
Definition: itkComplexToComplexFFTImageFilter.h:82
itkComplexToComplexFFTImageFilter.h
itk::FFTWComplexToComplexFFTImageFilter::PixelType
typename ImageType::PixelType PixelType
Definition: itkFFTWComplexToComplexFFTImageFilter.h:71
itk::ComplexToComplexFFTImageFilter::InputImageType
TImage InputImageType
Definition: itkComplexToComplexFFTImageFilter.h:83
itk::ComplexToComplexFFTImageFilter::OutputImageType
TImage OutputImageType
Definition: itkComplexToComplexFFTImageFilter.h:84
itk::FFTWComplexToComplexFFTImageFilter::m_PlanRigor
int m_PlanRigor
Definition: itkFFTWComplexToComplexFFTImageFilter.h:148
itk::FFTWComplexToComplexFFTImageFilter::OutputImageRegionType
typename OutputImageType::RegionType OutputImageRegionType
Definition: itkFFTWComplexToComplexFFTImageFilter.h:74
itk::fftw::Proxy
Definition: itkFFTWCommon.h:54
itk::DataObject
Base class for all data objects in ITK.
Definition: itkDataObject.h:293