freSetupParameterTraitsGenerator.h

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: freSetupParameterTraitsGenerator.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 __freSetupParameterTraitsGenerator_h
00023 #define __freSetupParameterTraitsGenerator_h
00024 
00025 #include "freElementals.h"
00026 #include "freSetup.h"
00027 
00028 #include "freSetupParameterTraits.h"
00029 #include "freSetupParameterConstraints.h"
00030 
00031 namespace FREE
00032 {
00033 
00043         class ITK_EXPORT  SetupParameterTraitsGenerator : public itk::LightObject
00044 {
00045 public:
00047   typedef SetupParameterTraitsGenerator  Self;
00048         typedef itk::LightObject Superclass;
00049   typedef itk::SmartPointer< Self >   Pointer;
00050   typedef itk::SmartPointer< const Self >  ConstPointer;
00051 
00053         typedef itk::Array< double >           ParametersType;
00054 
00056         typedef std::vector<SetupParameterTraits>    ParameterTraitsList;
00057 
00058         typedef std::vector<Parameter::ParameterValueType>    ParameterTypeList;
00059 
00061   itkTypeMacro( SetupParameterTraitsGenerator, TransformBase );
00062 
00063         itkNewMacro(Self);
00064 
00065   virtual ParameterTraitsList ComputeParametersTraits( const ParametersType & p, ParametersType& validP) const;
00066   virtual ParameterTraitsList ComputeParametersTraits( const ParameterTypeList& typeList, const ParametersType & p, ParametersType& validP) const;
00067 
00068         void AddParameterTypes(const ParameterTypeList& typeList);
00069 
00071         void ResetParameterConstraints();
00072 
00074         void AddParameterConstraint(const SetupParameterConstraint& constraint);
00075 
00077         void AddParameterConstraints(const SetupParameterConstraints& constraints);
00078 
00079 protected:
00080   typedef SetupParameterConstraint::ParameterIDsType            ParameterIDsType;
00081         typedef SetupParameterConstraints::ElementVectorType    SetupParameterConstraintList;
00082 
00083   SetupParameterTraitsGenerator(); 
00084 
00085   ParameterIDsType GetParameterOrder() const;
00086 
00087   SetupParameterTraits ComputeTraits(const int& iParamID,
00088                                                  const Parameter::ParameterValueType& parameterType,
00089                                                                                                                                                  const double& dValue,
00090                                      const SetupParameterConstraintList& constraints) const;
00091 
00092         SetupParameterConstraints m_Constraints;
00093 
00094         ParameterTypeList m_ParameterTypes;
00095 
00096   mutable ParameterIDsType m_ParameterOrder;
00097 
00100   mutable ParametersType m_TempParamValues;
00101 
00104         mutable unsigned int m_iNumberOfParameters;
00105 
00107         mutable bool m_bTraitsInitialized;
00108 };
00109 
00110 }//End of Namespace free
00111 
00112 #endif

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