freSetupParameterConstraint.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: freSetupParameterConstraint.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 __freSetupParameterConstraint_h
00023 #define __freSetupParameterConstraint_h
00024 
00025 #include "freElementals.h"
00026 
00027 #include "itkNumericTraits.h"
00028 #include "itkLightObject.h"
00029 
00030 namespace FREE
00031 {
00032 
00052 class SetupParameterConstraint: public itk::LightObject
00053 {
00054 public:
00055   typedef SetupParameterConstraint  Self;
00056   typedef itk::LightObject Superclass;
00057   typedef itk::SmartPointer<Self>        Pointer;
00058   typedef itk::SmartPointer<const Self>  ConstPointer;
00059 
00060         typedef int ParameterIDType;
00061         typedef std::vector<ParameterIDType> ParameterIDsType;
00062 
00063         enum RelationType
00064         {
00065                 RTEqual = 0,
00066                 RTLesserOrEqual = 1,
00067                 RTGreaterOrEqual = 2
00068         };
00069 
00070   itkTypeMacro(SetupParameterConstraint, LightObject);
00071   itkNewMacro(SetupParameterConstraint);
00072   static Pointer New(ParameterIDType destinationID, RelationType relation,const std::string sTerm);
00073 
00075         ParameterIDType GetDestinationID(void) const { return m_DestinationID;};
00076 
00077         RelationType GetRelationType(void) const { return m_RelationType; };
00078 
00079         const std::string& GetConstraintTerm(void) const { return m_sTerm; };
00080 
00081         const ParameterIDsType& GetConstraintParameters() const { return m_ConstraintParameters; };
00082 
00083   SetupParameterConstraint& operator = (const SetupParameterConstraint& constraint);
00084 
00085 protected:
00086         SetupParameterConstraint(ParameterIDType destinationID, RelationType relation,
00087                                                                                                          const std::string sTerm);
00088 
00089         SetupParameterConstraint();
00090 
00091   ParameterIDsType ParseTermForParameters(const std::string& sTerm) const;
00092 
00093         ParameterIDType m_DestinationID;
00094         RelationType m_RelationType;
00095         std::string m_sTerm;
00096 
00097   ParameterIDsType m_ConstraintParameters;
00098 private:
00099         //suppresses default copy constructor
00100   SetupParameterConstraint(const SetupParameterConstraint& constraint);
00101 };
00102 
00103 namespace Convert
00104 {
00105   std::string ToStr(const SetupParameterConstraint::RelationType& rt);
00106   SetupParameterConstraint::RelationType ToRelationType(const std::string& sValue);
00107   SetupParameterConstraint::RelationType ToRelationType(const int& iValue);
00108 }
00109 
00110 }//End of Namespace free
00111 
00112 #endif

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