ITK
4.1.0
Insight Segmentation and Registration Toolkit
|
00001 /*========================================================================= 00002 * 00003 * Copyright Insight Software Consortium 00004 * 00005 * Licensed under the Apache License, Version 2.0 (the "License"); 00006 * you may not use this file except in compliance with the License. 00007 * You may obtain a copy of the License at 00008 * 00009 * http://www.apache.org/licenses/LICENSE-2.0.txt 00010 * 00011 * Unless required by applicable law or agreed to in writing, software 00012 * distributed under the License is distributed on an "AS IS" BASIS, 00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00014 * See the License for the specific language governing permissions and 00015 * limitations under the License. 00016 * 00017 *=========================================================================*/ 00018 #ifndef __itkImageToImageMetricv4GetValueAndDerivativeThreader_h 00019 #define __itkImageToImageMetricv4GetValueAndDerivativeThreader_h 00020 00021 #include "itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h" 00022 #include "itkNumericTraits.h" 00023 #include "itkThreadedImageRegionPartitioner.h" 00024 #include "itkThreadedIndexedContainerPartitioner.h" 00025 00026 namespace itk 00027 { 00028 00043 template < class TDomainPartitioner, class TImageToImageMetricv4 > 00044 class ImageToImageMetricv4GetValueAndDerivativeThreader 00045 {}; 00046 00051 template < class TImageToImageMetricv4 > 00052 class ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 > 00053 : public ImageToImageMetricv4GetValueAndDerivativeThreaderBase< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 > 00054 { 00055 public: 00057 typedef ImageToImageMetricv4GetValueAndDerivativeThreader Self; 00058 typedef ImageToImageMetricv4GetValueAndDerivativeThreaderBase< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 > 00059 Superclass; 00060 typedef SmartPointer< Self > Pointer; 00061 typedef SmartPointer< const Self > ConstPointer; 00062 00063 itkTypeMacro( ImageToImageMetricv4GetValueAndDerivativeThreader, ImageToImageMetricv4GetValueAndDerivativeThreaderBase ); 00064 00066 typedef typename Superclass::DomainType DomainType; 00067 typedef typename Superclass::AssociateType AssociateType; 00068 00070 typedef TImageToImageMetricv4 ImageToImageMetricv4Type; 00071 typedef typename Superclass::VirtualImageType VirtualImageType; 00072 typedef typename Superclass::VirtualIndexType VirtualIndexType; 00073 typedef typename Superclass::VirtualPointType VirtualPointType; 00074 typedef typename Superclass::FixedImagePointType FixedImagePointType; 00075 typedef typename Superclass::FixedImagePixelType FixedImagePixelType; 00076 typedef typename Superclass::FixedImageGradientType FixedImageGradientType; 00077 typedef typename Superclass::MovingImagePointType MovingImagePointType; 00078 typedef typename Superclass::MovingImagePixelType MovingImagePixelType; 00079 typedef typename Superclass::MovingImageGradientType MovingImageGradientType; 00080 00081 typedef typename Superclass::FixedTransformType FixedTransformType; 00082 typedef typename Superclass::FixedOutputPointType FixedOutputPointType; 00083 typedef typename Superclass::MovingTransformType MovingTransformType; 00084 typedef typename Superclass::MovingOutputPointType MovingOutputPointType; 00085 00086 typedef typename Superclass::MeasureType MeasureType; 00087 typedef typename Superclass::DerivativeType DerivativeType; 00088 typedef typename Superclass::DerivativeValueType DerivativeValueType; 00089 typedef typename Superclass::JacobianType JacobianType; 00090 00091 typedef typename Superclass::InternalComputationValueType InternalComputationValueType; 00092 typedef typename Superclass::NumberOfParametersType NumberOfParametersType; 00093 00094 protected: 00096 ImageToImageMetricv4GetValueAndDerivativeThreader() {} 00097 00100 virtual void ThreadedExecution( const DomainType & subdomain, 00101 const ThreadIdType threadId ); 00102 00103 private: 00104 ImageToImageMetricv4GetValueAndDerivativeThreader( const Self & ); // purposely not implemented 00105 void operator=( const Self & ); // purposely not implemented 00106 }; 00107 00112 template < class TImageToImageMetricv4 > 00113 class ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 > 00114 : public ImageToImageMetricv4GetValueAndDerivativeThreaderBase< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 > 00115 { 00116 public: 00118 typedef ImageToImageMetricv4GetValueAndDerivativeThreader Self; 00119 typedef ImageToImageMetricv4GetValueAndDerivativeThreaderBase< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 > 00120 Superclass; 00121 typedef SmartPointer< Self > Pointer; 00122 typedef SmartPointer< const Self > ConstPointer; 00123 00124 itkTypeMacro( ImageToImageMetricv4GetValueAndDerivativeThreader, ImageToImageMetricv4GetValueAndDerivativeThreaderBase ); 00125 00127 typedef typename Superclass::DomainType DomainType; 00128 typedef typename Superclass::AssociateType AssociateType; 00129 00131 typedef typename Superclass::ImageToImageMetricv4Type ImageToImageMetricv4Type; 00132 typedef typename Superclass::VirtualImageType VirtualImageType; 00133 typedef typename Superclass::VirtualIndexType VirtualIndexType; 00134 typedef typename Superclass::VirtualPointType VirtualPointType; 00135 typedef typename Superclass::FixedImagePointType FixedImagePointType; 00136 typedef typename Superclass::FixedImagePixelType FixedImagePixelType; 00137 typedef typename Superclass::FixedImageGradientType FixedImageGradientType; 00138 typedef typename Superclass::MovingImagePointType MovingImagePointType; 00139 typedef typename Superclass::MovingImagePixelType MovingImagePixelType; 00140 typedef typename Superclass::MovingImageGradientType MovingImageGradientType; 00141 00142 typedef typename Superclass::FixedTransformType FixedTransformType; 00143 typedef typename Superclass::FixedOutputPointType FixedOutputPointType; 00144 typedef typename Superclass::MovingTransformType MovingTransformType; 00145 typedef typename Superclass::MovingOutputPointType MovingOutputPointType; 00146 00147 typedef typename Superclass::MeasureType MeasureType; 00148 typedef typename Superclass::DerivativeType DerivativeType; 00149 typedef typename Superclass::DerivativeValueType DerivativeValueType; 00150 typedef typename Superclass::JacobianType JacobianType; 00151 00152 typedef typename Superclass::InternalComputationValueType InternalComputationValueType; 00153 typedef typename Superclass::NumberOfParametersType NumberOfParametersType; 00154 00155 protected: 00157 ImageToImageMetricv4GetValueAndDerivativeThreader() {} 00158 00161 virtual void ThreadedExecution( const DomainType & subdomain, 00162 const ThreadIdType threadId ); 00163 00164 private: 00165 ImageToImageMetricv4GetValueAndDerivativeThreader( const Self & ); // purposely not implemented 00166 void operator=( const Self & ); // purposely not implemented 00167 }; 00168 00169 } // end namespace itk 00170 00171 #ifndef ITK_MANUAL_INSTANTIATION 00172 #include "itkImageToImageMetricv4GetValueAndDerivativeThreader.hxx" 00173 #endif 00174 00175 #endif 00176