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 __itkBioCellBase_h 00019 #define __itkBioCellBase_h 00020 00021 #include "itkRGBPixel.h" 00022 #include "itkPoint.h" 00023 #include "itkIntTypes.h" 00024 #include "itkBioGenome.h" 00025 00026 namespace itk 00027 { 00028 namespace bio 00029 { 00036 class ITK_EXPORT CellBase 00037 { 00038 public: 00039 typedef itk::RGBPixel< float > ColorType; 00040 typedef itk::IdentifierType IdentifierType; 00041 typedef itk::bio::Genome GenomeType; 00042 typedef GenomeType::GeneIdType GeneIdType; 00043 00044 virtual ColorType GetColor(void) const; 00045 00046 double GetRadius(void) const; 00047 00048 IdentifierType GetSelfIdentifier(void) const; 00049 00050 IdentifierType GetParentIdentifier(void) const; 00051 00052 enum CellCycleState 00053 { 00054 M = 1UL, 00055 Gap1, 00056 S, 00057 Gap2, 00058 Gap0, 00059 Apop 00060 }; 00061 protected: 00062 CellBase(); 00063 virtual ~CellBase(); 00064 00065 virtual void Grow(void); 00066 00067 virtual void DNAReplication(void); 00068 00069 virtual void Apoptosis(void); 00070 00071 virtual void EnergyIntake(void); 00072 00073 virtual void NutrientsIntake(void); 00074 00075 virtual void ComputeGeneNetwork(void); 00076 00077 virtual void SecreteProducts(void); 00078 00079 virtual bool CheckPointGrowth(void); 00080 00081 virtual bool CheckPointDNAReplication(void); 00082 00083 virtual bool CheckPointMitosis(void); 00084 00085 virtual bool CheckPointApoptosis(void); 00086 00087 void MarkForRemoval(void); 00088 00089 // Static Members 00090 static ColorType DefaultColor; 00091 00092 static GeneIdType BlueGene; // Pigment genes 00093 static GeneIdType RedGene; 00094 static GeneIdType GreenGene; 00095 static GeneIdType Cdk2E; // cell cycle control genes 00096 static GeneIdType Caspase; // cleavage enzyme: apoptosis effector 00097 static GeneIdType Pressurin; // signal from micro-tubules subject to 00098 // stress 00099 00100 static SizeValueType MaximumGenerationLimit; 00101 static SizeValueType GrowthMaximumLatencyTime; 00102 static SizeValueType DivisionMaximumLatencyTime; 00103 00104 static double EnergySelfRepairLevel; 00105 static double NutrientSelfRepairLevel; 00106 00107 static double DefaultEnergyIntake; 00108 static double DefaultNutrientsIntake; 00109 00110 static SizeValueType Counter; 00111 00112 static ColorType WellNourishedColor; 00113 static ColorType HopefullColor; 00114 static ColorType StarvingColor; 00115 00116 static double ChemoAttractantLowThreshold; 00117 static double ChemoAttractantHighThreshold; 00118 00119 GenomeType *m_Genome; 00120 GenomeType *m_GenomeCopy; 00121 00122 static double DefaultRadius; 00123 static double GrowthRadiusLimit; 00124 static double GrowthRadiusIncrement; 00125 public: 00126 00127 virtual bool MarkedForRemoval(void) const; 00128 00129 static void SetDefaultRadius(double); 00130 00131 static void SetGrowthRadiusLimit(double); 00132 00133 static void SetGrowthRadiusIncrement(double); 00134 00135 static void SetEnergySelfRepairLevel(double); 00136 00137 static void SetNutrientSelfRepairLevel(double); 00138 00139 static void SetDefaultColor(const ColorType & color); 00140 00141 static void SetChemoAttractantHighThreshold(double); 00142 00143 static void SetChemoAttractantLowThreshold(double); 00144 00145 static void SetGrowthMaximumLatencyTime(SizeValueType latency); 00146 00147 static SizeValueType GetGrowthMaximumLatencyTime(void); 00148 00149 static double GetGrowthRadiusLimit(void); 00150 00151 static void SetMaximumGenerationLimit(SizeValueType); 00152 00153 static void SetDivisionMaximumLatencyTime(SizeValueType); 00154 00155 static SizeValueType GetDivisionMaximumLatencyTime(void); 00156 00157 static void ResetCounter(void); 00158 00159 static void Initialize(void); // define values in static variables. 00160 00161 protected: 00162 double m_Pressure; 00163 00164 ColorType m_Color; 00165 00166 double m_Radius; 00167 double m_EnergyReserveLevel; 00168 double m_NutrientsReserveLevel; 00169 00170 SizeValueType m_GrowthLatencyTime; 00171 00172 IdentifierType m_ParentIdentifier; 00173 IdentifierType m_SelfIdentifier; 00174 00175 SizeValueType m_Generation; 00176 00177 CellCycleState m_CycleState; 00178 00179 bool m_MarkedForRemoval; 00180 SizeValueType m_DivisionLatencyTime; 00181 00182 bool m_ScheduleApoptosis; 00183 double m_ChemoAttractantLevel; 00184 }; 00185 } // end namespace bio 00186 } // end namespace itk 00187 00188 #endif 00189