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

itkIsolatedWatershedImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkIsolatedWatershedImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2004/05/20 00:03:01 $
00007   Version:   $Revision: 1.3 $
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 __itkIsolatedWatershedImageFilter_h
00018 #define __itkIsolatedWatershedImageFilter_h
00019 
00020 #include "itkImage.h"
00021 #include "itkImageToImageFilter.h"
00022 #include "itkWatershedImageFilter.h"
00023 #include "itkGradientMagnitudeImageFilter.h"
00024 
00025 namespace itk{
00026 
00040 template <class TInputImage, class TOutputImage>
00041 class ITK_EXPORT IsolatedWatershedImageFilter:
00042     public ImageToImageFilter<TInputImage,TOutputImage>
00043 {
00044 public:
00046   typedef IsolatedWatershedImageFilter Self;
00047   typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass;
00048   typedef SmartPointer<Self> Pointer;
00049   typedef SmartPointer<const Self> ConstPointer;
00050 
00052   itkNewMacro(Self);
00053 
00055   itkTypeMacro(IsolatedWatershedImageFilter,
00056                ImageToImageFilter);
00057 
00058   typedef TInputImage InputImageType;
00059   typedef typename InputImageType::Pointer InputImagePointer;
00060   typedef typename InputImageType::ConstPointer InputImageConstPointer;
00061   typedef typename InputImageType::RegionType InputImageRegionType; 
00062   typedef typename InputImageType::PixelType InputImagePixelType; 
00063   typedef typename InputImageType::IndexType IndexType;
00064   typedef typename InputImageType::SizeType SizeType;
00065   
00066   typedef TOutputImage OutputImageType;
00067   typedef typename OutputImageType::Pointer OutputImagePointer;
00068   typedef typename OutputImageType::RegionType OutputImageRegionType; 
00069   typedef typename OutputImageType::PixelType OutputImagePixelType; 
00070   
00071   typedef WatershedImageFilter<InputImageType> WatershedType;
00072   typedef GradientMagnitudeImageFilter<InputImageType,OutputImageType> GradientMagnitudeType;
00073   void PrintSelf ( std::ostream& os, Indent indent ) const;
00074 
00078   itkSetMacro(Seed1, IndexType);
00079 
00083   itkSetMacro(Seed2, IndexType);
00084 
00086   itkSetMacro(Threshold, double);
00087   itkGetMacro(Threshold, double);
00089 
00092   itkSetMacro(IsolatedValueTolerance, double);
00093   itkGetMacro(IsolatedValueTolerance, double);
00095 
00098   itkSetMacro(UpperValueLimit, double);
00099   itkGetMacro(UpperValueLimit, double);
00101 
00102 
00106   itkSetMacro(ReplaceValue1, OutputImagePixelType);
00107   itkGetMacro(ReplaceValue1, OutputImagePixelType);
00108   itkSetMacro(ReplaceValue2, OutputImagePixelType);
00109   itkGetMacro(ReplaceValue2, OutputImagePixelType);
00111 
00113   itkGetMacro(IsolatedValue, double);
00114 
00115 protected:
00116   IsolatedWatershedImageFilter();
00117   ~IsolatedWatershedImageFilter(){};
00118   IndexType m_Seed1;
00119   IndexType m_Seed2;
00120   OutputImagePixelType m_ReplaceValue1;
00121   OutputImagePixelType m_ReplaceValue2;
00122 
00123   typename GradientMagnitudeType::Pointer m_GradientMagnitude;
00124   typename WatershedType::Pointer m_Watershed;
00125 
00126   double m_Threshold;
00127   double m_IsolatedValue;
00128   double m_IsolatedValueTolerance;
00129   double m_UpperValueLimit;
00130 
00131   // Override since the filter needs all the data for the algorithm
00132   void GenerateInputRequestedRegion();
00133 
00134   // Override since the filter produces the entire dataset
00135   void EnlargeOutputRequestedRegion(DataObject *output);
00136 
00137   void GenerateData();
00138   
00139 private:
00140   IsolatedWatershedImageFilter(const Self&); //purposely not implemented
00141   void operator=(const Self&); //purposely not implemented
00142 
00143 };
00144 
00145 } // end namespace itk
00146 
00147 #ifndef ITK_MANUAL_INSTANTIATION
00148 #include "itkIsolatedWatershedImageFilter.txx"
00149 #endif
00150 
00151 #endif
00152 

Generated at Tue Jul 29 20:57:49 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000