ITK  4.2.0
Insight Segmentation and Registration Toolkit
itkBioGenome.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef __itkBioGenome_h
19 #define __itkBioGenome_h
20 
21 
22 #if defined( _WIN32 )
23 #include "itkWindows.h"
24 #endif
25 #include "itkMacro.h"
26 
27 #include <map>
28 #include <string>
29 #include "vcl_cmath.h"
30 
31 namespace itk
32 {
33 namespace bio
34 {
44 class ITK_EXPORT Genome
45 {
46 public:
47  typedef std::string GeneIdType;
48  typedef std::map< GeneIdType, double > MapType;
49 public:
50  Genome();
51  virtual ~Genome();
52 
53  void Copy(const Genome & genome);
54 
55  void InsertGene(const GeneIdType & geneId);
56 
57  void KnockOutGene(const GeneIdType & geneId);
58 
59  double GetExpressionLevel(const GeneIdType & geneId);
60 
61  void SetExpressionLevel(const GeneIdType & geneId, double level);
62 
65  static double Sigmoide(double threshold, double slant, double value)
66  {
67  return vcl_atan( ( value - threshold ) / slant ) / 3.1416 + 0.5001;
68  }
69 
70 private:
72 };
73 } // end namespace bio
74 } // end namespace itk
75 
76 #endif
77