MorphoGraphX  2.0-1-227
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
mgx::CellTissue Class Reference

#include <CellTissue.hpp>

Public Types

enum  DivAlg {
  SHORTEST_WALL, CLOSEST_MID, CLOSEST_WALL, SHORTEST_DIR,
  PREDEFINED_DIR
}
 Type of cell division SHORTEST WALL : CLOSEST MID : take midpoints of all wall segments and check which one is the closest to the center vertex of the cell CLOSEST WALL : SHORTEST DIR : test various directions (through the cell center) and divide along the shortes dir PREDEFINED DIR : More...
 
enum  UpdGeom {
  UPD_AREA, UPD_LENGTH, UPD_CENTER, UPD_NORMAL,
  UPD_VOLUME, UPD_WALLSZ
}
 Type of update to geoemtry. More...
 
typedef DistNhbd< vvGraphDistNhbdS
 
typedef DistNhbd< cellGraphDistNhbdC
 
typedef std::pair< int, int > IntInt
 Create a 3D cellular tissue. More...
 
typedef std::pair< IntInt, double > IntIntDouble
 

Public Member Functions

 CellTissue ()
 
const QString & meshType ()
 Returns a reference to the mesh type. More...
 
const QString & setMeshType (const QString &meshType)
 
int viewLabel () const
 Returns the current label, without modifying it. More...
 
void setLabel (int l)
 Sets the current label. More...
 
int nextLabel ()
 Increment the current label and return. More...
 
bool chkGraph (const vvGraph &S) const
 Check the graph for consistency. More...
 
void updGeometry ()
 Set area, length of cell walls, center and normal. More...
 
void updGeometry (int mode)
 
void updGeometry (const cell &c)
 Set area, length of cell walls, center and normal. More...
 
void updGeometry (const cell &c, int mode)
 
bool hasCellGraph ()
 
bool divideCell (const cell &c, Subdivide *sDiv, DivAlg divAlg=SHORTEST_WALL)
 Divide a cell. More...
 
bool divideCell (const cell &c, Subdivide *sDiv, DivAlg divAlg, std::vector< Point3d > &nrmls)
 Divide a cell with a list of possible directions (only required for SHORTEST_DIR) More...
 
void deleteCell (const cell &c)
 Delete a cell from the graph. More...
 
void processParms (const QStringList &parms)
 Read the parameters for the cell tissue from MGX GUI. More...
 
void processParmsDivide (const QStringList &parms)
 
bool addCell (std::vector< vertex > poly)
 Add a cell to the mesh, the first position is the center. More...
 
bool toMgxm ()
 Create a normal MorphoGraphX mesh (from any other type) More...
 
bool toMgxc (double wallMax=0)
 Generate a simplified cell mesh (MGXC) from a normal (MGXM) one or from MGX2D. More...
 
bool toMgx2d (double wallMax=0)
 Create a 2D cellular tissue, from MGXC. More...
 
bool createTissueGraphs (vvGraph &cS, vvGraph &cJ, cellGraph &cC, double wallMax=0)
 
void getNeighborhoodMap3D (std::map< IntInt, double > &neighborMap)
 
bool toMgx3d (double tolerance=0, double neighborMinArea=0)
 
void updateAllGraph ()
 Create/update all graph from 3D cell tissue (stored in S) More...
 
bool loadCellTissueFromText (const QString &fileName)
 See if mesh is a cell mesh (MGXM), and if so, correct the vertex types. More...
 
bool saveCellTissueToText (const QString &fileName)
 Save cell mesh from a text file. More...
 
cell getCell (vertex v)
 Return a vertex from the cell. More...
 
vertex getVtx (cell c)
 Return a vertex from the cell. More...
 
bool assocCellVertex (vertex &v, cell &m)
 

Static Public Member Functions

static DivAlg stringToDivAlg (const QString &s)
 Map a string to the enum. More...
 

