ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkMeanSquaresImageToImageMetricv4.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 __itkMeanSquaresImageToImageMetricv4_h
00019 #define __itkMeanSquaresImageToImageMetricv4_h
00020 
00021 #include "itkImageToImageMetricv4.h"
00022 
00023 #include "itkMeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader.h"
00024 
00025 namespace itk
00026 {
00027 
00037 template <class TFixedImage, class TMovingImage, class TVirtualImage = TFixedImage >
00038 class ITK_EXPORT MeanSquaresImageToImageMetricv4 :
00039 public ImageToImageMetricv4<TFixedImage, TMovingImage, TVirtualImage>
00040 {
00041 public:
00043   typedef MeanSquaresImageToImageMetricv4                                Self;
00044   typedef ImageToImageMetricv4<TFixedImage, TMovingImage, TVirtualImage> Superclass;
00045   typedef SmartPointer<Self>                                             Pointer;
00046   typedef SmartPointer<const Self>                                       ConstPointer;
00047 
00049   itkNewMacro(Self);
00050 
00052   itkTypeMacro(MeanSquaresImageToImageMetricv4, ImageToImageMetricv4);
00053 
00055   typedef typename Superclass::MeasureType             MeasureType;
00056   typedef typename Superclass::DerivativeType          DerivativeType;
00057 
00058   typedef typename Superclass::FixedImagePointType     FixedImagePointType;
00059   typedef typename Superclass::FixedImagePixelType     FixedImagePixelType;
00060   typedef typename Superclass::FixedImageGradientType  FixedImageGradientType;
00061 
00062   typedef typename Superclass::MovingImagePointType    MovingImagePointType;
00063   typedef typename Superclass::MovingImagePixelType    MovingImagePixelType;
00064   typedef typename Superclass::MovingImageGradientType MovingImageGradientType;
00065 
00066   typedef typename Superclass::MovingTransformType        MovingTransformType;
00067   typedef typename Superclass::JacobianType               JacobianType;
00068   typedef typename Superclass::VirtualImageType           VirtualImageType;
00069   typedef typename Superclass::VirtualIndexType           VirtualIndexType;
00070   typedef typename Superclass::VirtualPointType           VirtualPointType;
00071   typedef typename Superclass::VirtualSampledPointSetType VirtualSampledPointSetType;
00072 
00073   /* Image dimension accessors */
00074   itkStaticConstMacro(VirtualImageDimension, ImageDimensionType,
00075       ::itk::GetImageDimension<TVirtualImage>::ImageDimension);
00076   itkStaticConstMacro(FixedImageDimension, ImageDimensionType,
00077       ::itk::GetImageDimension<TFixedImage>::ImageDimension);
00078   itkStaticConstMacro(MovingImageDimension, ImageDimensionType,
00079       ::itk::GetImageDimension<TMovingImage>::ImageDimension);
00080 
00081 protected:
00082   MeanSquaresImageToImageMetricv4();
00083   virtual ~MeanSquaresImageToImageMetricv4();
00084 
00085   friend class MeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< Superclass::VirtualImageDimension >, Superclass, Self >;
00086   friend class MeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, Superclass, Self >;
00087   typedef MeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< Superclass::VirtualImageDimension >, Superclass, Self >
00088     MeanSquaresDenseGetValueAndDerivativeThreaderType;
00089   typedef MeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, Superclass, Self >
00090     MeanSquaresSparseGetValueAndDerivativeThreaderType;
00091 
00092   void PrintSelf(std::ostream& os, Indent indent) const;
00093 
00094 private:
00095   MeanSquaresImageToImageMetricv4(const Self &); //purposely not implemented
00096   void operator = (const Self &); //purposely not implemented
00097 };
00098 
00099 } // end namespace itk
00100 
00101 #ifndef ITK_MANUAL_INSTANTIATION
00102 #include "itkMeanSquaresImageToImageMetricv4.hxx"
00103 #endif
00104 
00105 #endif
00106