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

itkNeighborhoodConnectedImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkNeighborhoodConnectedImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2002/02/11 16:28:03 $
00007   Version:   $Revision: 1.3 $
00008 
00009   Copyright (c) 2002 Insight 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 __itkNeighborhoodConnectedImageFilter_h
00018 #define __itkNeighborhoodConnectedImageFilter_h
00019 
00020 #include "itkImage.h"
00021 #include "itkImageToImageFilter.h"
00022 
00023 namespace itk{
00024 
00034 template <class TInputImage, class TOutputImage>
00035 class NeighborhoodConnectedImageFilter:
00036   public ImageToImageFilter<TInputImage,TOutputImage>
00037 {
00038 public:
00040   typedef NeighborhoodConnectedImageFilter Self;
00041   typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass;
00042   typedef SmartPointer<Self> Pointer;
00043   typedef SmartPointer<const Self> ConstPointer;
00044 
00046   itkNewMacro(Self);
00047 
00049   itkTypeMacro(NeighborhoodConnectedImageFilter,
00050                ImageToImageFilter);
00051 
00052   typedef TInputImage InputImageType;
00053   typedef typename InputImageType::Pointer InputImagePointer;
00054   typedef typename InputImageType::RegionType InputImageRegionType; 
00055   typedef typename InputImageType::PixelType InputImagePixelType; 
00056   typedef typename InputImageType::IndexType IndexType;
00057   typedef typename InputImageType::SizeType InputImageSizeType;
00058   
00059   typedef TOutputImage OutputImageType;
00060   typedef typename OutputImageType::Pointer OutputImagePointer;
00061   typedef typename OutputImageType::RegionType OutputImageRegionType; 
00062   typedef typename OutputImageType::PixelType OutputImagePixelType; 
00063   
00064   void PrintSelf ( std::ostream& os, Indent indent ) const;
00065 
00067   void SetSeed(const IndexType & seed)
00068   {
00069     if ( m_Seed != seed )
00070       {
00071       m_Seed = seed;
00072       this->Modified();
00073       }
00074   };
00075 
00077   itkSetMacro(Lower, InputImagePixelType);
00078   itkGetMacro(Lower, InputImagePixelType);
00079 
00082   itkSetMacro(Upper, InputImagePixelType);
00083   itkGetMacro(Upper, InputImagePixelType);
00084   
00088   itkSetMacro(ReplaceValue, OutputImagePixelType);
00089   itkGetMacro(ReplaceValue, OutputImagePixelType);
00090 
00092   itkSetMacro(Radius, InputImageSizeType);
00093 
00095   itkGetConstReferenceMacro(Radius, InputImageSizeType);
00096 
00097 protected:
00098   NeighborhoodConnectedImageFilter();
00099   ~NeighborhoodConnectedImageFilter(){};
00100   IndexType m_Seed;
00101   InputImagePixelType m_Lower;
00102   InputImagePixelType m_Upper;
00103   OutputImagePixelType m_ReplaceValue;
00104   InputImageSizeType m_Radius;
00105 
00106   
00107   // Override since the filter needs all the data for the algorithm
00108   void GenerateInputRequestedRegion();
00109 
00110   // Override since the filter produces the entire dataset
00111   void EnlargeOutputRequestedRegion(DataObject *output);
00112   void GenerateData();
00113   
00114 private:
00115   NeighborhoodConnectedImageFilter(const Self&); //purposely not implemented
00116   void operator=(const Self&); //purposely not implemented
00117 
00118 };
00119 
00120 } // end namespace itk
00121 
00122 #ifndef ITK_MANUAL_INSTANTIATION
00123 #include "itkNeighborhoodConnectedImageFilter.txx"
00124 #endif
00125 
00126 #endif

Generated at Wed Mar 12 01:13:08 2003 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000