Public Attributes

vvGraph S
 
vvGraph J
 
cellGraph C
 
DistNhbdS nhbdS
 
DistNhbdC nhbdC
 
float CellMaxArea
 
DivAlg CellDivAlg
 

Detailed Description

Definition at line 46 of file CellTissue.hpp.

Member Typedef Documentation

◆ DistNhbdC

Definition at line 71 of file CellTissue.hpp.

◆ DistNhbdS

Definition at line 69 of file CellTissue.hpp.

◆ IntInt

typedef std::pair<int, int> mgx::CellTissue::IntInt

Create a 3D cellular tissue.

Definition at line 190 of file CellTissue.hpp.

◆ IntIntDouble

typedef std::pair<IntInt, double> mgx::CellTissue::IntIntDouble

Definition at line 191 of file CellTissue.hpp.

Member Enumeration Documentation

◆ DivAlg

Type of cell division SHORTEST WALL : CLOSEST MID : take midpoints of all wall segments and check which one is the closest to the center vertex of the cell CLOSEST WALL : SHORTEST DIR : test various directions (through the cell center) and divide along the shortes dir PREDEFINED DIR :

Enumerator
SHORTEST_WALL 
CLOSEST_MID 
CLOSEST_WALL 
SHORTEST_DIR 
PREDEFINED_DIR 

Definition at line 57 of file CellTissue.hpp.

◆ UpdGeom

Type of update to geoemtry.

Enumerator
UPD_AREA 
UPD_LENGTH 
UPD_CENTER 
UPD_NORMAL 
UPD_VOLUME 
UPD_WALLSZ 

Definition at line 62 of file CellTissue.hpp.

Constructor & Destructor Documentation

◆ CellTissue()

mgx::CellTissue::CellTissue ( )
inline

Definition at line 75 of file CellTissue.hpp.

Member Function Documentation

◆ addCell()

bool mgx::CellTissue::addCell ( std::vector< vertex poly)

Add a cell to the mesh, the first position is the center.

◆ assocCellVertex()

bool mgx::CellTissue::assocCellVertex ( vertex v,
cell m 
)
inline

Definition at line 236 of file CellTissue.hpp.

◆ chkGraph()

bool mgx::CellTissue::chkGraph ( const vvGraph S) const

Check the graph for consistency.

◆ createTissueGraphs()

bool mgx::CellTissue::createTissueGraphs ( vvGraph cS,
vvGraph cJ,
cellGraph cC,
double  wallMax = 0 
)

◆ deleteCell()

void mgx::CellTissue::deleteCell ( const cell c)

Delete a cell from the graph.

◆ divideCell() [1/2]

bool mgx::CellTissue::divideCell ( const cell c,
Subdivide sDiv,
DivAlg  divAlg,
std::vector< Point3d > &  nrmls 
)

Divide a cell with a list of possible directions (only required for SHORTEST_DIR)

◆ divideCell() [2/2]

bool mgx::CellTissue::divideCell ( const cell c,
Subdivide sDiv,
DivAlg  divAlg = SHORTEST_WALL 
)

Divide a cell.

◆ getCell()

cell mgx::CellTissue::getCell ( vertex  v)
inline

Return a vertex from the cell.

Definition at line 218 of file CellTissue.hpp.

◆ getNeighborhoodMap3D()

void mgx::CellTissue::getNeighborhoodMap3D ( std::map< IntInt, double > &  neighborMap)

◆ getVtx()

vertex mgx::CellTissue::getVtx ( cell  c)
inline

Return a vertex from the cell.

Definition at line 229 of file CellTissue.hpp.

◆ hasCellGraph()

bool mgx::CellTissue::hasCellGraph ( )

◆ loadCellTissueFromText()

bool mgx::CellTissue::loadCellTissueFromText ( const QString &  fileName)

See if mesh is a cell mesh (MGXM), and if so, correct the vertex types.

