00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkNormalizedCorrelationImageFilter_h
00018 #define __itkNormalizedCorrelationImageFilter_h
00019
00020 #include "itkNeighborhoodOperatorImageFilter.h"
00021
00022 namespace itk
00023 {
00043 template <class TInputImage, class TMaskImage, class TOutputImage, class TOperatorValueType=ITK_TYPENAME TOutputImage::PixelType>
00044 class ITK_EXPORT NormalizedCorrelationImageFilter :
00045 public NeighborhoodOperatorImageFilter< TInputImage, TOutputImage, TOperatorValueType >
00046 {
00047 public:
00049 typedef NormalizedCorrelationImageFilter Self;
00050 typedef NeighborhoodOperatorImageFilter< TInputImage, TOutputImage, TOperatorValueType > Superclass;
00051 typedef SmartPointer<Self> Pointer;
00052 typedef SmartPointer<const Self> ConstPointer;
00053
00055 itkNewMacro(Self);
00056
00058 itkTypeMacro(NormalizedCorrelationImageFilter, NeighborhoodOperatorImageFilter);
00059
00062 typedef typename TOutputImage::PixelType OutputPixelType;
00063 typedef typename TOutputImage::InternalPixelType OutputInternalPixelType;
00064 typedef typename TInputImage::PixelType InputPixelType;
00065 typedef typename TInputImage::InternalPixelType InputInternalPixelType;
00066 typedef typename TMaskImage::PixelType MaskPixelType;
00067 typedef typename TMaskImage::InternalPixelType MaskInternalPixelType;
00068
00071 itkStaticConstMacro(ImageDimension, unsigned int,
00072 TOutputImage::ImageDimension);
00073
00075 typedef TInputImage InputImageType;
00076 typedef TMaskImage MaskImageType;
00077 typedef TOutputImage OutputImageType;
00078 typedef typename InputImageType::Pointer InputImagePointer;
00079 typedef typename MaskImageType::Pointer MaskImagePointer;
00080
00082 typedef ImageBoundaryCondition<OutputImageType> *
00083 ImageBoundaryConditionPointerType;
00084
00086 typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
00087 typedef typename Superclass::OperatorValueType OperatorValueType;
00088
00090 typedef typename Superclass::OutputNeighborhoodType OutputNeighborhoodType;
00091
00095 void SetMaskImage( const TMaskImage* mask);
00096
00100 const TMaskImage* GetMaskImage() const;
00101
00105 void SetTemplate(const OutputNeighborhoodType &t)
00106 {
00107 this->SetOperator(t);
00108 }
00109
00110 protected:
00111 NormalizedCorrelationImageFilter() {}
00112 virtual ~NormalizedCorrelationImageFilter() {}
00113
00119 void GenerateInputRequestedRegion() throw (InvalidRequestedRegionError);
00120
00132 void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00133 int threadId );
00134
00136 void PrintSelf(std::ostream& os, Indent indent) const
00137 { Superclass::PrintSelf(os, indent); }
00138
00139 private:
00140 NormalizedCorrelationImageFilter(const Self&);
00141 void operator=(const Self&);
00142
00143 };
00144
00145 }
00146
00147 #ifndef ITK_MANUAL_INSTANTIATION
00148 #include "itkNormalizedCorrelationImageFilter.txx"
00149 #endif
00150
00151 #endif
00152