00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkVectorNeighborhoodOperatorImageFilter_h
00018 #define __itkVectorNeighborhoodOperatorImageFilter_h
00019
00020 #include "itkImageToImageFilter.h"
00021 #include "itkNeighborhoodOperator.h"
00022 #include "itkImage.h"
00023 #include "itkImageBoundaryCondition.h"
00024
00025 namespace itk
00026 {
00055 template <class TInputImage, class TOutputImage>
00056 class ITK_EXPORT VectorNeighborhoodOperatorImageFilter :
00057 public ImageToImageFilter< TInputImage, TOutputImage >
00058 {
00059 public:
00061 typedef VectorNeighborhoodOperatorImageFilter Self;
00062 typedef ImageToImageFilter< TInputImage, TOutputImage > Superclass;
00063 typedef SmartPointer<Self> Pointer;
00064 typedef SmartPointer<const Self> ConstPointer;
00065
00067 itkNewMacro(Self);
00068
00070 itkTypeMacro(VectorNeighborhoodOperatorImageFilter, ImageToImageFilter);
00071
00074 typedef typename TInputImage::Pointer InputImagePointer;
00075 typedef typename TOutputImage::Pointer OutputImagePointer;
00076 typedef typename TOutputImage::PixelType OutputPixelType;
00077 typedef typename TOutputImage::InternalPixelType OutputInternalPixelType;
00078 typedef typename TInputImage::PixelType InputPixelType;
00079 typedef typename TInputImage::InternalPixelType InputInternalPixelType;
00080 typedef typename OutputPixelType::ValueType ScalarValueType;
00081
00083 itkStaticConstMacro(ImageDimension, unsigned int,
00084 TOutputImage::ImageDimension );
00085
00087 typedef TInputImage InputImageType;
00088 typedef TOutputImage OutputImageType;
00089
00091 typedef ImageBoundaryCondition<OutputImageType> *
00092 ImageBoundaryConditionPointerType;
00093
00095 typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
00096
00100 void SetOperator(const Neighborhood<ScalarValueType,
00101 itkGetStaticConstMacro(ImageDimension)> &p)
00102 {
00103 m_Operator = p;
00104 this->Modified();
00105 }
00107
00113 void OverrideBoundaryCondition(const ImageBoundaryConditionPointerType i)
00114 { m_BoundsCondition = i; }
00115
00123 virtual void GenerateInputRequestedRegion() throw (InvalidRequestedRegionError);
00124
00125 #ifdef ITK_USE_CONCEPT_CHECKING
00126
00127 itkConceptMacro(InputHasNumericTraitsCheck,
00128 (Concept::HasNumericTraits<typename TInputImage::PixelType::ValueType>));
00129 itkConceptMacro(OutputHasNumericTraitsCheck,
00130 (Concept::HasNumericTraits<typename TOutputImage::PixelType::ValueType>));
00131
00133 #endif
00134
00135 protected:
00136 VectorNeighborhoodOperatorImageFilter() {}
00137 virtual ~VectorNeighborhoodOperatorImageFilter() {}
00138
00149 void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00150 int threadId );
00151
00152 void PrintSelf(std::ostream& os, Indent indent) const
00153 { Superclass::PrintSelf(os,indent); }
00154 private:
00155 VectorNeighborhoodOperatorImageFilter(const Self&);
00156 void operator=(const Self&);
00157
00159 Neighborhood<ScalarValueType, itkGetStaticConstMacro(ImageDimension)> m_Operator;
00160
00163 ImageBoundaryConditionPointerType m_BoundsCondition;
00164
00165 };
00166
00167 }
00168
00169 #ifndef ITK_MANUAL_INSTANTIATION
00170 #include "itkVectorNeighborhoodOperatorImageFilter.txx"
00171 #endif
00172
00173 #endif
00174