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

itkHardConnectedComponentImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkHardConnectedComponentImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2008-10-16 16:45:09 $
00007   Version:   $Revision: 1.7 $
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 __itkHardConnectedComponentImageFilter_h
00018 #define __itkHardConnectedComponentImageFilter_h
00019 
00020 #include "itkImageToImageFilter.h"
00021 #include "itkImage.h"
00022 
00023 namespace itk
00050 template <class TInputImage, class TOutputImage>
00051 class ITK_EXPORT HardConnectedComponentImageFilter : 
00052     public ImageToImageFilter< TInputImage, TOutputImage > 
00053 {
00054 public:
00058   typedef HardConnectedComponentImageFilter               Self;
00059   typedef ImageToImageFilter< TInputImage, TOutputImage > Superclass;
00060 
00065   typedef typename TOutputImage::PixelType         OutputPixelType;
00066   typedef typename TOutputImage::InternalPixelType OutputInternalPixelType;
00067   typedef typename TInputImage::PixelType          InputPixelType;
00068   typedef typename TInputImage::InternalPixelType  InputInternalPixelType;
00069   itkStaticConstMacro(InputImageDimension, unsigned int,
00070                       TInputImage::ImageDimension);
00071   itkStaticConstMacro(ImageDimension, unsigned int,
00072                       TOutputImage::ImageDimension);
00074 
00078   typedef TInputImage                             InputImageType;
00079   typedef TOutputImage                            OutputImageType;
00080   typedef   typename TInputImage::IndexType       IndexType;
00081   typedef   typename TInputImage::SizeType        SizeType;
00082   typedef   typename TOutputImage::RegionType     RegionType;
00083   typedef   std::list<IndexType>                  ListType;
00084 
00088   typedef SmartPointer<Self>        Pointer;
00089   typedef SmartPointer<const Self>  ConstPointer;
00090 
00094   itkTypeMacro(HardConnectedComponentImageFilter, ImageToImageFilter);
00095 
00099   itkNewMacro(Self);
00100 
00102   void SetObjectSeed( const IndexType &seed)
00103     {m_Seeds.push_front(seed);} 
00104 
00105 #ifdef ITK_USE_CONCEPT_CHECKING
00106 
00107   itkConceptMacro(SameDimensionCheck,
00108     (Concept::SameDimension<InputImageDimension, ImageDimension>));
00109   itkConceptMacro(IntConvertibleToOutputCheck,
00110     (Concept::Convertible<int, OutputPixelType>));
00111   itkConceptMacro(UnsignedShortConvertibleToOutputCheck,
00112     (Concept::Convertible<unsigned short, OutputPixelType>));
00113   itkConceptMacro(OutputEqualityComparableCheck,
00114     (Concept::EqualityComparable<OutputPixelType>));
00115   itkConceptMacro(UnsignedCharConvertibleToOutputCheck,
00116     (Concept::Convertible<unsigned char, OutputPixelType>));
00117   itkConceptMacro(OutputIncrementDecrementOperatorsCheck,
00118     (Concept::IncrementDecrementOperators<OutputPixelType>));
00119 
00121 #endif
00122 
00123 protected:
00124   HardConnectedComponentImageFilter() {}
00125   virtual ~HardConnectedComponentImageFilter() {}
00126   HardConnectedComponentImageFilter(const Self&) {}
00127 
00131   void GenerateData();
00132   void PrintSelf(std::ostream& os, Indent indent) const
00133   { Superclass::PrintSelf(os,indent); }
00135 
00136   
00137 private:
00138   ListType    m_Seeds;
00139 };
00140   
00141 } // end namespace itk
00142 
00143 #ifndef ITK_MANUAL_INSTANTIATION
00144 #include "itkHardConnectedComponentImageFilter.txx"
00145 #endif
00146 
00147 #endif
00148 

Generated at Tue Sep 15 03:09:53 2009 for ITK by doxygen 1.5.8 written by Dimitri van Heesch, © 1997-2000