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

itkConnectedComponentFunctorImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkConnectedComponentFunctorImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2008-10-13 18:54:27 $
00007   Version:   $Revision: 1.5 $
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 __itkConnectedComponentFunctorImageFilter_h
00018 #define __itkConnectedComponentFunctorImageFilter_h
00019 
00020 #include "itkConnectedComponentImageFilter.h"
00021 #include "itkImage.h"
00022 
00023 namespace itk
00024 {
00025 
00053 template <class TInputImage, class TOutputImage, class TFunctor, class TMaskImage=TInputImage>
00054 class ITK_EXPORT ConnectedComponentFunctorImageFilter : 
00055     public ConnectedComponentImageFilter< TInputImage, TOutputImage, TMaskImage > 
00056 {
00057 public:
00061   typedef ConnectedComponentFunctorImageFilter Self;
00062   typedef ConnectedComponentImageFilter< TInputImage, TOutputImage, TMaskImage > Superclass;
00063 
00067   typedef typename Superclass::InputImagePointer InputImagePointer;
00068 
00073   typedef typename TOutputImage::PixelType          OutputPixelType;
00074   typedef typename TOutputImage::InternalPixelType  OutputInternalPixelType;
00075   typedef typename TInputImage::PixelType           InputPixelType;
00076   typedef typename TInputImage::InternalPixelType   InputInternalPixelType;
00077   typedef typename TMaskImage::PixelType            MaskPixelType;
00078   itkStaticConstMacro(ImageDimension, unsigned int,
00079                       TOutputImage::ImageDimension);
00080   itkStaticConstMacro(InputImageDimension, unsigned int,
00081                       TInputImage::ImageDimension);
00083 
00087   typedef TFunctor     FunctorType;
00088   typedef TInputImage  InputImageType;
00089   typedef TMaskImage   MaskImageType;
00090   typedef TOutputImage OutputImageType;
00091 
00092   typedef   typename TInputImage::IndexType       IndexType;
00093   typedef   typename TInputImage::SizeType        SizeType;
00094   typedef   typename TOutputImage::RegionType     RegionType;
00095   typedef   std::list<IndexType>                  ListType;
00096 
00097   typedef typename MaskImageType::Pointer MaskImagePointer;
00098 
00102   typedef SmartPointer<Self>        Pointer;
00103   typedef SmartPointer<const Self>  ConstPointer;
00104 
00108   itkTypeMacro(ConnectedComponentFunctorImageFilter, ImageToImageFilter);
00109 
00113   itkNewMacro(Self);
00114 
00119   FunctorType& GetFunctor() { return m_Functor; };
00120   const FunctorType& GetFunctor() const { return m_Functor; }
00122 
00129   void SetFunctor(const FunctorType& functor)
00130     {
00131     m_Functor = functor;
00132     this->Modified();
00133     }
00135 
00136 #ifdef ITK_USE_CONCEPT_CHECKING
00137 
00138   itkConceptMacro(SameDimensionCheck,
00139     (Concept::SameDimension<InputImageDimension, ImageDimension>));
00140   itkConceptMacro(InputEqualityComparableCheck,
00141     (Concept::EqualityComparable<InputPixelType>));
00142   itkConceptMacro(OutputEqualityComparableCheck,
00143     (Concept::EqualityComparable<OutputPixelType>));
00144   itkConceptMacro(OutputConvertibleToUnsignedIntCheck,
00145     (Concept::Convertible<OutputPixelType, unsigned int>));
00146   itkConceptMacro(OutputConvertibleToUnsignedLongCheck,
00147     (Concept::Convertible<OutputPixelType, unsigned long>));
00148   itkConceptMacro(OutputConvertibleToLongCheck,
00149     (Concept::Convertible<OutputPixelType, long>));
00150   itkConceptMacro(UnsignedLongConvertibleToOutputCheck,
00151     (Concept::Convertible<unsigned long, OutputPixelType>));
00152   itkConceptMacro(OutputIncrementDecrementOperatorsCheck,
00153     (Concept::IncrementDecrementOperators<OutputPixelType>));
00154 
00156 #endif
00157 
00158 protected:
00159   ConnectedComponentFunctorImageFilter() {}
00160   virtual ~ConnectedComponentFunctorImageFilter() {}
00161   ConnectedComponentFunctorImageFilter(const Self&) {}
00162 
00163   FunctorType m_Functor;
00164 
00168   void GenerateData();
00169 
00170 };
00171   
00172 } // end namespace itk
00173 
00174 #ifndef ITK_MANUAL_INSTANTIATION
00175 #include "itkConnectedComponentFunctorImageFilter.txx"
00176 #endif
00177 
00178 #endif
00179 

Generated at Wed Nov 5 20:56:43 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000