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

itkMorphologicalGradientImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkMorphologicalGradientImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2008-10-16 19:33:41 $
00007   Version:   $Revision: 1.4 $
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 #ifndef __itkMorphologicalGradientImageFilter_h
00018 #define __itkMorphologicalGradientImageFilter_h
00019 
00020 // First make sure that the configuration is available.
00021 // This line can be removed once the optimized versions
00022 // gets integrated into the main directories.
00023 #include "itkConfigure.h"
00024 
00025 #ifdef ITK_USE_CONSOLIDATED_MORPHOLOGY
00026 #include "itkOptMorphologicalGradientImageFilter.h"
00027 #else
00028 
00029 
00030 #include "itkImageToImageFilter.h"
00031 
00032 namespace itk {
00033 
00057 template<class TInputImage, class TOutputImage, class TKernel>
00058 class ITK_EXPORT MorphologicalGradientImageFilter : 
00059     public ImageToImageFilter<TInputImage, TOutputImage>
00060 {
00061 public:
00063   typedef MorphologicalGradientImageFilter Self;
00064   typedef ImageToImageFilter<TInputImage, TOutputImage>
00065                                            Superclass;
00066   typedef SmartPointer<Self>               Pointer;
00067   typedef SmartPointer<const Self>         ConstPointer;
00068 
00070   typedef TInputImage                              InputImageType;
00071   typedef typename InputImageType::Pointer         InputImagePointer;
00072   typedef typename InputImageType::ConstPointer    InputImageConstPointer;
00073   typedef typename InputImageType::RegionType      InputImageRegionType;
00074   typedef typename InputImageType::PixelType       InputImagePixelType;
00075   typedef TOutputImage                             OutputImageType;
00076   typedef typename OutputImageType::Pointer        OutputImagePointer;
00077   typedef typename OutputImageType::ConstPointer   OutputImageConstPointer;
00078   typedef typename OutputImageType::RegionType     OutputImageRegionType;
00079   typedef typename OutputImageType::PixelType      OutputImagePixelType;
00080 
00082   typedef TKernel KernelType;
00083 
00085   itkStaticConstMacro(InputImageDimension, unsigned int,
00086                       TInputImage::ImageDimension);
00087   itkStaticConstMacro(OutputImageDimension, unsigned int,
00088                       TOutputImage::ImageDimension);
00089   itkStaticConstMacro(KernelDimension, unsigned int,
00090                       TKernel::NeighborhoodDimension);
00092 
00094   itkNewMacro(Self);  
00095 
00097   itkTypeMacro(MorphologicalGradientImageFilter, 
00098                ImageToImageFilter);
00099 
00101   itkSetMacro(Kernel, KernelType);
00102 
00104   itkGetConstReferenceMacro(Kernel, KernelType);
00105 
00106 #ifdef ITK_USE_CONCEPT_CHECKING
00107 
00108   itkConceptMacro(SameDimensionCheck1,
00109     (Concept::SameDimension<InputImageDimension, KernelDimension>));
00110   itkConceptMacro(SameDimensionCheck2,
00111     (Concept::SameDimension<InputImageDimension, OutputImageDimension>));
00112   itkConceptMacro(InputLessThanComparableCheck,
00113     (Concept::LessThanComparable<InputImagePixelType>));
00114   itkConceptMacro(InputGreaterThanComparableCheck,
00115     (Concept::GreaterThanComparable<InputImagePixelType>));
00116   itkConceptMacro(InputAdditiveOperatorsCheck,
00117     (Concept::AdditiveOperators<InputImagePixelType>));
00118   itkConceptMacro(InputConvertibleToOutputCheck,
00119     (Concept::Convertible<InputImagePixelType, OutputImagePixelType>));
00120   itkConceptMacro(KernelGreaterThanIntCheck,
00121     (Concept::GreaterThanComparable<typename TKernel::PixelType, int>));
00122 
00124 #endif
00125 
00126 protected:
00127   MorphologicalGradientImageFilter();
00128   ~MorphologicalGradientImageFilter() {};
00129   void PrintSelf(std::ostream& os, Indent indent) const;
00130 
00138   void GenerateInputRequestedRegion();
00139 
00140   void GenerateData();
00141   
00142 
00143 private:
00144   MorphologicalGradientImageFilter(const Self&); //purposely not implemented
00145   void operator=(const Self&); //purposely not implemented
00146 
00148   KernelType m_Kernel;
00149 }; // end of class
00150 
00151 } // end namespace itk
00152   
00153 #ifndef ITK_MANUAL_INSTANTIATION
00154 #include "itkMorphologicalGradientImageFilter.txx"
00155 #endif
00156 
00157 #endif
00158 
00159 #endif
00160 

Generated at Wed Nov 5 22:55:28 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000