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

itkRelabelComponentImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkRelabelComponentImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2003/09/10 14:28:55 $
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 __itkRelabelComponentImageFilter_h
00018 #define __itkRelabelComponentImageFilter_h
00019 
00020 #include "itkImageToImageFilter.h"
00021 #include "itkImage.h"
00022 #include <vector>
00023 
00024 namespace itk
00025 {
00026 
00059 template <class TInputImage, class TOutputImage = TInputImage>
00060 class ITK_EXPORT RelabelComponentImageFilter : 
00061     public ImageToImageFilter< TInputImage, TOutputImage > 
00062 {
00063 public:
00067   typedef RelabelComponentImageFilter Self;
00068   typedef ImageToImageFilter< TInputImage, TOutputImage > Superclass;
00069 
00073   typedef typename Superclass::InputImagePointer InputImagePointer;
00074 
00079   typedef typename TOutputImage::PixelType OutputPixelType;
00080   typedef typename TOutputImage::InternalPixelType OutputInternalPixelType;
00081   typedef typename TInputImage::PixelType InputPixelType;
00082   typedef typename TInputImage::InternalPixelType InputInternalPixelType;
00083   itkStaticConstMacro(ImageDimension, unsigned int,
00084                       TOutputImage::ImageDimension);
00085   
00089   typedef TInputImage  InputImageType;
00090   typedef TOutputImage OutputImageType;
00091   typedef   typename TInputImage::IndexType       IndexType;
00092   typedef   typename TInputImage::SizeType        SizeType;
00093   typedef   typename TOutputImage::RegionType     RegionType;
00094 
00098   typedef SmartPointer<Self> Pointer;
00099   typedef SmartPointer<const Self>  ConstPointer;
00100   
00104   itkTypeMacro(RelabelComponentImageFilter, ImageToImageFilter);
00105   
00109   itkNewMacro(Self);
00110 
00113   itkGetMacro(NumberOfObjects, unsigned long);
00114 
00120   const std::vector<unsigned long>& GetSizeOfObjectsInPixels() const
00121     { return m_SizeOfObjectsInPixels; }
00122 
00128   const std::vector<unsigned long>& GetSizeOfObjectsInPhysicalUnits() const
00129     { return m_SizeOfObjectsInPhysicalUnits; }
00130 
00131 protected:
00132   RelabelComponentImageFilter()
00133     : m_NumberOfObjects(0)
00134     {}
00135   virtual ~RelabelComponentImageFilter() {}
00136   RelabelComponentImageFilter(const Self&) {}
00137 
00141   void GenerateData();
00142 
00146   void GenerateInputRequestedRegion();
00147 
00149   void PrintSelf(std::ostream& os, Indent indent) const;
00150 
00151 private:
00152   unsigned long m_NumberOfObjects;
00153   std::vector<unsigned long> m_SizeOfObjectsInPixels;
00154   std::vector<float> m_SizeOfObjectsInPhysicalUnits;
00155 
00156 };
00157   
00158 } // end namespace itk
00159 
00160 #ifndef ITK_MANUAL_INSTANTIATION
00161 #include "itkRelabelComponentImageFilter.txx"
00162 #endif
00163 
00164 #endif

Generated at Sun Jan 25 13:19:43 2004 for ITK by doxygen 1.3.3 written by Dimitri van Heesch, © 1997-2000