ITK  6.0.0
Insight Toolkit
itkNormalizedCorrelationImageFilter.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
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 * https://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
23namespace itk
24{
52template <typename TInputImage,
53 typename TMaskImage,
54 typename TOutputImage,
55 typename TOperatorValueType = typename TOutputImage::PixelType>
56class ITK_TEMPLATE_EXPORT NormalizedCorrelationImageFilter
57 : public NeighborhoodOperatorImageFilter<TInputImage, TOutputImage, TOperatorValueType>
58{
59public:
60 ITK_DISALLOW_COPY_AND_MOVE(NormalizedCorrelationImageFilter);
61
65
68
70 itkNewMacro(Self);
71
73 itkOverrideGetNameOfClassMacro(NormalizedCorrelationImageFilter);
74
77 using OutputPixelType = typename TOutputImage::PixelType;
78 using OutputInternalPixelType = typename TOutputImage::InternalPixelType;
79 using InputPixelType = typename TInputImage::PixelType;
80 using InputInternalPixelType = typename TInputImage::InternalPixelType;
81 using MaskPixelType = typename TMaskImage::PixelType;
82 using MaskInternalPixelType = typename TMaskImage::InternalPixelType;
83
86 static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
87 static constexpr unsigned int ImageDimension = TOutputImage::ImageDimension;
88 static constexpr unsigned int MaskImageDimension = TMaskImage::ImageDimension;
89
91 using InputImageType = TInputImage;
92 using MaskImageType = TMaskImage;
93 using OutputImageType = TOutputImage;
96
99
101 using typename Superclass::OutputImageRegionType;
102 using typename Superclass::OperatorValueType;
103
105 using typename Superclass::OutputNeighborhoodType;
106
110 void
111 SetMaskImage(const TMaskImage * mask);
112
116 const TMaskImage *
118
122 void
124 {
125 this->SetOperator(t);
126 }
127
128#ifdef ITK_USE_CONCEPT_CHECKING
129 // Begin concept checking
131 itkConceptMacro(OutputHasNumericTraitsCheck, (Concept::HasNumericTraits<OutputPixelType>));
132 itkConceptMacro(OperatorHasNumericTraitsCheck, (Concept::HasNumericTraits<OperatorValueType>));
133 // This filter can only operate on data types that are signed.
134 itkConceptMacro(SignedOutputPixelType, (Concept::Signed<OutputPixelType>));
135 // End concept checking
136#endif
137
138protected:
141
147 void
149
161 void
162 DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
163
165 void
166 PrintSelf(std::ostream & os, Indent indent) const override
167 {
168 Superclass::PrintSelf(os, indent);
169 }
170};
171} // end namespace itk
174#ifndef ITK_MANUAL_INSTANTIATION
175# include "itkNormalizedCorrelationImageFilter.hxx"
176#endif
177
178#endif
Base class for all process objects that output image data.
typename OutputImageType::RegionType OutputImageRegionType
TOutputImage OutputImageType
typename InputImageType::Pointer InputImagePointer
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Applies a single NeighborhoodOperator to an image region.
Computes the normalized correlation of an image and a template.
void SetTemplate(const OutputNeighborhoodType &t)
const TMaskImage * GetMaskImage() const
void SetMaskImage(const TMaskImage *mask)
void PrintSelf(std::ostream &os, Indent indent) const override
void DynamicThreadedGenerateData(const OutputImageRegionType &outputRegionForThread) override
typename TMaskImage::InternalPixelType MaskInternalPixelType
typename TInputImage::InternalPixelType InputInternalPixelType
typename TOutputImage::InternalPixelType OutputInternalPixelType
~NormalizedCorrelationImageFilter() override=default
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
SmartPointer< Self > Pointer
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....