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

itkOptimizer.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkOptimizer.h,v $
00005   Language:  C++
00006   Date:      $Date: 2008-04-23 12:49:10 $
00007   Version:   $Revision: 1.38 $
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 __itkOptimizer_h
00018 #define __itkOptimizer_h
00019 
00020 #include "itkObject.h"
00021 #include "itkObjectFactory.h"
00022 #include "itkExceptionObject.h"
00023 #include "itkArray.h"
00024 
00025 
00026 namespace itk
00027 {
00028   
00037 class ITK_EXPORT Optimizer : public Object 
00038 {
00039 public:
00041   typedef Optimizer                 Self;
00042   typedef Object                    Superclass;
00043   typedef SmartPointer<Self>        Pointer;
00044   typedef SmartPointer<const Self>  ConstPointer;
00045 
00047   itkNewMacro(Self);
00048 
00050   itkTypeMacro(Optimizer, Object);
00051 
00054   typedef Array<double>             ParametersType;
00055 
00062   typedef Array<double>             ScalesType;
00063 
00065   virtual void SetInitialPosition( const ParametersType & param );
00066 
00068   itkGetConstReferenceMacro(InitialPosition, ParametersType);
00069 
00071   void SetScales(const ScalesType & scales);
00072 
00074   itkGetConstReferenceMacro( Scales, ScalesType );
00075 
00077   itkGetConstReferenceMacro( CurrentPosition, ParametersType );
00078 
00080   virtual void StartOptimization() {};
00081 
00082 protected:
00083   Optimizer();
00084   virtual ~Optimizer() {};
00085   void PrintSelf(std::ostream& os, Indent indent) const;
00086 
00088   virtual void SetCurrentPosition( const ParametersType & param );
00089 
00090   bool                    m_ScalesInitialized;
00091 
00092   // Keep m_CurrentPosition as a protected var so that subclasses can
00093   // have fast access.  This is important when optimizing high-dimensional
00094   // spaces, e.g. bspline transforms.
00095   ParametersType          m_CurrentPosition;
00096 
00097 private:
00098   Optimizer(const Self&); //purposely not implemented
00099   void operator=(const Self&); //purposely not implemented
00100   
00101   ParametersType          m_InitialPosition;
00102   ScalesType              m_Scales;
00103 
00104 };
00105 
00106 } // end namespace itk
00107 
00108 
00109 #endif
00110 

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