ITK  5.2.0
Insight Toolkit
itkImageToImageMetricv4GetValueAndDerivativeThreader.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  * 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 itkImageToImageMetricv4GetValueAndDerivativeThreader_h
19 #define itkImageToImageMetricv4GetValueAndDerivativeThreader_h
20 
22 #include "itkNumericTraits.h"
25 
26 namespace itk
27 {
28 
43 template <typename TDomainPartitioner, typename TImageToImageMetricv4>
45 {};
46 
51 template <typename TImageToImageMetricv4>
53  ThreadedImageRegionPartitioner<TImageToImageMetricv4::VirtualImageDimension>,
54  TImageToImageMetricv4>
56  ThreadedImageRegionPartitioner<TImageToImageMetricv4::VirtualImageDimension>,
57  TImageToImageMetricv4>
58 {
59 public:
60  ITK_DISALLOW_COPY_AND_MOVE(ImageToImageMetricv4GetValueAndDerivativeThreader);
61 
66  TImageToImageMetricv4>;
69 
72 
74  using DomainType = typename Superclass::DomainType;
75  using AssociateType = typename Superclass::AssociateType;
76 
78  using ImageToImageMetricv4Type = TImageToImageMetricv4;
79  using VirtualImageType = typename Superclass::VirtualImageType;
80  using VirtualIndexType = typename Superclass::VirtualIndexType;
81  using VirtualPointType = typename Superclass::VirtualPointType;
82  using FixedImagePointType = typename Superclass::FixedImagePointType;
83  using FixedImagePixelType = typename Superclass::FixedImagePixelType;
84  using FixedImageGradientType = typename Superclass::FixedImageGradientType;
85  using MovingImagePointType = typename Superclass::MovingImagePointType;
86  using MovingImagePixelType = typename Superclass::MovingImagePixelType;
87  using MovingImageGradientType = typename Superclass::MovingImageGradientType;
88 
89  using FixedTransformType = typename Superclass::FixedTransformType;
90  using FixedOutputPointType = typename Superclass::FixedOutputPointType;
91  using MovingTransformType = typename Superclass::MovingTransformType;
92  using MovingOutputPointType = typename Superclass::MovingOutputPointType;
93 
94  using MeasureType = typename Superclass::MeasureType;
95  using DerivativeType = typename Superclass::DerivativeType;
96  using DerivativeValueType = typename Superclass::DerivativeValueType;
97  using JacobianType = typename Superclass::JacobianType;
98 
99  using InternalComputationValueType = typename Superclass::InternalComputationValueType;
100  using NumberOfParametersType = typename Superclass::NumberOfParametersType;
101  using ImageDimensionType = typename Superclass::ImageDimensionType;
102 
103 protected:
106 
109  void
110  ThreadedExecution(const DomainType & subdomain, const ThreadIdType threadId) override;
111 
117  {
118  return this->m_CachedNumberOfParameters;
119  }
120  inline NumberOfParametersType
122  {
123  return this->m_CachedNumberOfLocalParameters;
124  }
125 };
127 
132 template <typename TImageToImageMetricv4>
133 class ITK_TEMPLATE_EXPORT
135  : public ImageToImageMetricv4GetValueAndDerivativeThreaderBase<ThreadedIndexedContainerPartitioner,
136  TImageToImageMetricv4>
137 {
138 public:
139  ITK_DISALLOW_COPY_AND_MOVE(ImageToImageMetricv4GetValueAndDerivativeThreader);
140 
143  using Superclass =
147 
150 
152  using DomainType = typename Superclass::DomainType;
153  using AssociateType = typename Superclass::AssociateType;
154 
156  using ImageToImageMetricv4Type = typename Superclass::ImageToImageMetricv4Type;
157  using VirtualImageType = typename Superclass::VirtualImageType;
158  using VirtualIndexType = typename Superclass::VirtualIndexType;
159  using VirtualPointType = typename Superclass::VirtualPointType;
160  using FixedImagePointType = typename Superclass::FixedImagePointType;
161  using FixedImagePixelType = typename Superclass::FixedImagePixelType;
162  using FixedImageGradientType = typename Superclass::FixedImageGradientType;
163  using MovingImagePointType = typename Superclass::MovingImagePointType;
164  using MovingImagePixelType = typename Superclass::MovingImagePixelType;
165  using MovingImageGradientType = typename Superclass::MovingImageGradientType;
166 
167  using FixedTransformType = typename Superclass::FixedTransformType;
168  using FixedOutputPointType = typename Superclass::FixedOutputPointType;
169  using MovingTransformType = typename Superclass::MovingTransformType;
170  using MovingOutputPointType = typename Superclass::MovingOutputPointType;
171 
172  using MeasureType = typename Superclass::MeasureType;
173  using DerivativeType = typename Superclass::DerivativeType;
174  using DerivativeValueType = typename Superclass::DerivativeValueType;
175  using JacobianType = typename Superclass::JacobianType;
176 
177  using InternalComputationValueType = typename Superclass::InternalComputationValueType;
178  using NumberOfParametersType = typename Superclass::NumberOfParametersType;
179 
180 protected:
183 
186  void
187  ThreadedExecution(const DomainType & subdomain, const ThreadIdType threadId) override;
188 
194  {
195  return this->m_CachedNumberOfParameters;
196  }
197  inline NumberOfParametersType
199  {
200  return this->m_CachedNumberOfLocalParameters;
201  }
202 };
204 
205 } // end namespace itk
206 
207 #ifndef ITK_MANUAL_INSTANTIATION
208 # include "itkImageToImageMetricv4GetValueAndDerivativeThreader.hxx"
209 #endif
210 
211 #endif
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 >::FixedImagePixelType
typename Superclass::FixedImagePixelType FixedImagePixelType
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:83
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 >::MovingImageGradientType
typename Superclass::MovingImageGradientType MovingImageGradientType
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:87
itkThreadedIndexedContainerPartitioner.h
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 >::GetCachedNumberOfLocalParameters
NumberOfParametersType GetCachedNumberOfLocalParameters() const
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:198
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 >::ImageToImageMetricv4Type
TImageToImageMetricv4 ImageToImageMetricv4Type
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:78
itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase
Provides threading for ImageToImageMetricv4::GetValueAndDerivative.
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h:44
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 >::InternalComputationValueType
typename Superclass::InternalComputationValueType InternalComputationValueType
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:177
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 >::VirtualPointType
typename Superclass::VirtualPointType VirtualPointType
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:81
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 >::VirtualIndexType
typename Superclass::VirtualIndexType VirtualIndexType
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:80
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 >::AssociateType
typename Superclass::AssociateType AssociateType
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:75
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 >::InternalComputationValueType
typename Superclass::InternalComputationValueType InternalComputationValueType
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:99
itk::ImageToImageMetricv4GetValueAndDerivativeThreader
Provides threading for ImageToImageMetricv4::GetValueAndDerivative.
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:44
itk::ThreadedImageRegionPartitioner
Class for partitioning of an ImageRegion.
Definition: itkThreadedImageRegionPartitioner.h:45
itk::ThreadedIndexedContainerPartitioner
Partitions an indexed container.
Definition: itkThreadedIndexedContainerPartitioner.h:45
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 >::AssociateType
typename Superclass::AssociateType AssociateType
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:153
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 >::MovingOutputPointType
typename Superclass::MovingOutputPointType MovingOutputPointType
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:92
itk::SmartPointer< Self >
itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h
itkThreadedImageRegionPartitioner.h
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 >::FixedTransformType
typename Superclass::FixedTransformType FixedTransformType
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:167
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 >::MovingTransformType
typename Superclass::MovingTransformType MovingTransformType
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:91
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 >::DerivativeType
typename Superclass::DerivativeType DerivativeType
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:173
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 >::FixedImageGradientType
typename Superclass::FixedImageGradientType FixedImageGradientType
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:84
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 >::FixedOutputPointType
typename Superclass::FixedOutputPointType FixedOutputPointType
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:90
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 >::FixedImagePointType
typename Superclass::FixedImagePointType FixedImagePointType
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:160
itk::ThreadIdType
unsigned int ThreadIdType
Definition: itkIntTypes.h:99
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 >::FixedImagePixelType
typename Superclass::FixedImagePixelType FixedImagePixelType
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:161
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 >::GetCachedNumberOfParameters
NumberOfParametersType GetCachedNumberOfParameters() const
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:193
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 >::MeasureType
typename Superclass::MeasureType MeasureType
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:172
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 >::VirtualIndexType
typename Superclass::VirtualIndexType VirtualIndexType
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:158
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 >::MovingOutputPointType
typename Superclass::MovingOutputPointType MovingOutputPointType
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:170
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 >::VirtualImageType
typename Superclass::VirtualImageType VirtualImageType
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:157
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 >::ImageDimensionType
typename Superclass::ImageDimensionType ImageDimensionType
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:101
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 >::DomainType
typename Superclass::DomainType DomainType
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:152
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 >::VirtualImageType
typename Superclass::VirtualImageType VirtualImageType
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:79
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 >::NumberOfParametersType
typename Superclass::NumberOfParametersType NumberOfParametersType
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:178
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 >::GetCachedNumberOfParameters
NumberOfParametersType GetCachedNumberOfParameters() const
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:116
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 >::DerivativeValueType
typename Superclass::DerivativeValueType DerivativeValueType
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:96
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 >::DerivativeType
typename Superclass::DerivativeType DerivativeType
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:95
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 >::MeasureType
typename Superclass::MeasureType MeasureType
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:94
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 >::JacobianType
typename Superclass::JacobianType JacobianType
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:97
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 >::MovingImagePointType
typename Superclass::MovingImagePointType MovingImagePointType
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:163
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 >::MovingImagePixelType
typename Superclass::MovingImagePixelType MovingImagePixelType
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:86
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 >::MovingTransformType
typename Superclass::MovingTransformType MovingTransformType
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:169
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 >::FixedTransformType
typename Superclass::FixedTransformType FixedTransformType
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:89
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 >::FixedImageGradientType
typename Superclass::FixedImageGradientType FixedImageGradientType
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:162
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 >::JacobianType
typename Superclass::JacobianType JacobianType
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:175
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 >::NumberOfParametersType
typename Superclass::NumberOfParametersType NumberOfParametersType
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:100
itkNumericTraits.h
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 >::MovingImageGradientType
typename Superclass::MovingImageGradientType MovingImageGradientType
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:165
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 >::VirtualPointType
typename Superclass::VirtualPointType VirtualPointType
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:159
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 >::DerivativeValueType
typename Superclass::DerivativeValueType DerivativeValueType
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:174
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 >::FixedImagePointType
typename Superclass::FixedImagePointType FixedImagePointType
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:82
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 >::MovingImagePixelType
typename Superclass::MovingImagePixelType MovingImagePixelType
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:164
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 >::DomainType
typename Superclass::DomainType DomainType
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:74
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 >::MovingImagePointType
typename Superclass::MovingImagePointType MovingImagePointType
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:85
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 >::GetCachedNumberOfLocalParameters
NumberOfParametersType GetCachedNumberOfLocalParameters() const
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:121
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 >::ImageToImageMetricv4Type
typename Superclass::ImageToImageMetricv4Type ImageToImageMetricv4Type
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:156
itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 >::FixedOutputPointType
typename Superclass::FixedOutputPointType FixedOutputPointType
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:168