ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkImageToImageMetricv4GetValueAndDerivativeThreader.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 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 >
52 class ITK_TEMPLATE_EXPORT ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 >
53  : public ImageToImageMetricv4GetValueAndDerivativeThreaderBase< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 >
54 {
55 public:
62 
64 
66  typedef typename Superclass::DomainType DomainType;
67  typedef typename Superclass::AssociateType AssociateType;
68 
70  typedef TImageToImageMetricv4 ImageToImageMetricv4Type;
71  typedef typename Superclass::VirtualImageType VirtualImageType;
72  typedef typename Superclass::VirtualIndexType VirtualIndexType;
73  typedef typename Superclass::VirtualPointType VirtualPointType;
74  typedef typename Superclass::FixedImagePointType FixedImagePointType;
75  typedef typename Superclass::FixedImagePixelType FixedImagePixelType;
76  typedef typename Superclass::FixedImageGradientType FixedImageGradientType;
77  typedef typename Superclass::MovingImagePointType MovingImagePointType;
78  typedef typename Superclass::MovingImagePixelType MovingImagePixelType;
79  typedef typename Superclass::MovingImageGradientType MovingImageGradientType;
80 
81  typedef typename Superclass::FixedTransformType FixedTransformType;
82  typedef typename Superclass::FixedOutputPointType FixedOutputPointType;
83  typedef typename Superclass::MovingTransformType MovingTransformType;
84  typedef typename Superclass::MovingOutputPointType MovingOutputPointType;
85 
86  typedef typename Superclass::MeasureType MeasureType;
87  typedef typename Superclass::DerivativeType DerivativeType;
88  typedef typename Superclass::DerivativeValueType DerivativeValueType;
89  typedef typename Superclass::JacobianType JacobianType;
90 
91  typedef typename Superclass::InternalComputationValueType InternalComputationValueType;
92  typedef typename Superclass::NumberOfParametersType NumberOfParametersType;
93  typedef typename Superclass::ImageDimensionType ImageDimensionType;
94 
95 protected:
98 
101  virtual void ThreadedExecution( const DomainType & subdomain,
102  const ThreadIdType threadId ) ITK_OVERRIDE;
103 
108  {
109  return this->m_CachedNumberOfParameters;
110  }
112  {
113  return this->m_CachedNumberOfLocalParameters;
114  }
116 
117 private:
118  ITK_DISALLOW_COPY_AND_ASSIGN(ImageToImageMetricv4GetValueAndDerivativeThreader);
119 };
120 
125 template < typename TImageToImageMetricv4 >
127  : public ImageToImageMetricv4GetValueAndDerivativeThreaderBase< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 >
128 {
129 public:
136 
138 
140  typedef typename Superclass::DomainType DomainType;
141  typedef typename Superclass::AssociateType AssociateType;
142 
144  typedef typename Superclass::ImageToImageMetricv4Type ImageToImageMetricv4Type;
145  typedef typename Superclass::VirtualImageType VirtualImageType;
146  typedef typename Superclass::VirtualIndexType VirtualIndexType;
147  typedef typename Superclass::VirtualPointType VirtualPointType;
148  typedef typename Superclass::FixedImagePointType FixedImagePointType;
149  typedef typename Superclass::FixedImagePixelType FixedImagePixelType;
150  typedef typename Superclass::FixedImageGradientType FixedImageGradientType;
151  typedef typename Superclass::MovingImagePointType MovingImagePointType;
152  typedef typename Superclass::MovingImagePixelType MovingImagePixelType;
153  typedef typename Superclass::MovingImageGradientType MovingImageGradientType;
154 
155  typedef typename Superclass::FixedTransformType FixedTransformType;
156  typedef typename Superclass::FixedOutputPointType FixedOutputPointType;
157  typedef typename Superclass::MovingTransformType MovingTransformType;
158  typedef typename Superclass::MovingOutputPointType MovingOutputPointType;
159 
160  typedef typename Superclass::MeasureType MeasureType;
161  typedef typename Superclass::DerivativeType DerivativeType;
162  typedef typename Superclass::DerivativeValueType DerivativeValueType;
163  typedef typename Superclass::JacobianType JacobianType;
164 
165  typedef typename Superclass::InternalComputationValueType InternalComputationValueType;
166  typedef typename Superclass::NumberOfParametersType NumberOfParametersType;
167 
168 protected:
171 
174  virtual void ThreadedExecution( const DomainType & subdomain,
175  const ThreadIdType threadId ) ITK_OVERRIDE;
176 
181  {
182  return this->m_CachedNumberOfParameters;
183  }
185  {
186  return this->m_CachedNumberOfLocalParameters;
187  }
189 
190 private:
191  ITK_DISALLOW_COPY_AND_ASSIGN(ImageToImageMetricv4GetValueAndDerivativeThreader);
192 };
193 
194 } // end namespace itk
195 
196 #ifndef ITK_MANUAL_INSTANTIATION
197 #include "itkImageToImageMetricv4GetValueAndDerivativeThreader.hxx"
198 #endif
199 
200 #endif
ImageToImageMetricv4GetValueAndDerivativeThreaderBase< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 > Superclass
Provides threading for ImageToImageMetricv4::GetValueAndDerivative.
Class for partitioning of an ImageRegion.
unsigned int ThreadIdType
Definition: itkIntTypes.h:159
Provides threading for ImageToImageMetricv4::GetValueAndDerivative.
ImageToImageMetricv4GetValueAndDerivativeThreaderBase< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 > Superclass