ITK  5.2.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  * 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 itkFFTWHalfHermitianToRealInverseFFTImageFilter_h
21 # define itkFFTWHalfHermitianToRealInverseFFTImageFilter_h
22 
23 # include "itkFFTWCommon.h"
24 
25 namespace itk
26 {
49 template <typename TInputImage,
50  typename TOutputImage = Image<typename TInputImage::PixelType::value_type, TInputImage::ImageDimension>>
52  : public HalfHermitianToRealInverseFFTImageFilter<TInputImage, TOutputImage>
53 {
54 public:
55  ITK_DISALLOW_COPY_AND_MOVE(FFTWHalfHermitianToRealInverseFFTImageFilter);
56 
58  using InputImageType = TInputImage;
59  using InputPixelType = typename InputImageType::PixelType;
61  using OutputImageType = TOutputImage;
62  using OutputPixelType = typename OutputImageType::PixelType;
65 
70 
77 
79  itkNewMacro(Self);
80 
83 
85  static constexpr unsigned int ImageDimension = InputImageType::ImageDimension;
86 
96  virtual void
97  SetPlanRigor(const int & value)
98  {
99 # ifndef ITK_USE_CUFFTW
100  // Use that method to check the value.
102 # endif
103  if (m_PlanRigor != value)
104  {
105  m_PlanRigor = value;
106  this->Modified();
107  }
108  }
109  itkGetConstReferenceMacro(PlanRigor, int);
110  void
111  SetPlanRigor(const std::string & name)
112  {
113 # ifndef ITK_USE_CUFFTW
114  this->SetPlanRigor(FFTWGlobalConfiguration::GetPlanRigorValue(name));
115 # endif
116  }
118 
120  GetSizeGreatestPrimeFactor() const override;
121 
122 protected:
124  ~FFTWHalfHermitianToRealInverseFFTImageFilter() override = default;
125 
126  void
127  UpdateOutputData(DataObject * output) override;
128 
129  void
130  BeforeThreadedGenerateData() override;
131 
132  void
133  DynamicThreadedGenerateData(const OutputRegionType & outputRegionForThread) override;
134 
135  void
136  PrintSelf(std::ostream & os, Indent indent) const override;
137 
138 private:
140 
142 };
143 
144 
145 } // namespace itk
146 
147 # ifndef ITK_MANUAL_INSTANTIATION
148 # include "itkFFTWHalfHermitianToRealInverseFFTImageFilter.hxx"
149 # endif
150 
151 #endif // itkFFTWHalfHermitianToRealInverseFFTImageFilter_h
itk::FFTWHalfHermitianToRealInverseFFTImageFilter::m_CanUseDestructiveAlgorithm
bool m_CanUseDestructiveAlgorithm
Definition: itkFFTWHalfHermitianToRealInverseFFTImageFilter.h:139
itk::FFTWHalfHermitianToRealInverseFFTImageFilter::OutputRegionType
typename OutputImageType::RegionType OutputRegionType
Definition: itkFFTWHalfHermitianToRealInverseFFTImageFilter.h:63
itk::FFTWHalfHermitianToRealInverseFFTImageFilter
FFTW-based reverse Fast Fourier Transform.
Definition: itkFFTWHalfHermitianToRealInverseFFTImageFilter.h:51
itk::FFTWHalfHermitianToRealInverseFFTImageFilter::InputSizeType
typename InputImageType::SizeType InputSizeType
Definition: itkFFTWHalfHermitianToRealInverseFFTImageFilter.h:60
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::FFTWHalfHermitianToRealInverseFFTImageFilter::OutputPixelType
typename OutputImageType::PixelType OutputPixelType
Definition: itkFFTWHalfHermitianToRealInverseFFTImageFilter.h:62
itk::FFTWGlobalConfiguration::GetPlanRigorName
static std::string GetPlanRigorName(const int &value)
itk::FFTWHalfHermitianToRealInverseFFTImageFilter::FFTWProxyType
typename fftw::Proxy< OutputPixelType > FFTWProxyType
Definition: itkFFTWHalfHermitianToRealInverseFFTImageFilter.h:76
itk::FFTWHalfHermitianToRealInverseFFTImageFilter::OutputSizeType
typename OutputImageType::SizeType OutputSizeType
Definition: itkFFTWHalfHermitianToRealInverseFFTImageFilter.h:64
itk::ImageSource
Base class for all process objects that output image data.
Definition: itkImageSource.h:67
itk::FFTWHalfHermitianToRealInverseFFTImageFilter::m_PlanRigor
int m_PlanRigor
Definition: itkFFTWHalfHermitianToRealInverseFFTImageFilter.h:141
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::FFTWHalfHermitianToRealInverseFFTImageFilter::SetPlanRigor
void SetPlanRigor(const std::string &name)
Definition: itkFFTWHalfHermitianToRealInverseFFTImageFilter.h:111
itk::FFTWHalfHermitianToRealInverseFFTImageFilter::SetPlanRigor
virtual void SetPlanRigor(const int &value)
Definition: itkFFTWHalfHermitianToRealInverseFFTImageFilter.h:97
itk::FFTWGlobalConfiguration::GetPlanRigorValue
static int GetPlanRigorValue(const std::string &name)
itk::ImageToImageFilter::InputImageType
TInputImage InputImageType
Definition: itkImageToImageFilter.h:129
itkHalfHermitianToRealInverseFFTImageFilter.h
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::FFTWHalfHermitianToRealInverseFFTImageFilter::InputPixelType
typename InputImageType::PixelType InputPixelType
Definition: itkFFTWHalfHermitianToRealInverseFFTImageFilter.h:59
itk::HalfHermitianToRealInverseFFTImageFilter
Base class for specialized complex-to-real inverse Fast Fourier Transform.
Definition: itkHalfHermitianToRealInverseFFTImageFilter.h:56
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
itk::DataObject
Base class for all data objects in ITK.
Definition: itkDataObject.h:293