ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkFFTWComplexToComplexFFTImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software 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  * 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:
60  public ComplexToComplexFFTImageFilter< TImage >
61 {
62 public:
63  ITK_DISALLOW_COPY_AND_ASSIGN(FFTWComplexToComplexFFTImageFilter);
64 
70 
71  using ImageType = TImage;
72  using PixelType = typename ImageType::PixelType;
73  using InputImageType = typename Superclass::InputImageType;
74  using OutputImageType = typename Superclass::OutputImageType;
76 
77  // the proxy type is a wrapper for the fftw API
78  // since the proxy is only defined over double and float,
79  // trying to use any other pixel type is inoperative, as
80  // is trying to use double if only the float FFTW version is
81  // configured in, or float if only double is configured.
82  //
84 
86  itkNewMacro(Self);
87 
91 
92  static constexpr unsigned int ImageDimension = ImageType::ImageDimension;
93 
96 
108  virtual void SetPlanRigor( const int & value )
109  {
110 #ifndef ITK_USE_CUFFTW
111  // use that method to check the value
113 #endif
114  if( m_PlanRigor != value )
115  {
116  m_PlanRigor = value;
117  this->Modified();
118  }
119  }
120  itkGetConstReferenceMacro( PlanRigor, int );
121  void SetPlanRigor( const std::string & name )
122  {
123 #ifndef ITK_USE_CUFFTW
124  this->SetPlanRigor( FFTWGlobalConfiguration::GetPlanRigorValue( name ) );
125 #endif
126  }
128 
129 protected:
132 
133  void UpdateOutputData(DataObject *output) override;
134 
135  void BeforeThreadedGenerateData() override;
136 
137  void DynamicThreadedGenerateData(const OutputImageRegionType& outputRegionForThread) override;
138 
139  void PrintSelf(std::ostream & os, Indent indent) const override;
140 
141 private:
143 
145 
146 };
147 
148 
149 } // namespace itk
150 
151 #ifndef ITK_MANUAL_INSTANTIATION
152 #include "itkFFTWComplexToComplexFFTImageFilter.hxx"
153 #endif
154 
155 #endif //itkFFTWComplexToComplexFFTImageFilter_h
Light weight base class for most itk classes.
static std::string GetPlanRigorName(const int &value)
typename fftw::Proxy< typename PixelType::value_type > FFTWProxyType
Implements an API to enable the Fourier transform or the inverse Fourier transform of images with com...
Implements an API to enable the Fourier transform or the inverse Fourier transform of images with com...
typename OutputImageType::RegionType OutputImageRegionType
static int GetPlanRigorValue(const std::string &name)
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Base class for all data objects in ITK.