ITK  5.0.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 >
51 class ITK_TEMPLATE_EXPORT NormalizedCorrelationImageFilter:
52  public NeighborhoodOperatorImageFilter< TInputImage, TOutputImage, TOperatorValueType >
53 {
54 public:
55  ITK_DISALLOW_COPY_AND_ASSIGN(NormalizedCorrelationImageFilter);
56 
60  TInputImage, TOutputImage, TOperatorValueType >;
61 
64 
66  itkNewMacro(Self);
67 
70 
73  using OutputPixelType = typename TOutputImage::PixelType;
74  using OutputInternalPixelType = typename TOutputImage::InternalPixelType;
75  using InputPixelType = typename TInputImage::PixelType;
76  using InputInternalPixelType = typename TInputImage::InternalPixelType;
77  using MaskPixelType = typename TMaskImage::PixelType;
78  using MaskInternalPixelType = typename TMaskImage::InternalPixelType;
79 
82  static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
83  static constexpr unsigned int ImageDimension = TOutputImage::ImageDimension;
84  static constexpr unsigned int MaskImageDimension = TMaskImage::ImageDimension;
85 
87  using InputImageType = TInputImage;
88  using MaskImageType = TMaskImage;
89  using OutputImageType = TOutputImage;
90  using InputImagePointer = typename InputImageType::Pointer;
91  using MaskImagePointer = typename MaskImageType::Pointer;
92 
95 
97  using OutputImageRegionType = typename Superclass::OutputImageRegionType;
98  using OperatorValueType = typename Superclass::OperatorValueType;
99 
101  using OutputNeighborhoodType = typename Superclass::OutputNeighborhoodType;
102 
106  void SetMaskImage(const TMaskImage *mask);
107 
111  const TMaskImage * GetMaskImage() const;
112 
117  {
118  this->SetOperator(t);
119  }
120 
121 #ifdef ITK_USE_CONCEPT_CHECKING
122  // Begin concept checking
123  itkConceptMacro( SameDimensionCheck,
125  itkConceptMacro( OutputHasNumericTraitsCheck,
127  itkConceptMacro( OperatorHasNumericTraitsCheck,
129  // This filter can only operate on data types that are signed.
130  itkConceptMacro( SignedOutputPixelType,
132  // End concept checking
133 #endif
134 
135 protected:
137  ~NormalizedCorrelationImageFilter() override = default;
138 
144  void GenerateInputRequestedRegion() override;
145 
157  void DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
158 
160  void PrintSelf(std::ostream & os, Indent indent) const override
161  { Superclass::PrintSelf(os, indent); }
162 };
163 } // end namespace itk
165 
166 #ifndef ITK_MANUAL_INSTANTIATION
167 #include "itkNormalizedCorrelationImageFilter.hxx"
168 #endif
169 
170 #endif
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Base class for all process objects that output image data.
typename TMaskImage::InternalPixelType MaskInternalPixelType
typename InputImageType::Pointer InputImagePointer
Computes the normalized correlation of an image and a template.
void PrintSelf(std::ostream &os, Indent indent) const override
typename OutputImageType::RegionType OutputImageRegionType
TOutputImage OutputImageType
void SetTemplate(const OutputNeighborhoodType &t)
typename TInputImage::InternalPixelType InputInternalPixelType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Applies a single NeighborhoodOperator to an image region.
#define itkConceptMacro(name, concept)
typename TOutputImage::InternalPixelType OutputInternalPixelType