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: 2010-02-26 05:28:24 $
00007   Version:   $Revision: 1.6 $
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 {
00027 
00041 template <class TInputImage, class TOutputImage>
00042 class ITK_EXPORT IsolatedWatershedImageFilter:
00043     public ImageToImageFilter<TInputImage,TOutputImage>
00044 {
00045 public:
00047   typedef IsolatedWatershedImageFilter                 Self;
00048   typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass;
00049   typedef SmartPointer<Self>                           Pointer;
00050   typedef SmartPointer<const Self>                     ConstPointer;
00051 
00053   itkNewMacro(Self);
00054 
00056   itkTypeMacro(IsolatedWatershedImageFilter,
00057                ImageToImageFilter);
00058 
00059   typedef TInputImage                           InputImageType;
00060   typedef typename InputImageType::Pointer      InputImagePointer;
00061   typedef typename InputImageType::ConstPointer InputImageConstPointer;
00062   typedef typename InputImageType::RegionType   InputImageRegionType; 
00063   typedef typename InputImageType::PixelType    InputImagePixelType; 
00064   typedef typename InputImageType::IndexType    IndexType;
00065   typedef typename InputImageType::SizeType     SizeType;
00066   
00067   typedef TOutputImage                         OutputImageType;
00068   typedef typename OutputImageType::Pointer    OutputImagePointer;
00069   typedef typename OutputImageType::RegionType OutputImageRegionType; 
00070   typedef typename OutputImageType::PixelType  OutputImagePixelType; 
00071   
00072   typedef WatershedImageFilter<InputImageType>                         WatershedType;
00073   typedef GradientMagnitudeImageFilter<InputImageType,OutputImageType> GradientMagnitudeType;
00074   void PrintSelf ( std::ostream& os, Indent indent ) const;
00075 
00079   itkSetMacro(Seed1, IndexType);
00080 
00084   itkSetMacro(Seed2, IndexType);
00085 
00087   itkSetMacro(Threshold, double);
00088   itkGetConstMacro(Threshold, double);
00090 
00093   itkSetMacro(IsolatedValueTolerance, double);
00094   itkGetConstMacro(IsolatedValueTolerance, double);
00096 
00099   itkSetMacro(UpperValueLimit, double);
00100   itkGetConstMacro(UpperValueLimit, double);
00102 
00103 
00107   itkSetMacro(ReplaceValue1, OutputImagePixelType);
00108   itkGetConstMacro(ReplaceValue1, OutputImagePixelType);
00109   itkSetMacro(ReplaceValue2, OutputImagePixelType);
00110   itkGetConstMacro(ReplaceValue2, OutputImagePixelType);
00112 
00114   itkGetConstMacro(IsolatedValue, double);
00115 
00116 protected:
00117   IsolatedWatershedImageFilter();
00118   ~IsolatedWatershedImageFilter(){};
00119   IndexType            m_Seed1;
00120   IndexType            m_Seed2;
00121   OutputImagePixelType m_ReplaceValue1;
00122   OutputImagePixelType m_ReplaceValue2;
00123 
00124   typename GradientMagnitudeType::Pointer m_GradientMagnitude;
00125   typename WatershedType::Pointer         m_Watershed;
00126 
00127   double m_Threshold;
00128   double m_IsolatedValue;
00129   double m_IsolatedValueTolerance;
00130   double m_UpperValueLimit;
00131 
00132   // Override since the filter needs all the data for the algorithm
00133   void GenerateInputRequestedRegion();
00134 
00135   // Override since the filter produces the entire dataset
00136   void EnlargeOutputRequestedRegion(DataObject *output);
00137 
00138   void GenerateData();
00139   
00140 private:
00141   IsolatedWatershedImageFilter(const Self&); //purposely not implemented
00142   void operator=(const Self&); //purposely not implemented
00143 
00144 };
00145 
00146 } // end namespace itk
00147 
00148 #ifndef ITK_MANUAL_INSTANTIATION
00149 #include "itkIsolatedWatershedImageFilter.txx"
00150 #endif
00151 
00152 #endif
00153 

Generated at Mon Jul 12 2010 18:52:58 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000