ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkMeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader.h
Go to the documentation of this file.
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 __itkMeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader_h
00019 #define __itkMeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader_h
00020 
00021 #include "itkImageToImageMetricv4GetValueAndDerivativeThreader.h"
00022 
00023 namespace itk
00024 {
00025 
00032 template < class TDomainPartitioner, class TImageToImageMetric, class TMeanSquaresMetric >
00033 class MeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader
00034   : public ImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric >
00035 {
00036 public:
00038   typedef MeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader                                 Self;
00039   typedef ImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric > Superclass;
00040   typedef SmartPointer< Self >                                                                         Pointer;
00041   typedef SmartPointer< const Self >                                                                   ConstPointer;
00042 
00043   itkTypeMacro( MeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader, ImageToImageMetricv4GetValueAndDerivativeThreader );
00044 
00045   itkNewMacro( Self );
00046 
00047   typedef typename Superclass::DomainType    DomainType;
00048   typedef typename Superclass::AssociateType AssociateType;
00049 
00050   typedef typename Superclass::ImageToImageMetricv4Type ImageToImageMetricv4Type;
00051   typedef typename Superclass::VirtualPointType         VirtualPointType;
00052   typedef typename Superclass::VirtualIndexType         VirtualIndexType;
00053   typedef typename Superclass::FixedImagePointType      FixedImagePointType;
00054   typedef typename Superclass::FixedImagePixelType      FixedImagePixelType;
00055   typedef typename Superclass::FixedImageGradientType   FixedImageGradientType;
00056   typedef typename Superclass::MovingImagePointType     MovingImagePointType;
00057   typedef typename Superclass::MovingImagePixelType     MovingImagePixelType;
00058   typedef typename Superclass::MovingImageGradientType  MovingImageGradientType;
00059   typedef typename Superclass::MeasureType              MeasureType;
00060   typedef typename Superclass::DerivativeType           DerivativeType;
00061   typedef typename Superclass::DerivativeValueType      DerivativeValueType;
00062 
00063 protected:
00064   MeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader() {}
00065 
00069   virtual bool ProcessPoint(
00070         const VirtualIndexType &          virtualIndex,
00071         const VirtualPointType &          virtualPoint,
00072         const FixedImagePointType &       mappedFixedPoint,
00073         const FixedImagePixelType &       mappedFixedPixelValue,
00074         const FixedImageGradientType &    mappedFixedImageGradient,
00075         const MovingImagePointType &      mappedMovingPoint,
00076         const MovingImagePixelType &      mappedMovingPixelValue,
00077         const MovingImageGradientType &   mappedMovingImageGradient,
00078         MeasureType &                     metricValueReturn,
00079         DerivativeType &                  localDerivativeReturn,
00080         const ThreadIdType                threadID ) const;
00081 
00082 private:
00083   MeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader( const Self & ); // purposely not implemented
00084   void operator=( const Self & ); // purposely not implemented
00085 };
00086 
00087 } // end namespace itk
00088 
00089 #ifndef ITK_MANUAL_INSTANTIATION
00090 #include "itkMeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader.hxx"
00091 #endif
00092 
00093 #endif
00094