ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkBioGene.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 #ifndef __itkBioGene_h
00019 #define __itkBioGene_h
00020 
00021 
00022 #include <string>
00023 #include <vector>
00024 #include <map>
00025 #include "itkMacro.h"
00026 
00027 namespace itk
00028 {
00029 namespace bio
00030 {
00042 class ITK_EXPORT Gene
00043 {
00044 public:
00045   typedef   std::string                          NameType;
00046   typedef   std::string                          DomainType;
00047   typedef   double                               AffinityType;
00048   typedef   std::map< DomainType, AffinityType > ProteinDomainsType;
00049 
00050   typedef   struct {
00051     DomainType m_Domain;
00052     bool m_Type;
00053   }                                             ControlDomainType;
00054 
00055   typedef   std::vector< ControlDomainType > GeneControlDomainsType;
00056 public:
00057   Gene();
00058   virtual ~Gene();
00059 
00060   void Copy(const Gene & genome);
00061 
00063   void SetName(const NameType & name);
00064 
00065   void SetName(const char *name);
00066 
00067   const char * GetName() const;
00068 
00074   void AddProteinDomain(const DomainType & domain, AffinityType affinity);
00075 
00079   void AddGeneControlDomain(const DomainType & domain, bool type);
00080 
00081 private:
00082   NameType               m_Name;
00083   GeneControlDomainsType m_ControlDomains;
00084   ProteinDomainsType     m_ProteinDomains;
00085 };
00086 } // end namespace bio
00087 } // end namespace itk
00088 
00089 #endif
00090