ITK  4.4.0
Insight Segmentation and Registration Toolkit
itkFFTWComplexToComplexImageFilter.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 __itkFFTWComplexToComplexImageFilter_h
19 #define __itkFFTWComplexToComplexImageFilter_h
20 
22 #include "itkFFTWCommon.h"
23 
24 
25 namespace itk
26 {
55 template< class TImage >
57  public FFTComplexToComplexImageFilter< TImage >
58 {
59 public:
64 
66  typedef TImage ImageType;
67  typedef typename ImageType::PixelType PixelType;
68  typedef typename Superclass::InputImageType InputImageType;
69  typedef typename Superclass::OutputImageType OutputImageType;
70  typedef typename OutputImageType::RegionType OutputImageRegionType;
71 
72  //
73  // the proxy type is a wrapper for the fftw API
74  // since the proxy is only defined over double and float,
75  // trying to use any other pixel type is inoperative, as
76  // is trying to use double if only the float FFTW version is
77  // configured in, or float if only double is configured.
78  //
80 
82  itkNewMacro(Self);
83 
87 
88  itkStaticConstMacro(ImageDimension, unsigned int,
89  ImageType::ImageDimension);
90 
92  typedef typename ImageType::SizeType ImageSizeType;
93 
94  //
95  // these should be defined in every FFT filter class
96  virtual bool FullMatrix();
97 
106  virtual void SetPlanRigor( const int & value )
107  {
108  // use that method to check the value
110  if( m_PlanRigor != value )
111  {
112  m_PlanRigor = value;
113  this->Modified();
114  }
115  }
116  itkGetConstReferenceMacro( PlanRigor, int );
117  void SetPlanRigor( const std::string & name )
118  {
119  this->SetPlanRigor( FFTWGlobalConfiguration::GetPlanRigorValue( name ) );
120  }
122 
123 protected:
125  {
127  }
129  {
130  }
131 
132  virtual void UpdateOutputData(DataObject *output);
133 
134  virtual void BeforeThreadedGenerateData();
135  void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, ThreadIdType threadId );
136 
137  void PrintSelf(std::ostream & os, Indent indent) const;
138 
139 private:
140  FFTWComplexToComplexImageFilter(const Self&); //purposely not implemented
141  void operator=(const Self&); //purposely not implemented
142 
144 
146 
147 };
148 
149 
150 } // namespace itk
151 
152 #ifndef ITK_MANUAL_INSTANTIATION
153 #include "itkFFTWComplexToComplexImageFilter.hxx"
154 #endif
155 
156 #endif //__itkFFTWComplexToComplexImageFilter_h
157