ITK  4.2.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 < class TDomainPartitioner, class TImageToImageMetricv4 >
45 {};
46 
51 template < class TImageToImageMetricv4 >
52 class 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 );
103 
104 private:
105  ImageToImageMetricv4GetValueAndDerivativeThreader( const Self & ); // purposely not implemented
106  void operator=( const Self & ); // purposely not implemented
107 };
108 
113 template < class TImageToImageMetricv4 >
115  : public ImageToImageMetricv4GetValueAndDerivativeThreaderBase< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 >
116 {
117 public:
124 
126 
128  typedef typename Superclass::DomainType DomainType;
129  typedef typename Superclass::AssociateType AssociateType;
130 
132  typedef typename Superclass::ImageToImageMetricv4Type ImageToImageMetricv4Type;
133  typedef typename Superclass::VirtualImageType VirtualImageType;
134  typedef typename Superclass::VirtualIndexType VirtualIndexType;
135  typedef typename Superclass::VirtualPointType VirtualPointType;
136  typedef typename Superclass::FixedImagePointType FixedImagePointType;
137  typedef typename Superclass::FixedImagePixelType FixedImagePixelType;
138  typedef typename Superclass::FixedImageGradientType FixedImageGradientType;
139  typedef typename Superclass::MovingImagePointType MovingImagePointType;
140  typedef typename Superclass::MovingImagePixelType MovingImagePixelType;
141  typedef typename Superclass::MovingImageGradientType MovingImageGradientType;
142 
143  typedef typename Superclass::FixedTransformType FixedTransformType;
144  typedef typename Superclass::FixedOutputPointType FixedOutputPointType;
145  typedef typename Superclass::MovingTransformType MovingTransformType;
146  typedef typename Superclass::MovingOutputPointType MovingOutputPointType;
147 
148  typedef typename Superclass::MeasureType MeasureType;
149  typedef typename Superclass::DerivativeType DerivativeType;
150  typedef typename Superclass::DerivativeValueType DerivativeValueType;
151  typedef typename Superclass::JacobianType JacobianType;
152 
153  typedef typename Superclass::InternalComputationValueType InternalComputationValueType;
154  typedef typename Superclass::NumberOfParametersType NumberOfParametersType;
155 
156 protected:
159 
162  virtual void ThreadedExecution( const DomainType & subdomain,
163  const ThreadIdType threadId );
164 
165 private:
166  ImageToImageMetricv4GetValueAndDerivativeThreader( const Self & ); // purposely not implemented
167  void operator=( const Self & ); // purposely not implemented
168 };
169 
170 } // end namespace itk
171 
172 #ifndef ITK_MANUAL_INSTANTIATION
173 #include "itkImageToImageMetricv4GetValueAndDerivativeThreader.hxx"
174 #endif
175 
176 #endif
177