ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkFFTWHalfHermitianToRealInverseFFTImageFilter.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 __itkFFTWHalfHermitianToRealInverseFFTImageFilter_h
00019 #define __itkFFTWHalfHermitianToRealInverseFFTImageFilter_h
00020 
00021 #include "itkHalfHermitianToRealInverseFFTImageFilter.h"
00022 
00023 #include "itkFFTWCommon.h"
00024 
00025 namespace itk
00026 {
00049 template< class TInputImage, class TOutputImage=Image< typename TInputImage::PixelType::value_type, TInputImage::ImageDimension> >
00050 class ITK_EXPORT FFTWHalfHermitianToRealInverseFFTImageFilter:
00051   public HalfHermitianToRealInverseFFTImageFilter< TInputImage, TOutputImage >
00052 {
00053 public:
00055   typedef TInputImage                          InputImageType;
00056   typedef typename InputImageType::PixelType   InputPixelType;
00057   typedef typename InputImageType::SizeType    InputSizeType;
00058   typedef TOutputImage                         OutputImageType;
00059   typedef typename OutputImageType::PixelType  OutputPixelType;
00060   typedef typename OutputImageType::RegionType OutputRegionType;
00061   typedef typename OutputImageType::SizeType   OutputSizeType;
00062 
00063   typedef FFTWHalfHermitianToRealInverseFFTImageFilter                                Self;
00064   typedef HalfHermitianToRealInverseFFTImageFilter< InputImageType, OutputImageType > Superclass;
00065   typedef SmartPointer< Self >                                                      Pointer;
00066   typedef SmartPointer< const Self >                                                ConstPointer;
00067 
00073   typedef typename fftw::Proxy< OutputPixelType > FFTWProxyType;
00074 
00076   itkNewMacro(Self);
00077 
00079   itkTypeMacro(FFTWHalfHermitianToRealInverseFFTImageFilter,
00080                HalfHermitianToRealInverseFFTImageFilter);
00081 
00083   itkStaticConstMacro(ImageDimension, unsigned int, InputImageType::ImageDimension);
00084 
00092   virtual void SetPlanRigor( const int & value )
00093   {
00094     // Use that method to check the value.
00095     FFTWGlobalConfiguration::GetPlanRigorName( value );
00096     if( m_PlanRigor != value )
00097       {
00098       m_PlanRigor = value;
00099       this->Modified();
00100       }
00101   }
00102   itkGetConstReferenceMacro( PlanRigor, int );
00103   void SetPlanRigor( const std::string & name )
00104   {
00105     this->SetPlanRigor( FFTWGlobalConfiguration::GetPlanRigorValue( name ) );
00106   }
00108 
00109 protected:
00110   FFTWHalfHermitianToRealInverseFFTImageFilter();
00111   virtual ~FFTWHalfHermitianToRealInverseFFTImageFilter() {}
00112 
00113   virtual void UpdateOutputData(DataObject *output);
00114 
00115   virtual void BeforeThreadedGenerateData();
00116 
00117   void ThreadedGenerateData(const OutputRegionType& outputRegionForThread,
00118                             ThreadIdType threadId);
00119 
00120   void PrintSelf(std::ostream & os, Indent indent) const;
00121 
00122 private:
00123   FFTWHalfHermitianToRealInverseFFTImageFilter(const Self&); //purposely not implemented
00124   void operator=(const Self&); //purposely not implemented
00125 
00126   bool m_CanUseDestructiveAlgorithm;
00127 
00128   int m_PlanRigor;
00129 
00130 };
00131 
00132 
00133 } // namespace itk
00134 
00135 #ifndef ITK_MANUAL_INSTANTIATION
00136 #include "itkFFTWHalfHermitianToRealInverseFFTImageFilter.hxx"
00137 #endif
00138 
00139 #endif //__itkFFTWHalfHermitianToRealInverseFFTImageFilter_h
00140