ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkGaborImageSource.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 __itkGaborImageSource_h
00019 #define __itkGaborImageSource_h
00020 
00021 #include "itkGenerateImageSource.h"
00022 #include "itkFixedArray.h"
00023 
00024 namespace itk
00025 {
00046 template< typename TOutputImage >
00047 class ITK_EXPORT GaborImageSource
00048   : public GenerateImageSource< TOutputImage >
00049 {
00050 public:
00051 
00053   typedef GaborImageSource                    Self;
00054   typedef GenerateImageSource< TOutputImage > Superclass;
00055   typedef SmartPointer< Self >                Pointer;
00056   typedef SmartPointer< const Self >          ConstPointer;
00057 
00059   typedef TOutputImage                            OutputImageType;
00060   typedef typename OutputImageType::PixelType     PixelType;
00061   typedef typename OutputImageType::RegionType    RegionType;
00062   typedef typename OutputImageType::SpacingType   SpacingType;
00063   typedef typename OutputImageType::PointType     PointType;
00064   typedef typename OutputImageType::DirectionType DirectionType;
00065 
00066   typedef typename RegionType::SizeType SizeType;
00067 
00069   itkTypeMacro(GaborImageSource, GenerateImageSource);
00070 
00072   itkNewMacro(Self);
00073 
00075   itkStaticConstMacro(ImageDimension, unsigned int,
00076                       OutputImageType::ImageDimension);
00077 
00079   typedef FixedArray< double,
00080                       itkGetStaticConstMacro(ImageDimension) >    ArrayType;
00081 
00082   itkSetMacro(Sigma, ArrayType);
00083   itkGetConstReferenceMacro(Sigma, ArrayType);
00084 
00085   itkSetMacro(Mean, ArrayType);
00086   itkGetConstReferenceMacro(Mean, ArrayType);
00087 
00088   itkSetMacro(Frequency, double);
00089   itkGetConstReferenceMacro(Frequency, double);
00090 
00091   itkSetMacro(CalculateImaginaryPart, bool);
00092   itkGetConstReferenceMacro(CalculateImaginaryPart, bool);
00093   itkBooleanMacro(CalculateImaginaryPart);
00094 protected:
00095   GaborImageSource();
00096   // ~GaborImageSource(); default implementation ok
00097   void PrintSelf(std::ostream & os, Indent indent) const;
00098 
00099   void GenerateData();
00100 
00101 private:
00102   GaborImageSource(const GaborImageSource &); //purposely not implemented
00103   void operator=(const GaborImageSource &);   //purposely not implemented
00104 
00108   bool m_CalculateImaginaryPart;
00109 
00111   double m_Frequency;
00112 
00114   double m_PhaseOffset;
00115 
00117   ArrayType m_Sigma;
00118 
00120   ArrayType m_Mean;
00121 };
00122 } // end namespace itk
00123 
00124 #ifndef ITK_MANUAL_INSTANTIATION
00125 #include "itkGaborImageSource.hxx"
00126 #endif
00127 
00128 #endif
00129