00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkConfidenceConnectedImageFilter_h
00018 #define __itkConfidenceConnectedImageFilter_h
00019
00020 #include "itkImage.h"
00021 #include "itkImageToImageFilter.h"
00022
00023 namespace itk{
00024
00056 template <class TInputImage, class TOutputImage>
00057 class ConfidenceConnectedImageFilter:
00058 public ImageToImageFilter<TInputImage,TOutputImage>
00059 {
00060 public:
00062 typedef ConfidenceConnectedImageFilter Self;
00063 typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass;
00064 typedef SmartPointer<Self> Pointer;
00065 typedef SmartPointer<const Self> ConstPointer;
00066
00068 itkNewMacro(Self);
00069
00071 itkTypeMacro(ConfidenceConnectedImageFilter,
00072 ImageToImageFilter);
00073
00074 typedef TInputImage InputImageType;
00075 typedef typename InputImageType::Pointer InputImagePointer;
00076 typedef typename InputImageType::RegionType InputImageRegionType;
00077 typedef typename InputImageType::PixelType InputImagePixelType;
00078 typedef typename InputImageType::IndexType IndexType;
00079 typedef typename InputImageType::SizeType SizeType;
00080
00081 typedef TOutputImage OutputImageType;
00082 typedef typename OutputImageType::Pointer OutputImagePointer;
00083 typedef typename OutputImageType::RegionType OutputImageRegionType;
00084 typedef typename OutputImageType::PixelType OutputImagePixelType;
00085
00086 void PrintSelf ( std::ostream& os, Indent indent ) const;
00087
00089 void SetSeed(const IndexType & seed)
00090 {
00091 if ( m_Seed != seed )
00092 {
00093 m_Seed = seed;
00094 this->Modified();
00095 }
00096 };
00097
00100 itkSetMacro(Multiplier, double);
00101 itkGetMacro(Multiplier, double);
00102
00104 itkSetMacro(NumberOfIterations, unsigned int);
00105 itkGetMacro(NumberOfIterations, unsigned int);
00106
00108 itkSetMacro(ReplaceValue, OutputImagePixelType);
00109 itkGetMacro(ReplaceValue, OutputImagePixelType);
00110
00113 itkSetMacro( InitialNeighborhoodRadius, unsigned int );
00114 itkGetConstReferenceMacro( InitialNeighborhoodRadius, unsigned int );
00115
00116 protected:
00117 ConfidenceConnectedImageFilter();
00118 ~ConfidenceConnectedImageFilter(){};
00119
00120
00121 void GenerateInputRequestedRegion();
00122
00123
00124 void EnlargeOutputRequestedRegion(DataObject *output);
00125
00126 void GenerateData();
00127
00128 private:
00129 ConfidenceConnectedImageFilter(const Self&);
00130 void operator=(const Self&);
00131
00132 IndexType m_Seed;
00133 double m_Multiplier;
00134 unsigned int m_NumberOfIterations;
00135 OutputImagePixelType m_ReplaceValue;
00136 unsigned int m_InitialNeighborhoodRadius;
00137 };
00138
00139
00140 }
00141
00142 #ifndef ITK_MANUAL_INSTANTIATION
00143 #include "itkConfidenceConnectedImageFilter.txx"
00144 #endif
00145
00146 #endif