ITK  5.3.0
Insight Toolkit
itkFFTWInverseFFTImageFilter.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 itkFFTWInverseFFTImageFilter_h
21 # define itkFFTWInverseFFTImageFilter_h
22 
23 # include "itkFFTWCommon.h"
24 
25 namespace itk
26 {
48 template <typename TInputImage,
49  typename TOutputImage = Image<typename TInputImage::PixelType::value_type, TInputImage::ImageDimension>>
50 class ITK_TEMPLATE_EXPORT FFTWInverseFFTImageFilter : public InverseFFTImageFilter<TInputImage, TOutputImage>
51 {
52 public:
53  ITK_DISALLOW_COPY_AND_MOVE(FFTWInverseFFTImageFilter);
54 
56  using InputImageType = TInputImage;
57  using InputPixelType = typename InputImageType::PixelType;
59  using OutputImageType = TOutputImage;
60  using OutputPixelType = typename OutputImageType::PixelType;
62 
67 
74 
76 
78  itkNewMacro(Self);
79 
82 
84  static constexpr unsigned int ImageDimension = InputImageType::ImageDimension;
85 
95  virtual void
96  SetPlanRigor(const int & value)
97  {
98 # ifndef ITK_USE_CUFFTW
99  // Use that method to check the value.
101 # endif
102  if (m_PlanRigor != value)
103  {
104  m_PlanRigor = value;
105  this->Modified();
106  }
107  }
108  itkGetConstReferenceMacro(PlanRigor, int);
109  void
110  SetPlanRigor(const std::string & name)
111  {
112 # ifndef ITK_USE_CUFFTW
113  this->SetPlanRigor(FFTWGlobalConfiguration::GetPlanRigorValue(name));
114 # endif
115  }
117 
119  GetSizeGreatestPrimeFactor() const override;
120 
121 protected:
123  ~FFTWInverseFFTImageFilter() override = default;
124 
125  void
126  BeforeThreadedGenerateData() override;
127 
128  void
129  DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
130 
131  void
132  PrintSelf(std::ostream & os, Indent indent) const override;
133 
134 private:
136 };
137 
138 
139 } // namespace itk
140 
141 # ifndef ITK_MANUAL_INSTANTIATION
142 # include "itkFFTWInverseFFTImageFilter.hxx"
143 # endif
144 
145 #endif // itkFFTWInverseFFTImageFilter_h
itk::FFTWInverseFFTImageFilter::SetPlanRigor
void SetPlanRigor(const std::string &name)
Definition: itkFFTWInverseFFTImageFilter.h:110
itkInverseFFTImageFilter.h
itk::FFTWInverseFFTImageFilter::OutputPixelType
typename OutputImageType::PixelType OutputPixelType
Definition: itkFFTWInverseFFTImageFilter.h:60
itk::GTest::TypedefsAndConstructors::Dimension2::SizeType
ImageBaseType::SizeType SizeType
Definition: itkGTestTypedefsAndConstructors.h:49
itk::FFTWInverseFFTImageFilter::InputPixelType
typename InputImageType::PixelType InputPixelType
Definition: itkFFTWInverseFFTImageFilter.h:57
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::FFTWGlobalConfiguration::GetPlanRigorName
static std::string GetPlanRigorName(const int &value)
itk::ImageSource
Base class for all process objects that output image data.
Definition: itkImageSource.h:67
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::FFTWGlobalConfiguration::GetPlanRigorValue
static int GetPlanRigorValue(const std::string &name)
itk::InverseFFTImageFilter
Base class for inverse Fast Fourier Transform.
Definition: itkInverseFFTImageFilter.h:50
itk::ImageToImageFilter::InputImageType
TInputImage InputImageType
Definition: itkImageToImageFilter.h:129
itk::FFTWInverseFFTImageFilter::FFTWProxyType
typename fftw::Proxy< OutputPixelType > FFTWProxyType
Definition: itkFFTWInverseFFTImageFilter.h:73
itk::FFTWInverseFFTImageFilter::OutputSizeType
typename OutputImageType::SizeType OutputSizeType
Definition: itkFFTWInverseFFTImageFilter.h:61
itk::ImageSource::OutputImageRegionType
typename OutputImageType::RegionType OutputImageRegionType
Definition: itkImageSource.h:92
itkFFTWCommon.h
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:138
itk::FFTWInverseFFTImageFilter::m_PlanRigor
int m_PlanRigor
Definition: itkFFTWInverseFFTImageFilter.h:135
itk::FFTWInverseFFTImageFilter
FFTW-based inverse Fast Fourier Transform.
Definition: itkFFTWInverseFFTImageFilter.h:50
itk::FFTWInverseFFTImageFilter::SetPlanRigor
virtual void SetPlanRigor(const int &value)
Definition: itkFFTWInverseFFTImageFilter.h:96
itk::FFTWInverseFFTImageFilter::InputSizeType
typename InputImageType::SizeType InputSizeType
Definition: itkFFTWInverseFFTImageFilter.h:58
itk::fftw::Proxy
Definition: itkFFTWCommon.h:54
itk::SizeValueType
unsigned long SizeValueType
Definition: itkIntTypes.h:83
itk::ImageSource::OutputImageType
TOutputImage OutputImageType
Definition: itkImageSource.h:90