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: 2009-04-28 14:36:31 $
00007   Version:   $Revision: 1.6 $
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 
00107   typedef typename TKernel::PixelType            KernelPixelType;
00108 
00109 #ifdef ITK_USE_CONCEPT_CHECKING
00110 
00111   itkConceptMacro(SameDimensionCheck1,
00112     (Concept::SameDimension<InputImageDimension, KernelDimension>));
00113   itkConceptMacro(SameDimensionCheck2,
00114     (Concept::SameDimension<InputImageDimension, OutputImageDimension>));
00115   itkConceptMacro(InputLessThanComparableCheck,
00116     (Concept::LessThanComparable<InputImagePixelType>));
00117   itkConceptMacro(InputGreaterThanComparableCheck,
00118     (Concept::GreaterThanComparable<InputImagePixelType>));
00119   itkConceptMacro(InputAdditiveOperatorsCheck,
00120     (Concept::AdditiveOperators<InputImagePixelType>));
00121   itkConceptMacro(InputConvertibleToOutputCheck,
00122     (Concept::Convertible<InputImagePixelType, OutputImagePixelType>));
00123   itkConceptMacro(KernelGreaterThanComparableCheck,
00124     (Concept::GreaterThanComparable<KernelPixelType>));
00125 
00127 #endif
00128 
00129 protected:
00130   MorphologicalGradientImageFilter();
00131   ~MorphologicalGradientImageFilter() {};
00132   void PrintSelf(std::ostream& os, Indent indent) const;
00133 
00141   void GenerateInputRequestedRegion();
00142 
00143   void GenerateData();
00144   
00145 
00146 private:
00147   MorphologicalGradientImageFilter(const Self&); //purposely not implemented
00148   void operator=(const Self&); //purposely not implemented
00149 
00151   KernelType m_Kernel;
00152 }; // end of class
00153 
00154 } // end namespace itk
00155   
00156 #ifndef ITK_MANUAL_INSTANTIATION
00157 #include "itkMorphologicalGradientImageFilter.txx"
00158 #endif
00159 
00160 #endif
00161 
00162 #endif
00163 

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