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: freGenericSetupToImageAdaptor.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 __freGenericSetupToImageAdaptor_h 00023 #define __freGenericSetupToImageAdaptor_h 00024 00025 #include "freElementals.h" 00026 #include "freSetup.h" 00027 #include "freAdaptationList.h" 00028 00029 namespace FREE 00030 { 00031 00041 class GenericSetupToImageAdaptor 00042 { 00043 public: 00044 virtual const char *GetNameOfClass() const 00045 {return "GenericSetupToImageAdaptor";}; 00046 00050 void SetTemplateSetup(Setup* pSetup); 00053 Setup* GetTemplateSetup(); 00054 00057 const Adaptation::AdaptationList& GetAdaptationList(); 00058 00061 void AddAdaptation (const Adaptation::Adaptation& adaptation); 00062 00066 void AddAdaptations (const Adaptation::AdaptationList& adaptations); 00067 00069 void Reset(); 00070 00072 void RestartAdaptation(); 00073 00077 bool EndOfAdaptation(); 00078 00081 const int GetCurrentAdaptationID(); 00082 00089 Setup::Pointer AdaptSetup(int iActualAdaptationItemID); 00090 00096 Setup::Pointer AdaptNextSetup(); 00097 00101 static void AdaptSetup(const Adaptation::Adaptation& adaptation, Setup& rSetup); 00102 00103 GenericSetupToImageAdaptor(); 00104 ~GenericSetupToImageAdaptor(); 00105 00106 protected: 00107 typedef std::vector<ComponentSetup*> ComponentVectorType; 00108 00109 static void AdaptSetupComponent(const Adaptation::AdaptationComponent* pAdaptComp, ComponentSetup* pComponentSetup); 00110 00111 static void AdaptComponent(const ComponentSetup* pAdaptComp, ComponentSetup* pComponentSetup); 00112 static void ExtendComponent(const ComponentSetup* pAdaptComp, ComponentSetup* pComponentSetup); 00113 static void ReplaceComponent(const ComponentSetup* pAdaptComp, ComponentSetup* pComponentSetup); 00114 static void OverwriteComponent(const ComponentSetup* pAdaptComp, ComponentSetup* pComponentSetup, Setup& rSetup); 00115 00116 static bool ValidateController(const ComponentSetup* pAdaptComp, const ComponentSetup* pComponentSetup); 00117 00120 int m_iCurrentAdaptation; 00121 00123 Setup* m_pTemplateSetup; 00124 00126 Adaptation::AdaptationList::Pointer m_AdaptationList; 00127 }; 00128 00129 }//End of Namespace free 00130 00131 #endif
1.5.3 written by Dimitri van Heesch,
© 1997-2000