Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkPointSetToPointSetMetric.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkPointSetToPointSetMetric.h,v $
00005   Language:  C++
00006   Date:      $Date: 2003/11/08 17:58:32 $
00007   Version:   $Revision: 1.1 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
00015 
00016 =========================================================================*/
00017 #ifndef __itkPointSetToPointSetMetric_h
00018 #define __itkPointSetToPointSetMetric_h
00019 
00020 #include "itkImageBase.h"
00021 #include "itkTransform.h"
00022 #include "itkMultipleValuedCostFunction.h"
00023 #include "itkExceptionObject.h"
00024 #include "itkGradientRecursiveGaussianImageFilter.h"
00025 
00026 namespace itk
00027 {
00028   
00043 template <class TFixedPointSet,  class TMovingPointSet> 
00044 class ITK_EXPORT PointSetToPointSetMetric : public MultipleValuedCostFunction 
00045 {
00046 public:
00047 
00049   typedef PointSetToPointSetMetric        Self;
00050   typedef MultipleValuedCostFunction      Superclass;
00051   typedef SmartPointer<Self>              Pointer;
00052   typedef SmartPointer<const Self>        ConstPointer;
00053 
00055   typedef Superclass::ParametersValueType CoordinateRepresentationType;
00056 
00058   itkTypeMacro(PointSetToPointSetMetric, MultipleValuedCostFunction);
00059 
00061   typedef TMovingPointSet                               MovingPointSetType;
00062   typedef typename TMovingPointSet::PixelType           MovingPointSetPixelType;
00063   typedef typename MovingPointSetType::ConstPointer     MovingPointSetConstPointer;
00064 
00066   typedef TFixedPointSet                             FixedPointSetType;
00067   typedef typename FixedPointSetType::ConstPointer   FixedPointSetConstPointer;
00068 
00070   itkStaticConstMacro(MovingPointSetDimension, unsigned int,
00071                       TMovingPointSet::PointDimension);
00072   itkStaticConstMacro(FixedPointSetDimension, unsigned int,
00073                       TFixedPointSet::PointDimension);
00075 
00076   typedef typename FixedPointSetType::PointsContainer::ConstIterator        PointIterator;
00077   typedef typename FixedPointSetType::PointDataContainer::ConstIterator     PointDataIterator;
00078 
00080   typedef Transform<CoordinateRepresentationType, 
00081                     itkGetStaticConstMacro(MovingPointSetDimension),
00082                     itkGetStaticConstMacro(FixedPointSetDimension)> TransformType;
00083 
00084   typedef typename TransformType::Pointer            TransformPointer;
00085   typedef typename TransformType::InputPointType     InputPointType;
00086   typedef typename TransformType::OutputPointType    OutputPointType;
00087   typedef typename TransformType::ParametersType     TransformParametersType;
00088   typedef typename TransformType::JacobianType       TransformJacobianType;
00089 
00091   typedef Superclass::MeasureType          MeasureType;
00092 
00094   typedef Superclass::DerivativeType       DerivativeType;
00095 
00097   typedef Superclass::ParametersType       ParametersType;
00098 
00100   itkSetConstObjectMacro( FixedPointSet, FixedPointSetType );
00101 
00103   itkGetConstObjectMacro( FixedPointSet, FixedPointSetType );
00104 
00106   itkSetConstObjectMacro( MovingPointSet, MovingPointSetType );
00107 
00109   itkGetConstObjectMacro( MovingPointSet, MovingPointSetType );
00110 
00112   itkSetObjectMacro( Transform, TransformType );
00113 
00115   itkGetObjectMacro( Transform, TransformType );
00116 
00118   void SetTransformParameters( const ParametersType & parameters ) const;
00119 
00121   unsigned int GetNumberOfParameters(void) const 
00122   { return m_Transform->GetNumberOfParameters(); }
00123 
00126   virtual void Initialize(void) throw ( ExceptionObject );
00127 
00128 protected:
00129   PointSetToPointSetMetric();
00130   virtual ~PointSetToPointSetMetric() {};
00131   void PrintSelf(std::ostream& os, Indent indent) const;
00132 
00133   FixedPointSetConstPointer   m_FixedPointSet;
00134   MovingPointSetConstPointer  m_MovingPointSet;
00135 
00136   mutable TransformPointer    m_Transform;
00137 
00138 private:
00139   PointSetToPointSetMetric(const Self&); //purposely not implemented
00140   void operator=(const Self&); //purposely not implemented
00141   
00142 };
00143 
00144 } // end namespace itk
00145 
00146 #ifndef ITK_MANUAL_INSTANTIATION
00147 #include "itkPointSetToPointSetMetric.txx"
00148 #endif
00149 
00150 #endif
00151 
00152 

Generated at Tue Jul 29 21:46:00 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000