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: freLightRegistrationProcessorBase.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 "freLightRegistrationProcessorBase.h" 00023 00024 #include "freControllerCentral.h" 00025 #include "freSessionInfo.h" 00026 00027 namespace FREE 00028 { 00029 00033 00034 00035 void 00036 LightRegistrationProcessorBase:: 00037 SetSessionInfo(SessionInfo* pInfo) 00038 { 00039 if (m_pSessionInfo != pInfo) m_pSessionInfo = pInfo; 00040 }; 00041 00042 SessionInfo* 00043 LightRegistrationProcessorBase:: 00044 GetSessionInfo() 00045 { 00046 return m_pSessionInfo; 00047 }; 00048 00049 void 00050 LightRegistrationProcessorBase:: 00051 SetComponentCache(SessionComponentCache* pCache) 00052 { 00053 if (m_pComponentCache != pCache) m_pComponentCache = pCache; 00054 }; 00055 00056 SessionComponentCache* 00057 LightRegistrationProcessorBase:: 00058 GetComponentCache() 00059 { 00060 return m_pComponentCache; 00061 }; 00062 00063 00064 ComponentSetup* 00065 LightRegistrationProcessorBase:: 00066 GetComponentSetup() 00067 { 00068 if (m_pComponentCache) return m_pComponentCache->Setup(); 00069 return NULL; 00070 }; 00071 00072 const ComponentSetup* 00073 LightRegistrationProcessorBase:: 00074 GetComponentSetup() const 00075 { 00076 if (m_pComponentCache) return m_pComponentCache->Setup(); 00077 return NULL; 00078 }; 00079 00080 void 00081 LightRegistrationProcessorBase:: 00082 StartRegistration() 00083 { 00084 m_iResolutionLevel = 0; 00085 m_lCurIteration = 0; 00086 00087 m_bRegistrationStarted = true; 00088 if ((!m_pSessionInfo) || (!GetComponentSetup())) throwExceptionMacro("Cannot start registration; no setup and/or session info specified."); 00089 00090 ComputeRegistration(); 00091 00092 m_bRegistrationDone = true; 00093 //Will be definied in derived versions of the base class; 00094 }; 00095 00096 LightRegistrationProcessorBase:: 00097 LightRegistrationProcessorBase() 00098 { 00099 m_bRegistrationStarted = false; 00100 m_bRegistrationDone = false; 00101 fnOnNextLevel = NULL; 00102 fnOnNextIteration = NULL; 00103 fnOnProgress = NULL; 00104 m_iResolutionLevel = 0; 00105 m_lCurIteration = 0; 00106 m_pSessionInfo = 0; 00107 m_pComponentCache = 0; 00108 }; 00109 00110 LightRegistrationProcessorBase:: 00111 ~LightRegistrationProcessorBase() 00112 {}; 00113 00114 }//End of Namespace free
1.5.3 written by Dimitri van Heesch,
© 1997-2000