Read cell mesh from a text file.

◆ meshType()

const QString& mgx::CellTissue::meshType ( )
inline

Returns a reference to the mesh type.

Types: MGXM - normal mesh MGXC - cell mesh MGX2D - cell mesh plus cell graph MGX3D - 3D cellular mesh

Definition at line 91 of file CellTissue.hpp.

◆ nextLabel()

int mgx::CellTissue::nextLabel ( )
inline

Increment the current label and return.

Definition at line 108 of file CellTissue.hpp.

◆ processParms()

void mgx::CellTissue::processParms ( const QStringList &  parms)

Read the parameters for the cell tissue from MGX GUI.

◆ processParmsDivide()

void mgx::CellTissue::processParmsDivide ( const QStringList &  parms)

◆ saveCellTissueToText()

bool mgx::CellTissue::saveCellTissueToText ( const QString &  fileName)

Save cell mesh from a text file.

◆ setLabel()

void mgx::CellTissue::setLabel ( int  l)
inline

Sets the current label.

Definition at line 103 of file CellTissue.hpp.

◆ setMeshType()

const QString& mgx::CellTissue::setMeshType ( const QString &  meshType)

◆ stringToDivAlg()

static DivAlg mgx::CellTissue::stringToDivAlg ( const QString &  s)
inlinestatic

Map a string to the enum.

Definition at line 131 of file CellTissue.hpp.

◆ toMgx2d()

bool mgx::CellTissue::toMgx2d ( double  wallMax = 0)

Create a 2D cellular tissue, from MGXC.

◆ toMgx3d()

bool mgx::CellTissue::toMgx3d ( double  tolerance = 0,
double  neighborMinArea = 0 
)

◆ toMgxc()

bool mgx::CellTissue::toMgxc ( double  wallMax = 0)

Generate a simplified cell mesh (MGXC) from a normal (MGXM) one or from MGX2D.

◆ toMgxm()

bool mgx::CellTissue::toMgxm ( )

Create a normal MorphoGraphX mesh (from any other type)

◆ updateAllGraph()

void mgx::CellTissue::updateAllGraph ( )

Create/update all graph from 3D cell tissue (stored in S)

◆ updGeometry() [1/4]

void mgx::CellTissue::updGeometry ( )
inline

Set area, length of cell walls, center and normal.

Definition at line 118 of file CellTissue.hpp.

◆ updGeometry() [2/4]

void mgx::CellTissue::updGeometry ( const cell c)
inline

Set area, length of cell walls, center and normal.

Definition at line 124 of file CellTissue.hpp.

◆ updGeometry() [3/4]

void mgx::CellTissue::updGeometry ( const cell c,
int  mode 
)

◆ updGeometry() [4/4]

void mgx::CellTissue::updGeometry ( int  mode)

◆ viewLabel()

int mgx::CellTissue::viewLabel ( ) const
inline

Returns the current label, without modifying it.

Definition at line 98 of file CellTissue.hpp.

Member Data Documentation

◆ C

cellGraph mgx::CellTissue::C

Definition at line 66 of file CellTissue.hpp.

◆ CellDivAlg

DivAlg mgx::CellTissue::CellDivAlg

Definition at line 248 of file CellTissue.hpp.

◆ CellMaxArea

float mgx::CellTissue::CellMaxArea

Definition at line 247 of file CellTissue.hpp.

◆ J

vvGraph mgx::CellTissue::J

Definition at line 65 of file CellTissue.hpp.

◆ nhbdC

DistNhbdC mgx::CellTissue::nhbdC

Definition at line 72 of file CellTissue.hpp.

◆ nhbdS

DistNhbdS mgx::CellTissue::nhbdS

Definition at line 70 of file CellTissue.hpp.

◆ S

vvGraph mgx::CellTissue::S

Definition at line 64 of file CellTissue.hpp.


The documentation for this class was generated from the following file: