00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef _SPINE_MESH_H
00011 #define _SPINE_MESH_H
00012
00026 class SpineMesh: public MeshCompt
00027 {
00028 public:
00029 SpineMesh();
00030 SpineMesh( const SpineMesh& other );
00031 ~SpineMesh();
00032
00034
00036
00041 void updateCoords();
00042
00044
00046
00054 vector< unsigned int > getParentVoxel() const;
00059 vector< unsigned int > getNeuronVoxel() const;
00060
00065 vector< Id > getElecComptMap() const;
00066
00068 vector< unsigned int > getStartVoxelInCompt() const;
00070 vector< unsigned int > getEndVoxelInCompt() const;
00071
00073
00075
00077 unsigned int getMeshType( unsigned int fid ) const;
00079 unsigned int getMeshDimensions( unsigned int fid ) const;
00081 double getMeshEntryVolume( unsigned int fid ) const;
00083 void setMeshEntryVolume( unsigned int fid, double volume );
00085 vector< double > getCoordinates( unsigned int fid ) const;
00087 vector< double > getDiffusionArea( unsigned int fid ) const;
00089 vector< double > getDiffusionScaling( unsigned int fid ) const;
00091 double extendedMeshEntryVolume( unsigned int fid ) const;
00092
00094
00097 unsigned int innerGetNumEntries() const;
00099 void innerSetNumEntries( unsigned int n );
00100
00102 unsigned int innerGetDimensions() const;
00103
00105 double vGetEntireVolume() const;
00106
00108 bool vSetVolumeNotRates( double volume );
00109
00111
00113
00115 void innerBuildDefaultMesh( const Eref& e,
00116 double volume, unsigned int numEntries );
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126 void innerHandleNodeInfo(
00127 const Eref& e,
00128 unsigned int numNodes, unsigned int numThreads );
00129
00130 void handleSpineList(
00131 const Eref& e,
00132 vector< Id > shaft, vector< Id > head,
00133 vector< unsigned int > parentVoxel );
00134
00135 void transmitChange( const Eref& e );
00136
00137 void buildStencil();
00138
00140
00142
00143 void matchMeshEntries( const ChemCompt* other,
00144 vector< VoxelJunction > & ret ) const;
00145
00146 void matchNeuroMeshEntries( const ChemCompt* other,
00147 vector< VoxelJunction > & ret ) const;
00148
00149 void matchCubeMeshEntries( const ChemCompt* other,
00150 vector< VoxelJunction > & ret ) const;
00151
00152 void matchSpineMeshEntries( const ChemCompt* other,
00153 vector< VoxelJunction > & ret ) const;
00154
00163 double nearest( double x, double y, double z,
00164 unsigned int& index ) const;
00165
00166 void indexToSpace( unsigned int index,
00167 double& x, double& y, double& z ) const;
00168
00169 const vector< double >& vGetVoxelVolume() const;
00170 const vector< double >& vGetVoxelMidpoint() const;
00171 const vector< double >& getVoxelArea() const;
00172 const vector< double >& getVoxelLength() const;
00174
00175 const vector< SpineEntry >& spines() const;
00177 static const Cinfo* initCinfo();
00178
00179 private:
00183 vector< SpineEntry > spines_;
00184
00190 double surfaceGranularity_;
00191
00197 vector< double > vs_;
00198
00203 vector< double > area_;
00204
00206 vector< double > length_;
00207 };
00208
00209
00210 #endif // _SPINE_MESH_H