itkValuedRegionalExtremaImageFilter.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __itkValuedRegionalExtremaImageFilter_h
00019 #define __itkValuedRegionalExtremaImageFilter_h
00020
00021 #include "itkImageToImageFilter.h"
00022 #include "itkConstShapedNeighborhoodIterator.h"
00023 #include "itkShapedNeighborhoodIterator.h"
00024 #include "itkConstantBoundaryCondition.h"
00025 #include "itkConceptChecking.h"
00026 #include <stack>
00027
00028 namespace itk {
00029
00071 template<class TInputImage, class TOutputImage,
00072 class TFunction1, class TFunction2>
00073 class ITK_EXPORT ValuedRegionalExtremaImageFilter :
00074 public ImageToImageFilter<TInputImage, TOutputImage>
00075 {
00076 public:
00078 typedef ValuedRegionalExtremaImageFilter Self;
00079
00080 typedef ImageToImageFilter<TInputImage, TOutputImage>
00081 Superclass;
00082
00083 typedef SmartPointer<Self> Pointer;
00084 typedef SmartPointer<const Self> ConstPointer;
00085
00087 typedef TInputImage InputImageType;
00088 typedef TOutputImage OutputImageType;
00089 typedef typename InputImageType::Pointer InputImagePointer;
00090 typedef typename InputImageType::ConstPointer InputImageConstPointer;
00091 typedef typename InputImageType::RegionType InputImageRegionType;
00092 typedef typename InputImageType::PixelType InputImagePixelType;
00093 typedef typename InputImageType::SizeType ISizeType;
00094 typedef typename OutputImageType::Pointer OutputImagePointer;
00095 typedef typename OutputImageType::ConstPointer OutputImageConstPointer;
00096 typedef typename OutputImageType::RegionType OutputImageRegionType;
00097 typedef typename OutputImageType::PixelType OutputImagePixelType;
00098
00100 itkStaticConstMacro(InputImageDimension, unsigned int,
00101 TInputImage::ImageDimension);
00102 itkStaticConstMacro(OutputImageDimension, unsigned int,
00103 TOutputImage::ImageDimension);
00105
00107 itkNewMacro(Self);
00108
00110 itkTypeMacro(ValuedRegionalExtremaImageFilter,
00111 ImageToImageFilter);
00112
00113
00120 itkSetMacro(FullyConnected, bool);
00121 itkGetConstReferenceMacro(FullyConnected, bool);
00122 itkBooleanMacro(FullyConnected);
00124
00128 itkSetMacro(MarkerValue, typename TInputImage::PixelType);
00129 itkGetConstReferenceMacro(MarkerValue, typename TInputImage::PixelType);
00131
00135 itkGetConstMacro(Flat, bool);
00136
00137 #ifdef ITK_USE_CONCEPT_CHECKING
00138
00139 itkConceptMacro(InputHasPixelTraitsCheck,
00140 (Concept::HasPixelTraits<InputImagePixelType>));
00141 itkConceptMacro(InputHasNumericTraitsCheck,
00142 (Concept::HasNumericTraits<InputImagePixelType>));
00143
00145 #endif
00146
00147 protected:
00148 ValuedRegionalExtremaImageFilter();
00149 ~ValuedRegionalExtremaImageFilter() {};
00150 void PrintSelf(std::ostream& os, Indent indent) const;
00151
00155 void GenerateInputRequestedRegion();
00156
00158 void EnlargeOutputRequestedRegion(DataObject *itkNotUsed(output));
00159
00160 void GenerateData();
00161
00162
00163 private:
00164 ValuedRegionalExtremaImageFilter(const Self&);
00165 void operator=(const Self&);
00166
00167 typename TInputImage::PixelType m_MarkerValue;
00168 bool m_FullyConnected;
00169 bool m_Flat;
00170
00171 typedef typename OutputImageType::IndexType OutIndexType;
00172 typedef typename InputImageType::IndexType InIndexType;
00173 typedef ConstShapedNeighborhoodIterator<InputImageType> ConstInputIterator;
00174 typedef ShapedNeighborhoodIterator<OutputImageType> NOutputIterator;
00175 typedef std::stack<OutIndexType> IndexStack;
00176
00177 };
00178
00179 }
00180
00181 #ifndef ITK_MANUAL_INSTANTIATION
00182 #include "itkValuedRegionalExtremaImageFilter.txx"
00183 #endif
00184
00185 #endif
00186