freESCommaSelectionController.cxx

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: freESCommaSelectionController.txx,v $
00007   Language:  C++
00008 
00009 
00010   Copyright (c) 2007 Ralf o Floca (Department of Medical Informatics,
00011   Institute for Medical Biometry and Informatics, University of Heidelberg,
00012   Germany). All rights reserved.
00013   See FREECopyright.txt or http://www.mi.med.uni-hd.de/free/copyright.htm
00014   for details.
00015 
00016      This software is distributed WITHOUT ANY WARRANTY; without even 
00017      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00018      PURPOSE.  See the above copyright notices for more information.
00019 
00020 =========================================================================*/
00021 
00022 #include "freESCommaSelectionController.h"
00023 #include "freExceptions.h"
00024 
00025 namespace FREE
00026 {
00027 
00031 
00032 
00033 DefineParameterMacro(ESCommaSelectionController,MaxGenerationAge,"MaxGenerationAge","Maximum age an individual may have before sorted out (independent from its objectiv value). 0: only use the children (original comma selection)");
00034 
00035 ESCommaSelectionController::
00036 ESCommaSelectionController()
00037 {
00038   //Profile settings
00039   this->UpdateControllerID(ControllerID::ESCommaSelectionController);
00040   this->m_Description = "Comma selection for ES.";
00041 };
00042 
00043 void
00044 ESCommaSelectionController::
00045 GenerateProfile(CtrlProfile::ControllerProfile& profile,
00046                 const SessionComponentCache* pComponentCache,
00047                 bool bRegardOldSetup) const
00048 {
00049   Superclass::GenerateProfile(profile,pComponentCache,bRegardOldSetup);
00050 
00051   //Parameters
00052   profile.Parameters().AddParameter(cParam_MaxGenerationAge,CtrlProfile::Parameter::PVTInteger,cParamDsc_MaxGenerationAge,1,"0");
00053 };
00054 
00055 void
00056 ESCommaSelectionController::
00057 ActualizeMainComponent(ComponentType* pMainComponent,
00058                        SessionComponentCache* pComponentCache, SessionInfo* pSessionInfo,
00059                                                                                          const unsigned int& iActLevel) const
00060 {
00061   Superclass::ActualizeMainComponent(pMainComponent, pComponentCache,
00062                                      pSessionInfo, iActLevel);
00063 
00064   int iAge;
00065   try
00066   {
00067     SessionAccessor::GetParameterValue(pComponentCache,cParam_MaxGenerationAge,iAge,0,iActLevel,true);
00068   }
00069   catchAllNPassMacro("Error while retrieving parameter values.");
00070 
00071   pMainComponent->SetMaxGenerationAge(iAge);
00072 };
00073 
00074 } //end of namespace free

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