ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkFFTWForwardFFTImageFilter.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 #ifndef __itkFFTWForwardFFTImageFilter_h
00019 #define __itkFFTWForwardFFTImageFilter_h
00020 
00021 #include "itkForwardFFTImageFilter.h"
00022 
00023 #include "itkFFTWCommon.h"
00024 
00025 namespace itk
00026 {
00053 template< class TInputImage, class TOutputImage=Image< std::complex<typename TInputImage::PixelType>, TInputImage::ImageDimension> >
00054 class ITK_EXPORT FFTWForwardFFTImageFilter:
00055   public ForwardFFTImageFilter< TInputImage, TOutputImage >
00056 {
00057 public:
00059   typedef TInputImage                          InputImageType;
00060   typedef typename InputImageType::PixelType   InputPixelType;
00061   typedef typename InputImageType::SizeType    InputSizeType;
00062   typedef TOutputImage                         OutputImageType;
00063   typedef typename OutputImageType::PixelType  OutputPixelType;
00064   typedef typename OutputImageType::SizeType   OutputSizeType;
00065 
00066   typedef FFTWForwardFFTImageFilter                          Self;
00067   typedef ForwardFFTImageFilter< TInputImage, TOutputImage > Superclass;
00068   typedef SmartPointer< Self >                               Pointer;
00069   typedef SmartPointer< const Self >                         ConstPointer;
00070 
00076   typedef typename fftw::Proxy< InputPixelType > FFTWProxyType;
00077 
00079   itkNewMacro(Self);
00080 
00082   itkTypeMacro(FFTWForwardFFTImageFilter,
00083                ForwardFFTImageFilter);
00084 
00086   itkStaticConstMacro(ImageDimension, unsigned int, InputImageType::ImageDimension);
00087 
00096   virtual void SetPlanRigor( const int & value )
00097   {
00098     // Use that method to check the value
00099     FFTWGlobalConfiguration::GetPlanRigorName( value );
00100     if( m_PlanRigor != value )
00101       {
00102       m_PlanRigor = value;
00103       this->Modified();
00104       }
00105   }
00106   itkGetConstReferenceMacro( PlanRigor, int );
00108 
00109 protected:
00110   FFTWForwardFFTImageFilter();
00111   ~FFTWForwardFFTImageFilter() {}
00112 
00113   virtual void GenerateData();
00114 
00115   virtual void UpdateOutputData(DataObject *output);
00116 
00117   void PrintSelf(std::ostream & os, Indent indent) const;
00118 
00119 private:
00120   FFTWForwardFFTImageFilter(const Self&); // purposely not implemented
00121   void operator=(const Self&);            // purposely not implemented
00122 
00123   bool m_CanUseDestructiveAlgorithm;
00124 
00125   int m_PlanRigor;
00126 };
00127 } // namespace itk
00128 
00129 #ifndef ITK_MANUAL_INSTANTIATION
00130 #include "itkFFTWForwardFFTImageFilter.hxx"
00131 #endif
00132 
00133 #endif //__itkFFTWForwardFFTImageFilter_h
00134