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: 2006/03/24 16:03:17 $
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 __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   typedef   typename TInputImage::IndexType       IndexType;
00092   typedef   typename TInputImage::SizeType        SizeType;
00093   typedef   typename TOutputImage::RegionType     RegionType;
00094   typedef   std::list<IndexType>                  ListType;
00095 
00096   typedef typename MaskImageType::Pointer MaskImagePointer;
00097 
00101   typedef SmartPointer<Self> Pointer;
00102   typedef SmartPointer<const Self>  ConstPointer;
00103 
00107   itkTypeMacro(ConnectedComponentFunctorImageFilter, ImageToImageFilter);
00108 
00112   itkNewMacro(Self);
00113 
00118   FunctorType& GetFunctor() { return m_Functor; };
00119   const FunctorType& GetFunctor() const { return m_Functor; };
00121 
00128   void SetFunctor(const FunctorType& functor)
00129   {
00130     m_Functor = functor;
00131     this->Modified();
00132   }
00134 
00135 #ifdef ITK_USE_CONCEPT_CHECKING
00136 
00137   itkConceptMacro(SameDimensionCheck,
00138     (Concept::SameDimension<InputImageDimension, ImageDimension>));
00139   itkConceptMacro(InputEqualityComparableCheck,
00140     (Concept::EqualityComparable<InputPixelType>));
00141   itkConceptMacro(OutputEqualityComparableCheck,
00142     (Concept::EqualityComparable<OutputPixelType>));
00143   itkConceptMacro(OutputConvertibleToUnsignedIntCheck,
00144     (Concept::Convertible<OutputPixelType, unsigned int>));
00145   itkConceptMacro(OutputConvertibleToUnsignedLongCheck,
00146     (Concept::Convertible<OutputPixelType, unsigned long>));
00147   itkConceptMacro(OutputConvertibleToLongCheck,
00148     (Concept::Convertible<OutputPixelType, long>));
00149   itkConceptMacro(UnsignedLongConvertibleToOutputCheck,
00150     (Concept::Convertible<unsigned long, OutputPixelType>));
00151   itkConceptMacro(OutputIncrementDecrementOperatorsCheck,
00152     (Concept::IncrementDecrementOperators<OutputPixelType>));
00153 
00155 #endif
00156 
00157 protected:
00158   ConnectedComponentFunctorImageFilter() {}
00159   virtual ~ConnectedComponentFunctorImageFilter() {}
00160   ConnectedComponentFunctorImageFilter(const Self&) {}
00161 
00162   FunctorType m_Functor;
00163 
00167   void GenerateData();
00168 
00169 };
00170   
00171 } // end namespace itk
00172 
00173 #ifndef ITK_MANUAL_INSTANTIATION
00174 #include "itkConnectedComponentFunctorImageFilter.txx"
00175 #endif
00176 
00177 #endif
00178 

Generated at Sun Sep 23 12:15:47 2007 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000