ITK  4.8.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< typename TInputImage, typename TMaskImage, typename TOutputImage, typename 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 
101 
104 
108  void SetMaskImage(const TMaskImage *mask);
109 
113  const TMaskImage * GetMaskImage() const;
114 
119  {
120  this->SetOperator(t);
121  }
122 
123 #ifdef ITK_USE_CONCEPT_CHECKING
124  // Begin concept checking
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  // End concept checking
135 #endif
136 
137 protected:
140 
146  void GenerateInputRequestedRegion() ITK_OVERRIDE;
147 
159  void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread,
160  ThreadIdType threadId) ITK_OVERRIDE;
161 
163  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE
164  { Superclass::PrintSelf(os, indent); }
165 
166 private:
167  NormalizedCorrelationImageFilter(const Self &); //purposely not implemented
168  void operator=(const Self &); //purposely not implemented
169 };
170 } // end namespace itk
171 
172 #ifndef ITK_MANUAL_INSTANTIATION
173 #include "itkNormalizedCorrelationImageFilter.hxx"
174 #endif
175 
176 #endif
Superclass::OutputNeighborhoodType OutputNeighborhoodType
Superclass::OutputImageRegionType OutputImageRegionType
void PrintSelf(std::ostream &os, Indent indent) const override
Base class for all process objects that output image data.
void SetMaskImage(const TMaskImage *mask)
const TMaskImage * GetMaskImage() const
Computes the normalized correlation of an image and a template.
void PrintSelf(std::ostream &os, Indent indent) const override
Neighborhood< OperatorValueType, itkGetStaticConstMacro(ImageDimension) > OutputNeighborhoodType
NeighborhoodOperatorImageFilter< TInputImage, TOutputImage, TOperatorValueType > Superclass
unsigned int ThreadIdType
Definition: itkIntTypes.h:159
Superclass::OutputImageRegionType OutputImageRegionType
void SetTemplate(const OutputNeighborhoodType &t)
ImageBoundaryCondition< OutputImageType > * ImageBoundaryConditionPointerType
void SetOperator(const OutputNeighborhoodType &p)
void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId) override
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Applies a single NeighborhoodOperator to an image region.
#define itkConceptMacro(name, concept)