ITK  4.2.0
Insight Segmentation and Registration Toolkit
itkNormalizedCorrelationImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef __itkNormalizedCorrelationImageFilter_h
19 #define __itkNormalizedCorrelationImageFilter_h
20 
22 
23 namespace itk
24 {
49 template< class TInputImage, class TMaskImage, class TOutputImage, class TOperatorValueType =
50  typename TOutputImage::PixelType >
52  public NeighborhoodOperatorImageFilter< TInputImage, TOutputImage, TOperatorValueType >
53 {
54 public:
58  TInputImage, TOutputImage, TOperatorValueType > Superclass;
59 
62 
64  itkNewMacro(Self);
65 
68 
71  typedef typename TOutputImage::PixelType OutputPixelType;
72  typedef typename TOutputImage::InternalPixelType OutputInternalPixelType;
73  typedef typename TInputImage::PixelType InputPixelType;
74  typedef typename TInputImage::InternalPixelType InputInternalPixelType;
75  typedef typename TMaskImage::PixelType MaskPixelType;
76  typedef typename TMaskImage::InternalPixelType MaskInternalPixelType;
77 
80  itkStaticConstMacro(InputImageDimension, unsigned int,
81  TInputImage::ImageDimension);
82  itkStaticConstMacro(ImageDimension, unsigned int,
83  TOutputImage::ImageDimension);
84  itkStaticConstMacro(MaskImageDimension, unsigned int,
85  TMaskImage::ImageDimension);
87 
89  typedef TInputImage InputImageType;
90  typedef TMaskImage MaskImageType;
91  typedef TOutputImage OutputImageType;
92  typedef typename InputImageType::Pointer InputImagePointer;
93  typedef typename MaskImageType::Pointer MaskImagePointer;
94 
97 
99  typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
100  typedef typename Superclass::OperatorValueType OperatorValueType;
101 
103  typedef typename Superclass::OutputNeighborhoodType OutputNeighborhoodType;
104 
108  void SetMaskImage(const TMaskImage *mask);
109 
113  const TMaskImage * GetMaskImage() const;
114 
118  void SetTemplate(const OutputNeighborhoodType & t)
119  {
120  this->SetOperator(t);
121  }
122 
123 #ifdef ITK_USE_CONCEPT_CHECKING
124 
125  itkConceptMacro( SameDimensionCheck,
127  itkConceptMacro( OutputHasNumericTraitsCheck,
129  itkConceptMacro( OperatorHasNumericTraitsCheck,
131  // This filter can only operate on data types that are signed.
132  itkConceptMacro( SignedOutputPixelType,
134 
136 #endif
137 protected:
141 
147  void GenerateInputRequestedRegion()
148  throw ( InvalidRequestedRegionError );
149 
161  void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread,
162  ThreadIdType threadId);
163 
165  void PrintSelf(std::ostream & os, Indent indent) const
166  { Superclass::PrintSelf(os, indent); }
167 private:
168  NormalizedCorrelationImageFilter(const Self &); //purposely not implemented
169  void operator=(const Self &); //purposely not implemented
170 };
171 } // end namespace itk
173 
174 #ifndef ITK_MANUAL_INSTANTIATION
175 #include "itkNormalizedCorrelationImageFilter.hxx"
176 #endif
177 
178 #endif
179