00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkRegionalMaximaImageFilter_h
00018 #define __itkRegionalMaximaImageFilter_h
00019
00020 #include "itkImageToImageFilter.h"
00021 #include "itkConceptChecking.h"
00022
00023 namespace itk {
00024
00047 template<class TInputImage, class TOutputImage>
00048 class ITK_EXPORT RegionalMaximaImageFilter :
00049 public ImageToImageFilter<TInputImage, TOutputImage>
00050 {
00051 public:
00053 typedef RegionalMaximaImageFilter Self;
00054
00055 typedef ImageToImageFilter<TInputImage, TOutputImage> Superclass;
00056
00057 typedef SmartPointer<Self> Pointer;
00058 typedef SmartPointer<const Self> ConstPointer;
00059
00061 typedef TInputImage InputImageType;
00062 typedef TOutputImage OutputImageType;
00063 typedef typename InputImageType::Pointer InputImagePointer;
00064 typedef typename InputImageType::ConstPointer InputImageConstPointer;
00065 typedef typename InputImageType::RegionType InputImageRegionType;
00066 typedef typename InputImageType::PixelType InputImagePixelType;
00067 typedef typename OutputImageType::Pointer OutputImagePointer;
00068 typedef typename OutputImageType::ConstPointer OutputImageConstPointer;
00069 typedef typename OutputImageType::RegionType OutputImageRegionType;
00070 typedef typename OutputImageType::PixelType OutputImagePixelType;
00071
00073 itkStaticConstMacro(InputImageDimension, unsigned int,
00074 TInputImage::ImageDimension);
00075 itkStaticConstMacro(OutputImageDimension, unsigned int,
00076 TOutputImage::ImageDimension);
00078
00080 itkNewMacro(Self);
00081
00083 itkTypeMacro(RegionalMaximaImageFilter, ImageToImageFilter);
00084
00091 itkSetMacro(FullyConnected, bool);
00092 itkGetConstMacro(FullyConnected, bool);
00093 itkBooleanMacro(FullyConnected);
00095
00100 itkSetMacro(ForegroundValue, OutputImagePixelType);
00101 itkGetConstMacro(ForegroundValue, OutputImagePixelType);
00103
00108 itkSetMacro(BackgroundValue, OutputImagePixelType);
00109 itkGetConstMacro(BackgroundValue, OutputImagePixelType);
00111
00116 itkSetMacro(FlatIsMaxima, bool);
00117 itkGetConstMacro(FlatIsMaxima, bool);
00118 itkBooleanMacro(FlatIsMaxima);
00120
00121 #ifdef ITK_USE_CONCEPT_CHECKING
00122
00123 itkConceptMacro(InputHasPixelTraitsCheck,
00124 (Concept::HasPixelTraits<InputImagePixelType>));
00125 itkConceptMacro(InputHasNumericTraitsCheck,
00126 (Concept::HasNumericTraits<InputImagePixelType>));
00127
00129 #endif
00130
00131
00132 protected:
00133 RegionalMaximaImageFilter();
00134 ~RegionalMaximaImageFilter() {};
00135 void PrintSelf(std::ostream& os, Indent indent) const;
00136
00140 void GenerateInputRequestedRegion();
00141
00143 void EnlargeOutputRequestedRegion(DataObject *itkNotUsed(output));
00144
00147 void GenerateData();
00148
00149
00150 private:
00151 RegionalMaximaImageFilter(const Self&);
00152 void operator=(const Self&);
00153
00154 bool m_FullyConnected;
00155 bool m_FlatIsMaxima;
00156 OutputImagePixelType m_ForegroundValue;
00157 OutputImagePixelType m_BackgroundValue;
00158
00159 };
00160
00161 }
00162
00163 #ifndef ITK_MANUAL_INSTANTIATION
00164 #include "itkRegionalMaximaImageFilter.txx"
00165 #endif
00166
00167 #endif
00168