Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkDiscreteGaussianDerivativeImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkDiscreteGaussianDerivativeImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2010-06-10 13:02:23 $
00007   Version:   $Revision: 1.8 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00014      PURPOSE.  See the above copyright notices for more information.
00015 
00016 =========================================================================*/
00017 
00018 #ifndef __itkDiscreteGaussianDerivativeImageFilter_h
00019 #define __itkDiscreteGaussianDerivativeImageFilter_h
00020 
00021 #include "itkImageToImageFilter.h"
00022 #include "itkFixedArray.h"
00023 #include "itkImage.h"
00024 
00025 namespace itk
00026 {
00059 template <class TInputImage, class TOutputImage >
00060 class ITK_EXPORT DiscreteGaussianDerivativeImageFilter :
00061     public ImageToImageFilter< TInputImage, TOutputImage >
00062 {
00063 public:
00065   typedef DiscreteGaussianDerivativeImageFilter           Self;
00066   typedef ImageToImageFilter< TInputImage, TOutputImage > Superclass;
00067   typedef SmartPointer<Self>                              Pointer;
00068   typedef SmartPointer<const Self>                        ConstPointer;
00069 
00071   itkNewMacro(Self);
00072 
00074   itkTypeMacro(DiscreteGaussianDerivativeImageFilter, ImageToImageFilter);
00075 
00077   typedef TInputImage  InputImageType;
00078   typedef TOutputImage OutputImageType;
00079 
00082   typedef typename TOutputImage::PixelType         OutputPixelType;
00083   typedef typename TOutputImage::InternalPixelType OutputInternalPixelType;
00084   typedef typename TInputImage::PixelType          InputPixelType;
00085   typedef typename TInputImage::InternalPixelType  InputInternalPixelType;
00086 
00089   itkStaticConstMacro(ImageDimension, unsigned int,
00090                       TOutputImage::ImageDimension);
00091 
00093   typedef FixedArray<double, itkGetStaticConstMacro(ImageDimension)> ArrayType;
00094 
00096   typedef FixedArray<unsigned int, itkGetStaticConstMacro(ImageDimension)> OrderArrayType;
00097 
00101   itkSetMacro(Order, OrderArrayType);
00102   itkGetConstMacro(Order, const OrderArrayType);
00104 
00111   itkSetMacro(Variance, ArrayType);
00112   itkGetConstMacro(Variance, const ArrayType);
00114 
00118   itkSetMacro(MaximumError, ArrayType);
00119   itkGetConstMacro(MaximumError, const ArrayType);
00121 
00124   itkGetConstMacro(MaximumKernelWidth, int);
00125   itkSetMacro(MaximumKernelWidth, int);
00127 
00128   
00138   itkSetMacro(InternalNumberOfStreamDivisions,unsigned int);
00139   itkGetConstMacro(InternalNumberOfStreamDivisions,unsigned int);
00140   
00141 
00146   void SetOrder (const typename OrderArrayType::ValueType v)
00147       {
00148       OrderArrayType a;
00149       a.Fill(v);
00150       this->SetOrder(a);
00151       }
00152     void SetVariance (const typename ArrayType::ValueType v)
00153       {
00154       ArrayType a;
00155       a.Fill(v);
00156       this->SetVariance(a);
00157       }
00158     void SetMaximumError (const typename ArrayType::ValueType v)
00159       {
00160       ArrayType a;
00161       a.Fill(v);
00162       this->SetMaximumError(a);
00163       }
00166 
00169   itkSetMacro(UseImageSpacing, bool);
00170   itkGetConstMacro(UseImageSpacing, bool);
00171   itkBooleanMacro(UseImageSpacing);
00173 
00174 #ifdef ITK_USE_CONCEPT_CHECKING
00175 
00176   itkConceptMacro(OutputHasNumericTraitsCheck,
00177     (Concept::HasNumericTraits<OutputPixelType>));
00178 
00180 #endif
00181 
00182 protected:
00183 
00184   DiscreteGaussianDerivativeImageFilter()
00185     {
00186     m_Order.Fill(1);
00187     m_Variance.Fill(0.0);
00188     m_MaximumError.Fill(0.01);
00189     m_MaximumKernelWidth = 32;
00190     m_UseImageSpacing = true;
00191     m_InternalNumberOfStreamDivisions = ImageDimension*ImageDimension;
00192     }
00193   virtual ~DiscreteGaussianDerivativeImageFilter() {}
00194   void PrintSelf(std::ostream& os, Indent indent) const;
00195 
00202   virtual void GenerateInputRequestedRegion() throw(InvalidRequestedRegionError);
00203 
00209   void GenerateData();
00210 
00211 private:
00212 
00213   DiscreteGaussianDerivativeImageFilter(const Self&); //purposely not implemented
00214   void operator=(const Self&); //purposely not implemented
00215 
00217   OrderArrayType m_Order;
00218 
00220   ArrayType m_Variance;
00221 
00225   ArrayType m_MaximumError;
00226 
00229   int m_MaximumKernelWidth;
00230 
00232   bool m_UseImageSpacing;
00233 
00236   unsigned int m_InternalNumberOfStreamDivisions;
00237 };
00238 
00239 } // end namespace itk
00240 
00241 #ifndef ITK_MANUAL_INSTANTIATION
00242 #include "itkDiscreteGaussianDerivativeImageFilter.txx"
00243 #endif
00244 
00245 #endif
00246 

Generated at Mon Jul 12 2010 18:14:09 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000