00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkGrayscaleGeodesicErodeImageFilter_h
00018 #define __itkGrayscaleGeodesicErodeImageFilter_h
00019
00020 #include "itkImageToImageFilter.h"
00021
00022 namespace itk {
00023
00062 template<class TInputImage, class TOutputImage>
00063 class ITK_EXPORT GrayscaleGeodesicErodeImageFilter :
00064 public ImageToImageFilter<TInputImage, TOutputImage>
00065 {
00066 public:
00068 typedef GrayscaleGeodesicErodeImageFilter Self;
00069 typedef ImageToImageFilter<TInputImage, TOutputImage>
00070 Superclass;
00071 typedef SmartPointer<Self> Pointer;
00072 typedef SmartPointer<const Self> ConstPointer;
00073
00075 typedef TInputImage MarkerImageType;
00076 typedef TInputImage MaskImageType;
00077 typedef TOutputImage OutputImageType;
00078 typedef typename MarkerImageType::Pointer MarkerImagePointer;
00079 typedef typename MarkerImageType::ConstPointer MarkerImageConstPointer;
00080 typedef typename MarkerImageType::RegionType MarkerImageRegionType;
00081 typedef typename MarkerImageType::PixelType MarkerImagePixelType;
00082 typedef typename MaskImageType::Pointer MaskImagePointer;
00083 typedef typename MaskImageType::ConstPointer MaskImageConstPointer;
00084 typedef typename MaskImageType::RegionType MaskImageRegionType;
00085 typedef typename MaskImageType::PixelType MaskImagePixelType;
00086 typedef typename OutputImageType::Pointer OutputImagePointer;
00087 typedef typename OutputImageType::ConstPointer OutputImageConstPointer;
00088 typedef typename OutputImageType::RegionType OutputImageRegionType;
00089 typedef typename OutputImageType::PixelType OutputImagePixelType;
00090
00092 itkStaticConstMacro(MarkerImageDimension, unsigned int,
00093 TInputImage::ImageDimension);
00094 itkStaticConstMacro(MaskImageDimension, unsigned int,
00095 TInputImage::ImageDimension);
00096 itkStaticConstMacro(OutputImageDimension, unsigned int,
00097 TOutputImage::ImageDimension);
00098
00100 itkNewMacro(Self);
00101
00103 itkTypeMacro(GrayscaleGeodesicErodeImageFilter,
00104 ImageToImageFilter);
00105
00109 void SetMarkerImage(const MarkerImageType *);
00110 const MarkerImageType* GetMarkerImage();
00111
00115 void SetMaskImage(const MaskImageType *);
00116 const MaskImageType* GetMaskImage();
00117
00121 itkSetMacro(RunOneIteration, bool);
00122 itkGetMacro(RunOneIteration, bool);
00123 itkBooleanMacro(RunOneIteration);
00124
00127 itkGetMacro(NumberOfIterationsUsed, unsigned long);
00128
00135 itkSetMacro(FullyConnected, bool);
00136 itkGetConstReferenceMacro(FullyConnected, bool);
00137 itkBooleanMacro(FullyConnected);
00138
00139 protected:
00140 GrayscaleGeodesicErodeImageFilter();
00141 ~GrayscaleGeodesicErodeImageFilter() {};
00142 void PrintSelf(std::ostream& os, Indent indent) const;
00143
00150 void GenerateInputRequestedRegion();
00151
00156 void EnlargeOutputRequestedRegion(DataObject *itkNotUsed(output));
00157
00164 void GenerateData();
00165
00170 void ThreadedGenerateData (const OutputImageRegionType&
00171 outputRegionForThread,
00172 int threadId) ;
00173
00174 private:
00175 GrayscaleGeodesicErodeImageFilter(const Self&);
00176 void operator=(const Self&);
00177
00178 bool m_RunOneIteration;
00179 unsigned long m_NumberOfIterationsUsed;
00180 bool m_FullyConnected;
00181
00182 } ;
00183
00184 }
00185
00186 #ifndef ITK_MANUAL_INSTANTIATION
00187 #include "itkGrayscaleGeodesicErodeImageFilter.txx"
00188 #endif
00189
00190 #endif
00191
00192