Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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
00133 void GenerateInputRequestedRegion();
00134
00135
00136 void EnlargeOutputRequestedRegion(DataObject *output);
00137
00138 void GenerateData();
00139
00140 private:
00141 IsolatedWatershedImageFilter(const Self&);
00142 void operator=(const Self&);
00143
00144 };
00145
00146 }
00147
00148 #ifndef ITK_MANUAL_INSTANTIATION
00149 #include "itkIsolatedWatershedImageFilter.txx"
00150 #endif
00151
00152 #endif
00153