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);
00099
00101 itkNewMacro(Self);
00102
00104 itkTypeMacro(GrayscaleGeodesicErodeImageFilter,
00105 ImageToImageFilter);
00106
00110 void SetMarkerImage(const MarkerImageType *);
00111 const MarkerImageType* GetMarkerImage();
00113
00117 void SetMaskImage(const MaskImageType *);
00118 const MaskImageType* GetMaskImage();
00120
00124 itkSetMacro(RunOneIteration, bool);
00125 itkGetMacro(RunOneIteration, bool);
00126 itkBooleanMacro(RunOneIteration);
00128
00131 itkGetMacro(NumberOfIterationsUsed, unsigned long);
00132
00139 itkSetMacro(FullyConnected, bool);
00140 itkGetConstReferenceMacro(FullyConnected, bool);
00141 itkBooleanMacro(FullyConnected);
00143
00144 #ifdef ITK_USE_CONCEPT_CHECKING
00145
00146 itkConceptMacro(SameDimensionCheck,
00147 (Concept::SameDimension<MarkerImageDimension, OutputImageDimension>));
00148 itkConceptMacro(InputComparableCheck,
00149 (Concept::Comparable<MarkerImagePixelType>));
00150 itkConceptMacro(InputConvertibleToOutputCheck,
00151 (Concept::Convertible<MarkerImagePixelType, OutputImagePixelType>));
00152
00154 #endif
00155
00156 protected:
00157 GrayscaleGeodesicErodeImageFilter();
00158 ~GrayscaleGeodesicErodeImageFilter() {};
00159 void PrintSelf(std::ostream& os, Indent indent) const;
00160
00167 void GenerateInputRequestedRegion();
00168
00173 void EnlargeOutputRequestedRegion(DataObject *itkNotUsed(output));
00174
00181 void GenerateData();
00182
00187 void ThreadedGenerateData (const OutputImageRegionType&
00188 outputRegionForThread,
00189 int threadId) ;
00190
00191 private:
00192 GrayscaleGeodesicErodeImageFilter(const Self&);
00193 void operator=(const Self&);
00194
00195 bool m_RunOneIteration;
00196 unsigned long m_NumberOfIterationsUsed;
00197 bool m_FullyConnected;
00198
00199 } ;
00200
00201 }
00202
00203 #ifndef ITK_MANUAL_INSTANTIATION
00204 #include "itkGrayscaleGeodesicErodeImageFilter.txx"
00205 #endif
00206
00207 #endif
00208
00209
00210