freSetupOptimizationProgressObserver.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: freSetupOptimizationProgressObserver.cxx,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 #include "freSetupOptimizationProgressObserver.h"
00023 #include "freSetupOptimizationObserverEvents.h"
00024 #include "freExceptions.h"
00025 
00026 namespace FREE
00027 {
00028 
00029 SetupOptimizationProgressObserver::
00030 SetupOptimizationProgressObserver()
00031 {
00032   fnOnNotify = NULL;
00033 };
00034 
00035 SetupOptimizationProgressObserver::
00036 ~SetupOptimizationProgressObserver() {};
00037  
00038 void
00039 SetupOptimizationProgressObserver::
00040 Execute(itk::Object* caller, const itk::EventObject & rEvent)
00041 {
00042   Execute( (const itk::Object*)caller, rEvent);
00043 };
00044   
00045 void
00046 SetupOptimizationProgressObserver::
00047 Execute(const itk::Object* caller, const itk::EventObject & rEvent)
00048 {
00049         EvaluationProgressObserverEvent ownEvent;
00050   if (!ownEvent.CheckEvent(&rEvent)) return;
00051 
00052   const EvaluationProgressObserverEvent* pCastedEvent = dynamic_cast<const EvaluationProgressObserverEvent*>(&rEvent);
00053   if (!pCastedEvent) return;
00054   if (!fnOnNotify.IsNull()) fnOnNotify->Execute(pCastedEvent->GetStatusID(), pCastedEvent->GetComment(), (void*)caller, 0);
00055 };
00056 
00057 }//End of Namespace free

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