Go to the documentation of this file. 1 #ifndef DivisionAnalysisUtils_H
2 #define DivisionAnalysisUtils_H
20 typedef std::pair<std::set<cell>, std::set<cell> >
CellSetPair;
25 typedef std::pair<Point3d, int>
P3dInt;
26 typedef std::pair<P3dDouble, double>
P3dDD;
27 typedef std::pair<Point3d,Point3d>
P3dP3d;
30 typedef std::pair<int, int>
IntInt;
32 typedef std::pair<vertex, vertex>
VtxVtx;
33 typedef std::pair<VtxVtx, vertex>
Tri;
34 typedef std::pair<VtxVtx, vertex>
Vtxvtxp;
35 typedef std::pair<vertex, int>
VtxInt;
51 bool writeCsvFile(QString filename, QString header, vector<vector<double> >& data);
61 double calcRatio(
double value1,
double value2);
155 void generateSamplingDirections(
double resolution,
int centerVarSteps,
double centerVarStepSize, std::vector<P3dDouble>& samplingDirections);
158 Point3d perpendicularPlane, std::set<Point3d> perpPlaneNormals2,
bool enforceDivThroughNeighbor,
159 std::vector<P3dDouble>& samplingDirections);
162 std::set<Point3d> perpPlaneNormals2,
163 std::unordered_map<Point3d, Point3d>& wallCenter, std::unordered_map<
Point3d, std::vector<Point3d> > wallPoints,
164 std::vector<P3dDouble>& samplingDirections);
179 void estimateVolumeDaughterCells(std::vector<Triangle>& trisLeft, std::vector<Triangle>& trisRight, std::vector<Triangle>& trisSplit);
187 void calcRandWalkBetweenness(std::map<IntInt, double>& neighborhoodWeights, std::map<int, int>& labelPosMap, std::vector<int>& orderedLabels,
188 std::map<int, double>& cellBetweenessMap,
bool useGPU);
192 bool useGPU,
bool doRevCuthill);
204 std::vector<vertex>
getOrRemoveCommonWall(
Mesh *m, std::vector<vertex>& cellVtxs,
bool removeCommon,
bool includeEdgeOfShared);
206 std::vector<Triangle>
getOrRemoveCommonWall(
Mesh *mesh, std::vector<Triangle>& cellTris,
bool removeCommon,
bool mergeDuplicated);
211 std::set<vertex> &borderVtxs,
double mergingThreshold,
int labelCounter,
bool orientCheck);
std::pair< cell, cell > cCPair
double calcVolume(vector< Triangle > tris)
double avgCellSizeMGX3D(const cell &c)
returns an approximation of the 3D cell size (the average of the distance of every vertex to the cell...
std::pair< cell, double > cellDPair
bool planeSegmentIntersect(const Point3d &p, const Point3d &nrml, const Point3d &u1, const Point3d &u2, Point3d &intersectP)
void generateSamplingDirectionsNew(int nrPlanes, int centerVarSteps, double centerVarStepSize, std::vector< P3dDouble > &samplingDirections)
returns the area of a polygon
std::pair< Point3d, Point3d > P3dP3d
std::vector< Point3d > getSharedVtxs(const cell &c1, const cell &c2)
returns the area of a polygon
std::pair< vertex, int > VtxInt
std::pair< int, int > IntInt
std::vector< Triangle > getOrRemoveCommonWall(Mesh *mesh, std::vector< Triangle > &cellTris, bool removeCommon, bool mergeDuplicated)
double divisionPlaneArea(Point3d cellCenter, const std::vector< Point3d > &v)
returns the area of a polygon (=division plane)
CU_HOST_DEVICE const const T T c2
void cellTriNeighbors(cellGraph &C, const cell &c, std::map< Triangle, int > &trisNeighbMap)
bool findCell(cellGraph &C, cell &searchedCell, int label, int &maxLabel)
returns whether a cell with the specified label exists, also provides the cell and the max Label of a...
Distributed matrix library.
mgx_EXPORT bool neighborhoodGraph(const vvGraph &S, double tolerance, NhbdGraphInfo &info, bool throwError=true)
std::set< Triangle > getSharedTris(const cell &c1, const cell &c2)
void generateSamplingDirections(double resolution, int centerVarSteps, double centerVarStepSize, Point3d perpendicularPlane, std::set< Point3d > perpPlaneNormals2, bool enforceDivThroughNeighbor, std::vector< P3dDouble > &samplingDirections)
std::pair< vertex, vertex > VtxVtx
double calcRatio(double value1, double value2)
return the ratio ( = bigger value divided by smaller value)
void assembleCellFromWalls(vvGraph &S, std::vector< vertex > vtxs, std::vector< Point3i > tris, std::set< vertex > &borderVtxs, double mergingThreshold, int labelCounter, bool orientCheck)
std::pair< cell, double > VtxDouble
double estimateVolumeOpenBody(std::vector< Triangle > tris, set< vertex > &exposedVtxs)
bool writeCsvFile(QString filename, QString header, vector< vector< double > > &data)
write a 2D array to a (csv) file
void addCenterDisplacementTestCut(int centerVarSteps, double centerVarStepSize, Point3d cellCenter, Point3d perpendicularPlane, std::set< Point3d > perpPlaneNormals2, std::unordered_map< Point3d, Point3d > &wallCenter, std::unordered_map< Point3d, std::vector< Point3d > > wallPoints, std::vector< P3dDouble > &samplingDirections)
std::pair< Point3d, double > P3dDouble
std::pair< P3dDouble, double > P3dDD
void calcCellGraphJoinedCells(cellGraph &C, const cell &c1, const cell &c2)
add the neighbors of c2 to the cell graph of c1
void separateIdenticalVtxs(const cell &c)
void copyCellGraph(CellTissue &orig, CellTissue ©)
copies the cell graph, used for simulating cell division (without altering the original)
CU_HOST_DEVICE const const T c1
void calcRandWalkBetweenness(std::map< IntInt, double > &neighborhoodGraph, std::map< int, double > &labelBetweenessMap, bool useGPU)
std::pair< Point3d, int > P3dInt
std::pair< VtxVtx, vertex > Vtxvtxp
std::vector< Triangle > getTrisOfCells(Mesh *m, int selectedLabel, bool parentMode)
std::pair< IntInt, double > IntIntDouble
void calcJoinedCell(const cell &c1, const cell &c2, vvGraph &result, bool simple)
returns the area of a polygon
void estimateVolumeDaughterCells(std::vector< Triangle > &trisLeft, std::vector< Triangle > &trisRight, std::vector< Triangle > &trisSplit)
pair< Triangle, int > TriInt
std::pair< std::set< cell >, std::set< cell > > CellSetPair
double divisionPlaneAreaMulti(Point3d cellCenter, const std::vector< std::vector< Point3d > > &vMulti)
returns the summed area of multiple polygons (=division planes)
std::vector< vertex > getVtxsOfCells(Mesh *m, int selectedLabel, bool parentMode)
double calcTriArea(std::set< Triangle > &tris)
std::pair< Point3d, Point3d > PlaneNrmlPoint
bool planePolygonIntersect(Point3d planeNrml, Point3d planePos, std::vector< Point3d > polygonVtxs)
std::pair< VtxVtx, vertex > Tri
std::pair< Point3d, bool > P3dboolPair
void findNeighbTris(cellGraph &C, const cell &c, std::map< cell, std::vector< Triangle > > &neighbTris)
CU_HOST_DEVICE Vector< dim, T > map(const T &(*fct)(const T1 &), const Vector< dim, T1 > &v)