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: freVersorRigid3DTransformOptimizerController.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 00023 #include "freVersorRigid3DTransformOptimizerController.h" 00024 #include "freExceptions.h" 00025 00026 namespace FREE 00027 { 00028 00032 00033 00034 VersorRigid3DTransformOptimizerController:: 00035 VersorRigid3DTransformOptimizerController() 00036 { 00037 //Profile settings 00038 this->UpdateControllerID("VersorRigid3DTransformOptimizerBase"); 00039 this->UpdateControllerID(ControllerID::VersorRigid3DTransformOptimizerController); 00040 this->m_Description = "Optimizes versor rigid 3D transformations."; 00041 }; 00042 00043 void 00044 VersorRigid3DTransformOptimizerController:: 00045 GenerateProfile(CtrlProfile::ControllerProfile& profile, 00046 const SessionComponentCache* pComponentCache, 00047 bool bRegardOldSetup) const 00048 { 00049 Superclass::GenerateProfile(profile,pComponentCache,bRegardOldSetup); 00050 00051 //Only verso transforms are allowed to interact with these optimizer 00052 //in the same registration processor, to ensure proper optimization. 00053 CtrlProfile::ProfileOption* pOption = profile.Requirements().AddRequirement(std::string("../")+cComp_MainTransform)->AddProfileOption(); 00054 pOption->Inheritance().AddAncestor("Versor Rigid 3D Transform"); 00055 pOption->CheckForInheritance(); 00056 }; 00057 00058 VersorRigid3DTransformOptimizerController::~VersorRigid3DTransformOptimizerController() 00059 { 00060 }; 00061 00062 VersorRigid3DTransformOptimizerController::MeasuresType 00063 VersorRigid3DTransformOptimizerController:: 00064 GetCurrentValue(ComponentType* pOptimizer) const 00065 { 00066 MeasuresType values(1); 00067 values.Fill(pOptimizer->GetValue()); 00068 return values; 00069 }; 00070 00071 } //end of namespace free
1.5.3 written by Dimitri van Heesch,
© 1997-2000