ITK  4.4.0
Insight Segmentation and Registration Toolkit
itkBioCellularAggregate.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 __itkBioCellularAggregate_h
19 #define __itkBioCellularAggregate_h
20 
22 #include "itkMesh.h"
23 #include "itkImage.h"
24 #include "itkBioCell.h"
25 #include "itkPolygonCell.h"
26 
27 #include <iostream>
28 #include <vector>
29 
30 namespace itk
31 {
32 namespace bio
33 {
42 template< unsigned int NSpaceDimension = 3 >
44 {
45 public:
51 
52 /*** Run-time type information (and related methods). */
53  itkTypeMacro(BioCellularAggregate, CellularAggregateBase);
54 
56  itkNewMacro(Self);
57 
58  itkStaticConstMacro(SpaceDimension, unsigned int, NSpaceDimension);
59 
60 /*** Type to be used for data associated with each point in the mesh. */
63  typedef double CellPixelType;
64 
67  PointPixelType, // PixelType
68  NSpaceDimension, // Points Dimension
69  NSpaceDimension, // Max.Topological Dimension
70  double, // Type for coordinates
71  double, // Type for interpolation
72  CellPixelType // Type for values in the cells
74 
76  typedef Mesh< PointPixelType,
77  NSpaceDimension,
79 
81  typedef typename MeshType::Pointer MeshPointer;
83  typedef typename MeshType::PointType PointType;
85 
89  typedef typename PointsContainer::Iterator PointsIterator;
90  typedef typename PointDataContainer::Iterator CellsIterator;
91  typedef typename VoronoiRegionsContainer::Iterator VoronoiIterator;
92  typedef typename PointsContainer::ConstIterator PointsConstIterator;
93  typedef typename PointDataContainer::ConstIterator CellsConstIterator;
94  typedef typename VoronoiRegionsContainer::ConstIterator VoronoiConstIterator;
96 
98  typedef CellInterface<
99  typename MeshType::CellPixelType,
101 
103  typedef typename VoronoiRegionType::SelfAutoPointer VoronoiRegionAutoPointer;
104 
106  typedef float ImagePixelType;
110  typedef std::vector< SubstratePointer > SubstratesVector;
111 
112 public:
113  unsigned int GetNumberOfCells(void) const;
114 
115  static unsigned int GetDimension() { return SpaceDimension; }
116 
117  void SetGrowthRadiusLimit(double value);
118 
119  void SetGrowthRadiusIncrement(double value);
120 
121  itkGetModifiableObjectMacro(Mesh, MeshType);
122 
123  virtual void AdvanceTimeStep(void);
124 
125  virtual void SetEgg(BioCellType *cell, const PointType & position);
126 
127  virtual void Add(CellBase *cell);
128 
129  virtual void Add(CellBase *cell, const VectorType & perturbation);
130 
131  virtual void Add(CellBase *cellA, CellBase *cellB, double perturbationLength);
132 
133  virtual void Remove(CellBase *cell);
134 
135  virtual void GetVoronoi(IdentifierType cellId, VoronoiRegionAutoPointer &) const;
136 
137  void DumpContent(std::ostream & os) const;
138 
139  virtual void AddSubstrate(SubstrateType *substrate);
140 
141  virtual SubstratesVector & GetSubstrates(void);
142 
143  virtual SubstrateValueType GetSubstrateValue(IdentifierType cellId,
144  unsigned int substrateId) const;
145 
146  virtual void KillAll(void);
147 
148 protected:
150  virtual ~CellularAggregate();
151  CellularAggregate(const Self &);
152  void operator=(const Self &);
153 
154  void PrintSelf(std::ostream & os, Indent indent) const;
155 
156  virtual void ComputeForces(void);
157 
158  virtual void UpdatePositions(void);
159 
160  virtual void ComputeClosestPoints(void);
161 
162  virtual void ClearForces(void);
163 
164 private:
165 
171 };
172 } // end namespace bio
173 } // end namespace itk
174 
175 #ifndef ITK_MANUAL_INSTANTIATION
176 #include "itkBioCellularAggregate.hxx"
177 #endif
178 
179 #endif
180