ITK  5.4.0
Insight Toolkit
itkANTSNeighborhoodCorrelationImageToImageMetricv4.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 itkANTSNeighborhoodCorrelationImageToImageMetricv4_h
19 #define itkANTSNeighborhoodCorrelationImageToImageMetricv4_h
20 
23 
24 namespace itk
25 {
26 
89 template <typename TFixedImage,
90  typename TMovingImage,
91  typename TVirtualImage = TFixedImage,
92  typename TInternalComputationValueType = double,
93  typename TMetricTraits =
94  DefaultImageToImageMetricTraitsv4<TFixedImage, TMovingImage, TVirtualImage, TInternalComputationValueType>>
96  : public ImageToImageMetricv4<TFixedImage, TMovingImage, TVirtualImage, TInternalComputationValueType, TMetricTraits>
97 {
98 public:
99  ITK_DISALLOW_COPY_AND_MOVE(ANTSNeighborhoodCorrelationImageToImageMetricv4);
100 
103  using Superclass =
107 
109  itkNewMacro(Self);
110 
112  itkOverrideGetNameOfClassMacro(ANTSNeighborhoodCorrelationImageToImageMetricv4);
113 
115  using typename Superclass::MeasureType;
116  using typename Superclass::DerivativeType;
117  using typename Superclass::DerivativeValueType;
118  using typename Superclass::VirtualPointType;
119  using typename Superclass::FixedImagePointType;
120  using typename Superclass::FixedImagePixelType;
121  using typename Superclass::FixedTransformType;
122  using typename Superclass::FixedImageGradientType;
124 
125  using typename Superclass::MovingImagePointType;
126  using typename Superclass::MovingImagePixelType;
127  using typename Superclass::MovingImageGradientType;
128  using typename Superclass::MovingTransformType;
130  using typename Superclass::JacobianType;
131 
132  using typename Superclass::VirtualImageGradientType;
133 
134  using typename Superclass::FixedImageType;
135  using typename Superclass::MovingImageType;
136  using VirtualImageType = typename Superclass::VirtualImageType;
137  using typename Superclass::FixedOutputPointType;
138  using typename Superclass::MovingOutputPointType;
139 
140  using FixedTransformJacobianType = typename Superclass::FixedTransformType::JacobianType;
141  using MovingTransformJacobianType = typename Superclass::MovingTransformType::JacobianType;
142 
143  using typename Superclass::NumberOfParametersType;
144  using typename Superclass::ImageDimensionType;
145 
149 
150  /* Image dimension accessors */
151  static constexpr ImageDimensionType FixedImageDimension = FixedImageType::ImageDimension;
152 
153  static constexpr ImageDimensionType MovingImageDimension = MovingImageType::ImageDimension;
154 
155  static constexpr ImageDimensionType VirtualImageDimension = VirtualImageType::ImageDimension;
156 
157  // Set the radius of the neighborhood window centered at each pixel.
158  // See the note above about using a radius less than 2.
159  itkSetMacro(Radius, RadiusType);
160 
161  // Get the Radius of the neighborhood window centered at each pixel
162  itkGetMacro(Radius, RadiusType);
163  itkGetConstMacro(Radius, RadiusType);
164 
165  void
166  Initialize() override;
167 
168 protected:
171 
173  ThreadedImageRegionPartitioner<VirtualImageDimension>,
174  Superclass,
179  Superclass,
181 
184  Superclass,
188  Superclass,
190 
191  void
192  PrintSelf(std::ostream & os, Indent indent) const override;
193 
194 private:
195  // Radius of the neighborhood window centered at each pixel
196  RadiusType m_Radius{};
197 };
198 
199 } // end namespace itk
200 
201 #ifndef ITK_MANUAL_INSTANTIATION
202 # include "itkANTSNeighborhoodCorrelationImageToImageMetricv4.hxx"
203 #endif
204 
205 #endif
itk::ANTSNeighborhoodCorrelationImageToImageMetricv4::ImageRegionType
typename VirtualImageType::RegionType ImageRegionType
Definition: itkANTSNeighborhoodCorrelationImageToImageMetricv4.h:146
itk::ANTSNeighborhoodCorrelationImageToImageMetricv4
Computes normalized cross correlation using a small neighborhood for each voxel between two images,...
Definition: itkANTSNeighborhoodCorrelationImageToImageMetricv4.h:95
itk::ANTSNeighborhoodCorrelationImageToImageMetricv4::FixedTransformJacobianType
typename Superclass::FixedTransformType::JacobianType FixedTransformJacobianType
Definition: itkANTSNeighborhoodCorrelationImageToImageMetricv4.h:140
itk::ANTSNeighborhoodCorrelationImageToImageMetricv4::IndexType
typename VirtualImageType::IndexType IndexType
Definition: itkANTSNeighborhoodCorrelationImageToImageMetricv4.h:148
itk::ThreadedImageRegionPartitioner
Class for partitioning of an ImageRegion.
Definition: itkThreadedImageRegionPartitioner.h:45
itk::ThreadedIndexedContainerPartitioner
Partitions an indexed container.
Definition: itkThreadedIndexedContainerPartitioner.h:45
itk::ANTSNeighborhoodCorrelationImageToImageMetricv4::MovingImageJacobianType
typename MovingTransformType::JacobianType MovingImageJacobianType
Definition: itkANTSNeighborhoodCorrelationImageToImageMetricv4.h:129
itk::GTest::TypedefsAndConstructors::Dimension2::SizeType
ImageBaseType::SizeType SizeType
Definition: itkGTestTypedefsAndConstructors.h:49
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::ANTSNeighborhoodCorrelationImageToImageMetricv4::VirtualImageType
typename Superclass::VirtualImageType VirtualImageType
Definition: itkANTSNeighborhoodCorrelationImageToImageMetricv4.h:136
itk::GTest::TypedefsAndConstructors::Dimension2::IndexType
ImageBaseType::IndexType IndexType
Definition: itkGTestTypedefsAndConstructors.h:50
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:55
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itkImageToImageMetricv4.h
itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h
itk::ANTSNeighborhoodCorrelationImageToImageMetricv4::MovingTransformJacobianType
typename Superclass::MovingTransformType::JacobianType MovingTransformJacobianType
Definition: itkANTSNeighborhoodCorrelationImageToImageMetricv4.h:141
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::ImageToImageMetricv4
Definition: itkImageToImageMetricv4.h:174
itk::ANTSNeighborhoodCorrelationImageToImageMetricv4::FixedImageJacobianType
typename FixedTransformType::JacobianType FixedImageJacobianType
Definition: itkANTSNeighborhoodCorrelationImageToImageMetricv4.h:123
itk::Array2D
Array2D class representing a 2D array.
Definition: itkArray2D.h:42
itk::ANTSNeighborhoodCorrelationImageToImageMetricv4::RadiusType
typename VirtualImageType::SizeType RadiusType
Definition: itkANTSNeighborhoodCorrelationImageToImageMetricv4.h:147
Superclass
BinaryGeneratorImageFilter< TInputImage1, TInputImage2, TOutputImage > Superclass
Definition: itkAddImageFilter.h:90
itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader
Threading implementation for ANTS CC metric ANTSNeighborhoodCorrelationImageToImageMetricv4 ....
Definition: itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h:58