ITK  4.13.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  *=========================================================================*/
18 #ifndef itkFFTWComplexToComplexFFTImageFilter_h
19 #define itkFFTWComplexToComplexFFTImageFilter_h
20 
22 #include "itkFFTWCommon.h"
23 
24 
25 namespace itk
26 {
57 template< typename TImage >
58 class ITK_TEMPLATE_EXPORT FFTWComplexToComplexFFTImageFilter:
59  public ComplexToComplexFFTImageFilter< TImage >
60 {
61 public:
67 
68  typedef TImage ImageType;
69  typedef typename ImageType::PixelType PixelType;
70  typedef typename Superclass::InputImageType InputImageType;
71  typedef typename Superclass::OutputImageType OutputImageType;
72  typedef typename OutputImageType::RegionType OutputImageRegionType;
73 
74  // the proxy type is a wrapper for the fftw API
75  // since the proxy is only defined over double and float,
76  // trying to use any other pixel type is inoperative, as
77  // is trying to use double if only the float FFTW version is
78  // configured in, or float if only double is configured.
79  //
81 
83  itkNewMacro(Self);
84 
88 
89  itkStaticConstMacro(ImageDimension, unsigned int,
90  ImageType::ImageDimension);
91 
94 
103  virtual void SetPlanRigor( const int & value )
104  {
105  // use that method to check the value
107  if( m_PlanRigor != value )
108  {
109  m_PlanRigor = value;
110  this->Modified();
111  }
112  }
113  itkGetConstReferenceMacro( PlanRigor, int );
114  void SetPlanRigor( const std::string & name )
115  {
116  this->SetPlanRigor( FFTWGlobalConfiguration::GetPlanRigorValue( name ) );
117  }
119 
120 protected:
123 
124  virtual void UpdateOutputData(DataObject *output) ITK_OVERRIDE;
125 
126  virtual void BeforeThreadedGenerateData() ITK_OVERRIDE;
127 
128  void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
129  ThreadIdType threadId ) ITK_OVERRIDE;
130 
131  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
132 
133 private:
134  ITK_DISALLOW_COPY_AND_ASSIGN(FFTWComplexToComplexFFTImageFilter);
135 
136  bool m_CanUseDestructiveAlgorithm;
137 
138  int m_PlanRigor;
139 
140 };
141 
142 
143 } // namespace itk
144 
145 #ifndef ITK_MANUAL_INSTANTIATION
146 #include "itkFFTWComplexToComplexFFTImageFilter.hxx"
147 #endif
148 
149 #endif //itkFFTWComplexToComplexFFTImageFilter_h
ComplexToComplexFFTImageFilter< TImage > Superclass
Light weight base class for most itk classes.
static std::string GetPlanRigorName(const int &value)
Implements an API to enable the Fourier transform or the inverse Fourier transform of images with com...
fftw::Proxy< typename PixelType::value_type > FFTWProxyType
Implements an API to enable the Fourier transform or the inverse Fourier transform of images with com...
unsigned int ThreadIdType
Definition: itkIntTypes.h:159
static int GetPlanRigorValue(const std::string &name)
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Base class for all data objects in ITK.