ITK
4.1.0
Insight Segmentation and Registration Toolkit
|
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 __itkBioGenome_h 00019 #define __itkBioGenome_h 00020 00021 00022 #if defined( _WIN32 ) 00023 #include "itkWindows.h" 00024 #endif 00025 #include "itkMacro.h" 00026 00027 #include <map> 00028 #include <string> 00029 #include "vcl_cmath.h" 00030 00031 namespace itk 00032 { 00033 namespace bio 00034 { 00044 class ITK_EXPORT Genome 00045 { 00046 public: 00047 typedef std::string GeneIdType; 00048 typedef std::map< GeneIdType, double > MapType; 00049 public: 00050 Genome(); 00051 virtual ~Genome(); 00052 00053 void Copy(const Genome & genome); 00054 00055 void InsertGene(const GeneIdType & geneId); 00056 00057 void KnockOutGene(const GeneIdType & geneId); 00058 00059 double GetExpressionLevel(const GeneIdType & geneId); 00060 00061 void SetExpressionLevel(const GeneIdType & geneId, double level); 00062 00065 static double Sigmoide(double threshold, double slant, double value) 00066 { 00067 return vcl_atan( ( value - threshold ) / slant ) / 3.1416 + 0.5001; 00068 } 00069 00070 private: 00071 MapType m_Map; 00072 }; 00073 } // end namespace bio 00074 } // end namespace itk 00075 00076 #endif 00077