freConstrainedSetupTransform.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: freConstrainedSetupTransform.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 "freConstrainedSetupTransform.h"
00024 #include "freExceptions.h"
00025 #include "freComponentSetupBrowser.h"
00026 #include "freSetupParameterTraitsGenerator.h"
00027 
00028 #include <map>
00029 
00030 #include "muParser.h"
00031 
00032 namespace FREE
00033 {
00034 
00038 
00039 
00040 
00041 void
00042 ConstrainedSetupTransform::
00043 ResetParameterConstraints()
00044 {
00045   this->m_Constraints.Reset();
00046   this->m_bTraitsInitialized = false;
00047 };
00048 
00049 void
00050 ConstrainedSetupTransform::
00051 AddParameterConstraint(const SetupParameterConstraint& constraint)
00052 {
00053         this->m_Constraints.AddElement(constraint);
00054   this->m_bTraitsInitialized = false;
00055 };
00056 
00057 ConstrainedSetupTransform::
00058 ConstrainedSetupTransform()
00059 {
00060   this->m_Constraints.Reset();
00061 }; 
00062 
00063 ConstrainedSetupTransform::ParameterTraitsList
00064 ConstrainedSetupTransform::
00065 ComputeParametersTraits( const ParametersType & p, ParametersType& validP) const
00066 {
00067         SetupParameterTraitsGenerator::Pointer calculator = SetupParameterTraitsGenerator::New();
00068 
00069         SetupParameterTraitsGenerator::ParameterTypeList typeList;
00070 
00071         for (unsigned int i= 0; i<this->m_Parameters.Size(); i++)
00072         {
00073                 typeList.push_back(this->GetParameterValueType(m_ParameterIDs[i]));
00074         }
00075 
00076         calculator->AddParameterConstraints(this->m_Constraints);
00077         calculator->AddParameterTypes(typeList);
00078 
00079   return calculator->ComputeParametersTraits(p, validP);
00080 };
00081 
00082 }//End of Namespace free

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