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<
00051 TInputImage, TOutputImage, TOperatorValueType > Superclass;
00052 typedef SmartPointer<Self> Pointer;
00053 typedef SmartPointer<const Self> ConstPointer;
00054
00056 itkNewMacro(Self);
00057
00059 itkTypeMacro(NormalizedCorrelationImageFilter, NeighborhoodOperatorImageFilter);
00060
00063 typedef typename TOutputImage::PixelType OutputPixelType;
00064 typedef typename TOutputImage::InternalPixelType OutputInternalPixelType;
00065 typedef typename TInputImage::PixelType InputPixelType;
00066 typedef typename TInputImage::InternalPixelType InputInternalPixelType;
00067 typedef typename TMaskImage::PixelType MaskPixelType;
00068 typedef typename TMaskImage::InternalPixelType MaskInternalPixelType;
00069
00072 itkStaticConstMacro(InputImageDimension, unsigned int,
00073 TInputImage::ImageDimension);
00074 itkStaticConstMacro(ImageDimension, unsigned int,
00075 TOutputImage::ImageDimension);
00076 itkStaticConstMacro(MaskImageDimension, unsigned int,
00077 TMaskImage::ImageDimension);
00079
00081 typedef TInputImage InputImageType;
00082 typedef TMaskImage MaskImageType;
00083 typedef TOutputImage OutputImageType;
00084 typedef typename InputImageType::Pointer InputImagePointer;
00085 typedef typename MaskImageType::Pointer MaskImagePointer;
00086
00088 typedef ImageBoundaryCondition<OutputImageType> *ImageBoundaryConditionPointerType;
00089
00091 typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
00092 typedef typename Superclass::OperatorValueType OperatorValueType;
00093
00095 typedef typename Superclass::OutputNeighborhoodType OutputNeighborhoodType;
00096
00100 void SetMaskImage( const TMaskImage* mask);
00101
00105 const TMaskImage* GetMaskImage() const;
00106
00110 void SetTemplate(const OutputNeighborhoodType &t)
00111 {
00112 this->SetOperator(t);
00113 }
00114
00115 #ifdef ITK_USE_CONCEPT_CHECKING
00116
00117 itkConceptMacro(SameDimensionCheck,
00118 (Concept::SameDimension<InputImageDimension, MaskImageDimension>));
00119 itkConceptMacro(OutputHasNumericTraitsCheck,
00120 (Concept::HasNumericTraits<OutputPixelType>));
00121 itkConceptMacro(OperatorHasNumericTraitsCheck,
00122 (Concept::HasNumericTraits<OperatorValueType>));
00123
00125 #endif
00126
00127 protected:
00128 NormalizedCorrelationImageFilter() {}
00129 virtual ~NormalizedCorrelationImageFilter() {}
00130
00136 void GenerateInputRequestedRegion() throw (InvalidRequestedRegionError);
00137
00149 void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00150 int threadId );
00151
00153 void PrintSelf(std::ostream& os, Indent indent) const
00154 { Superclass::PrintSelf(os, indent); }
00155
00156 private:
00157 NormalizedCorrelationImageFilter(const Self&);
00158 void operator=(const Self&);
00159
00160 };
00161
00162 }
00163
00164 #ifndef ITK_MANUAL_INSTANTIATION
00165 #include "itkNormalizedCorrelationImageFilter.txx"
00166 #endif
00167
00168 #endif
00169