freOptimizerControllerBase.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   F.R.E.E. - flexible registration evaluation engine
00004   Version:   v.1.0.0
00005   Date:      $Date: 2006/09/01 12:00:00 $
00006   Module:    $RCSfile: freOptimizerControllerBase.h,v $
00007   Language:  C++
00008 
00009 
00010 
00011   Copyright (c) 2007 Ralf o Floca (Department of Medical Informatics,
00012   Institute for Medical Biometry and Informatics, University of Heidelberg,
00013   Germany). All rights reserved.
00014   See FREECopyright.txt or http://www.mi.med.uni-hd.de/free/copyright.htm
00015   for details.
00016 
00017      This software is distributed WITHOUT ANY WARRANTY; without even 
00018      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00019      PURPOSE.  See the above copyright notices for more information.
00020 
00021 =========================================================================*/
00022 #ifndef __freOptimizerControllerBase_h
00023 #define __freOptimizerControllerBase_h
00024 
00025 #include "freControllerBase.h"
00026 #include "freOptimizerControllerInterface.h"
00027 
00028 #include "itkOptimizer.h"
00029 
00030 namespace FREE
00031 {
00032 
00042   freControllerIDMacro(OptimizerControllerBase, "OptimizerBase");
00043 template <class TControlledOptimizer>
00044 class OptimizerControllerBase : public ComponentControllerBase<TControlledOptimizer>,
00045                                 public OptimizerControllerInterface
00046 {
00047 public:  
00048   itkTypeMacro(OptimizerControllerBase, ComponentControllerBase);
00049 
00050   typedef ComponentControllerBase<TControlledOptimizer> Superclass;
00051   typedef typename Superclass::ComponentType ComponentType;
00052   
00053   typedef OptimizerControllerInterface::ParametersType ParametersType;
00054         typedef OptimizerControllerInterface::MeasuresType MeasuresType;
00055 
00056         virtual ~OptimizerControllerBase()
00057   {};
00058 
00059         virtual ParametersType GetCurrentPosition(const SessionComponentCache* pComponentCache) const;
00060         virtual MeasuresType GetCurrentValue(const SessionComponentCache* pComponentCache) const;
00061 
00062         virtual ParametersType GetCurrentPosition(TControlledOptimizer* pOptimizer) const;
00063         virtual MeasuresType GetCurrentValue(TControlledOptimizer* pOptimizer) const;
00064 
00065   virtual long GetMaxIterationCount(const SessionComponentCache* pComponentCache, unsigned int iResolutionLevel = 0) const;
00066 
00067 protected:
00068   OptimizerControllerBase();
00069 
00070   virtual void SetStatisticEntryMainComponent(StatisticEntry& rStatisticEntry,
00071                                              ComponentType* pMainComponent,
00072                                              SessionComponentCache* pMainComponentCache,
00073                                              SessionInfo* pSessionInfo,
00074                                              StatisticDictionary& rDictionary) const;
00075   /* Searches for the main transform within the same section, and returns the scales of the
00076    * current layer/level as an itk:Array.
00077    * \param pComponentCache Pointer to the optimizer
00078    * \param iCurLevel Current level index for which the scales are needed.
00079    * \return The Scaling as itk:Array. If the scaling cannot be retreived, an exception
00080    * will be thrown.*/
00081   ParameterArrayType GetTransformScales(SessionComponentCache* pOptimizerCache, const Parameter::LayerCountType& iCurLevel) const;
00082 
00083 };
00084 
00085 //The generic controller of the base class of all optimizers
00086 typedef OptimizerControllerInterface GenericOptimizerController;
00087 
00088 } //end of namespace FREE
00089 
00090 #ifndef ITK_MANUAL_INSTANTIATION
00091 #include "freOptimizerControllerBase.txx"
00092 #endif
00093 
00094 #endif

Generated at Sat Oct 13 16:52:10 2007 for f.r.e.e. - Flexible Registration and Evaluation Engine by doxygen 1.5.3 written by Dimitri van Heesch, © 1997-2000