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);
00088 
00091   itkSetMacro(IsolatedValueTolerance, double);
00092   itkGetMacro(IsolatedValueTolerance, double);
00093 
00096   itkSetMacro(UpperValueLimit, double);
00097   itkGetMacro(UpperValueLimit, double);
00098 
00099 
00103   itkSetMacro(ReplaceValue1, OutputImagePixelType);
00104   itkGetMacro(ReplaceValue1, OutputImagePixelType);
00105   itkSetMacro(ReplaceValue2, OutputImagePixelType);
00106   itkGetMacro(ReplaceValue2, OutputImagePixelType);
00107 
00109   itkGetMacro(IsolatedValue, double);
00110 
00111 protected:
00112   IsolatedWatershedImageFilter();
00113   ~IsolatedWatershedImageFilter(){};
00114   IndexType m_Seed1;
00115   IndexType m_Seed2;
00116   OutputImagePixelType m_ReplaceValue1;
00117   OutputImagePixelType m_ReplaceValue2;
00118 
00119   typename GradientMagnitudeType::Pointer m_GradientMagnitude;
00120   typename WatershedType::Pointer m_Watershed;
00121 
00122   double m_Threshold;
00123   double m_IsolatedValue;
00124   double m_IsolatedValueTolerance;
00125   double m_UpperValueLimit;
00126 
00127   // Override since the filter needs all the data for the algorithm
00128   void GenerateInputRequestedRegion();
00129 
00130   // Override since the filter produces the entire dataset
00131   void EnlargeOutputRequestedRegion(DataObject *output);
00132 
00133   void GenerateData();
00134   
00135 private:
00136   IsolatedWatershedImageFilter(const Self&); //purposely not implemented
00137   void operator=(const Self&); //purposely not implemented
00138 
00139 };
00140 
00141 } // end namespace itk
00142 
00143 #ifndef ITK_MANUAL_INSTANTIATION
00144 #include "itkIsolatedWatershedImageFilter.txx"
00145 #endif
00146 
00147 #endif

Generated at Wed May 24 23:30:12 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000