Class handling the development and representation of a cell tissue. More...
#include <algorithms/tissue.h>
Public Types | |
typedef VVComplex::division_data | division_data |
Type of the division data used for the complex. | |
typedef VVComplex::division_result_t | division_result_t |
typedef Model | model_t |
typedef vvcomplex::VVComplex < MANDATORY_COMPLEX_TEMPLATE_ARGS, leaf_class > | VVComplex |
Public Member Functions | |
division_result_t | divideCell (const cell &to_divide, const cell &cell_kept) |
Divide a cell. | |
division_result_t | divideCell (const cell &to_divide) |
Divide a cell. | |
template<typename CellContainer > | |
division_result_t | divideCell (const cell &to_divide, const CellContainer &kept_cells) |
Divide a cell. | |
template<typename AlgoParameter > | |
division_result_t | divideCell (const cell &to_divide, const AlgoParameter ¶ms, const cell &cell_kept) |
Divide a cell. | |
template<typename AlgoParameter , typename CellContainer > | |
division_result_t | divideCell (const cell &c, const AlgoParameter ¶ms, const CellContainer &to_keep) |
Divide a cell of the tissue. | |
division_result_t | divideCell (const cell &c, const division_data &ddata, const cell &to_keep) |
Divide a cell with the cells to keep defined by any kind of container. | |
template<typename CellContainer > | |
division_result_t | divideCell (const cell &c, const division_data &ddata, const CellContainer &to_keep) |
Divide a cell with the cells to keep defined by any kind of container. | |
division_result_t | divideCell (const cell &c, const division_data &ddata) |
void | drawCell (const cell &c, double value) |
Draw a single cell. | |
void | drawCell (const cell &c, util::Palette::Color cell_color, util::Palette::Color center_color) |
Draw a single cell. | |
void | drawCellContour (const cell &c) |
Draw just the contour of the cells. | |
void | drawSimplifiedCell (const cell &c) |
Draw the cell as a simple colored polygon. | |
void | drawWalledCell (const cell &c, double value) |
Draw a cell with walls, specifying the value. | |
void | drawWalledCell (const cell &c, util::Palette::Color cell_color, util::Palette::Color center_color) |
Draw a single cell with differentiated walls. | |
CellPinchingParams | getCellPinchingParams () |
Returns the cell pinching parameter object. | |
ClosestMidAlgoParams | getClosestMidAlgoParams () |
Returns the closest mid algorithm parameter object. | |
ClosestWallAlgoParams | getCloseWallAlgoParams () |
Returns the closest wall algorithm parameter object. | |
ShortWallAlgoParams | getShortWallAlgoParams () |
Returns the shortest wall algorithm parameter object. | |
IMPORT_COMPLEX_TYPES (VVComplex) | |
void | postDraw () |
Restore the OpenGL context after the drawing. | |
void | preDraw () |
Setup the OpenGL context to draw the cells. | |
void | readParms (util::Parms &parms, const QString §ion) |
Read the parameters for the algorithmic part of the object. | |
void | readViewParms (util::Parms &parms, const QString §ion) |
Read the parameters for the drawing of a cell. | |
typedef | RESOLVE_LEAF_CLASS (LeafClass, Tissue) leaf_class |
void | setCellPinchingParams (CellPinchingParams ¶ms) |
Set the pinching parameters to be used. | |
Tissue (const Tissue ©) | |
Copy constructor. | |
Tissue (const util::Palette &pal, Model *mod) | |
Constructor setting up both the palette and the model. | |
Tissue (Model *mod) | |
Constructor with just the model. | |
util::Palette::Color | valueCenterColor (double value) |
Get the center color corresponding to a given value. | |
util::Palette::Color | valueColor (double value) |
Get the color corresponding to a given value. | |
Public Attributes | |
double | blending |
Blending for the exterior of the cell. | |
CELL_DIVISION_ALGORITHM | cellDivAlg |
Default algorithm to use. | |
double | cellMaxPinch |
Maximum cell pinching. | |
double | cellPinch |
Cell pinching ratio. | |
double | cellWallCorner |
Size of the cell corners. | |
double | cellWallMin |
Minimum size of a cell wall. | |
double | cellWallSample |
Number of samples to find the shortest wall. | |
double | cellWallWidth |
Width of the "thin" cell wall. | |
double | center_blending |
Blending for the center of the cell. | |
int | colorBegin |
Color of the high values for the cell. | |
double | colorCenter |
Increase in color of the center (0 < colorCenter < 1). | |
int | colorEnd |
Color of the low values for the cell. | |
int | contourColor |
Color of the contour of the cell. | |
bool | drawBorders |
Draw thick corners if true, otherwise draw cellWallWidth pixel borders. | |
bool | drawInsides |
The inside of the cell is drawn depending on the value is true, otherwise the end color is used. | |
const util::Palette * | palette |
Palette to use for the colors. | |
double | sampleDx |
precision required to consider a point on a segment. | |
bool | strictCellWallMin |
If true, the cellWallMin property is strictly enforced. | |
Protected Member Functions | |
std::map< junction, double > | calcQuads (const cell &c) |
Compute parameters for the width of the corners. |
Class handling the development and representation of a cell tissue.
VertexContent | Data structure for the vertex content | |
TissueEdgeContent | Data structure for the edge content of the tissue graph | |
CellEdgeContent | Data structure for the edge content of the cell graph | |
Model | Type of your model |
Definition at line 527 of file tissue.h.
typedef VVComplex::division_data tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::division_data |
Type of the division data used for the complex.
Reimplemented from vvcomplex::VVComplex< MANDATORY_COMPLEX_TEMPLATE_ARGS, RESOLVE_LEAF_CLASS(LeafClass, Tissue< ALL_COMPLEX_TEMPLATE_ARGS >)>.
tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::Tissue | ( | Model * | mod | ) | [inline] |
Constructor with just the model.
Definition at line 624 of file tissue.h.
00625 : VVComplex(mod) 00626 , cellDivAlg(SHORT_WALL) 00627 , cellPinch(0) 00628 , cellMaxPinch(0) 00629 , cellWallMin(0) 00630 , strictCellWallMin(true) 00631 , cellWallSample(100) 00632 , sampleDx(0.1) 00633 , palette(NULL) 00634 , colorBegin(0) 00635 , colorEnd(1) 00636 , colorCenter(0.2) 00637 , contourColor(3) 00638 , cellWallCorner(0.15) 00639 , drawInsides(true) 00640 , drawBorders(true) 00641 , blending(1) 00642 , center_blending(1) 00643 , cellWallWidth(0.2) 00644 { }
tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::Tissue | ( | const util::Palette & | pal, | |
Model * | mod | |||
) | [inline] |
Constructor setting up both the palette and the model.
Definition at line 649 of file tissue.h.
00650 : VVComplex(mod) 00651 , cellDivAlg(SHORT_WALL) 00652 , cellPinch(0) 00653 , cellMaxPinch(0) 00654 , cellWallMin(0) 00655 , strictCellWallMin(true) 00656 , cellWallSample(100) 00657 , sampleDx(0.1) 00658 , palette(&pal) 00659 , colorBegin(0) 00660 , colorEnd(1) 00661 , colorCenter(0.2) 00662 , contourColor(3) 00663 , cellWallCorner(0.15) 00664 , drawInsides(true) 00665 , drawBorders(true) 00666 , blending(1) 00667 , center_blending(1) 00668 , cellWallWidth(0.2) 00669 { }
tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::Tissue | ( | const Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass > & | copy | ) | [inline] |
Copy constructor.
Definition at line 674 of file tissue.h.
00675 : VVComplex(copy) 00676 , cellDivAlg(copy.cellDivAlg) 00677 , cellPinch(copy.cellPinch) 00678 , cellMaxPinch(copy.cellMaxPinch) 00679 , cellWallMin(copy.cellWallMin) 00680 , strictCellWallMin(copy.strictCellWallMin) 00681 , cellWallSample(copy.cellWallSample) 00682 , sampleDx(copy.sampleDx) 00683 , palette(copy.palette) 00684 , colorBegin(copy.colorBegin) 00685 , colorEnd(copy.colorEnd) 00686 , colorCenter(copy.colorCenter) 00687 , contourColor(copy.contourColor) 00688 , cellWallCorner(copy.cellWallCorner) 00689 , drawInsides(copy.drawInsides) 00690 , drawBorders(copy.drawBorders) 00691 , blending(copy.blending) 00692 , center_blending(copy.center_blending) 00693 , cellWallWidth(copy.cellWallWidth) 00694 { }
std::map<junction,double> tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::calcQuads | ( | const cell & | c | ) | [inline, protected] |
Compute parameters for the width of the corners.
Definition at line 1305 of file tissue.h.
References forall, vvcomplex::VVComplex< MANDATORY_COMPLEX_TEMPLATE_ARGS, RESOLVE_LEAF_CLASS(LeafClass, Tissue< ALL_COMPLEX_TEMPLATE_ARGS >)>::model, graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighbors(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::nextTo(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::prevTo(), and vvcomplex::VVComplex< MANDATORY_COMPLEX_TEMPLATE_ARGS, RESOLVE_LEAF_CLASS(LeafClass, Tissue< ALL_COMPLEX_TEMPLATE_ARGS >)>::S.
Referenced by tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawCell(), and tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawWalledCell().
01306 { 01307 std::map<junction,double> quadsWidth; 01308 forall(const junction& k, this->S.neighbors(c)) 01309 { 01310 const junction& l = this->S.nextTo(c, k); 01311 const junction& j = this->S.prevTo(c, k); 01312 01313 // Get vectors towards neighbors 01314 Point3d kpos = this->model->position(k); 01315 Point3d kj = this->model->position(j) - kpos; 01316 Point3d kl = this->model->position(l) - kpos; 01317 Point3d kc = this->model->position(c) - kpos; 01318 01319 // Info for quads 01320 double lsz = norm(kc ^ util::normalized(kl)); // norm(kc - kl * (kc * kl)); 01321 if(lsz > 0) 01322 lsz = norm(kc)/lsz; 01323 double jsz = norm(kc ^ util::normalized(kj)); // norm(kc - kj * (kc * kj)); 01324 if(jsz > 0) 01325 jsz = norm(kc)/jsz; 01326 01327 quadsWidth[k] = max(lsz, jsz); 01328 } 01329 return quadsWidth; 01330 }
division_result_t tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::divideCell | ( | const cell & | to_divide, | |
const cell & | cell_kept | |||
) | [inline] |
Divide a cell.
Convenience function where the algorithm used is the default one and one cell is enough to setup the data of the new cells.
Definition at line 931 of file tissue.h.
References vvcomplex::FindCenter().
00933 { 00934 std::vector<cell> k; 00935 k.push_back(cell_kept); 00936 division_result_t res = this->divideCell(to_divide, k); 00937 if(res) 00938 { 00939 FindCenter(res.cl, static_cast<leaf_class&>(*this)); 00940 FindCenter(res.cr, static_cast<leaf_class&>(*this)); 00941 } 00942 return res; 00943 }
division_result_t tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::divideCell | ( | const cell & | to_divide | ) | [inline] |
Divide a cell.
Convenience function where the algorithm used is the default one and no context is required to setup the data of the new cells.
Definition at line 913 of file tissue.h.
References vvcomplex::FindCenter().
00914 { 00915 std::vector<cell> k; 00916 division_result_t res = this->divideCell(to_divide, k); 00917 if(res) 00918 { 00919 FindCenter(res.cl, static_cast<leaf_class&>(*this)); 00920 FindCenter(res.cr, static_cast<leaf_class&>(*this)); 00921 } 00922 return res; 00923 }
division_result_t tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::divideCell | ( | const cell & | to_divide, | |
const CellContainer & | kept_cells | |||
) | [inline] |
Divide a cell.
Convenience function where the algorithm used is the default one.
Definition at line 890 of file tissue.h.
References tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::cellDivAlg, tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::getClosestMidAlgoParams(), tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::getCloseWallAlgoParams(), and tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::getShortWallAlgoParams().
00892 { 00893 switch(cellDivAlg) 00894 { 00895 case CLOSEST_MID: 00896 return divideCell(to_divide, getClosestMidAlgoParams(), kept_cells); 00897 case SHORT_WALL: 00898 return divideCell(to_divide, getShortWallAlgoParams(), kept_cells); 00899 case CLOSEST_WALL: 00900 return divideCell(to_divide, getCloseWallAlgoParams(), kept_cells); 00901 default: 00902 util::err << "Error, unknown algorithm specified ... doing nothing." << endl; 00903 } 00904 return division_result_t(); 00905 }
division_result_t tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::divideCell | ( | const cell & | to_divide, | |
const AlgoParameter & | params, | |||
const cell & | cell_kept | |||
) | [inline] |
Divide a cell.
Convenience function where a single cell is to be kept
Reimplemented from vvcomplex::VVComplex< MANDATORY_COMPLEX_TEMPLATE_ARGS, RESOLVE_LEAF_CLASS(LeafClass, Tissue< ALL_COMPLEX_TEMPLATE_ARGS >)>.
Definition at line 871 of file tissue.h.
References vvcomplex::VVComplex< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::divideCell(), and vvcomplex::FindCenter().
00874 { 00875 division_result_t res = VVComplex::divideCell(to_divide, params, cell_kept); 00876 if(res) 00877 { 00878 FindCenter(res.cl, static_cast<leaf_class&>(*this)); 00879 FindCenter(res.cr, static_cast<leaf_class&>(*this)); 00880 } 00881 return res; 00882 }
division_result_t tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::divideCell | ( | const cell & | c, | |
const AlgoParameter & | params, | |||
const CellContainer & | to_keep | |||
) | [inline] |
Divide a cell of the tissue.
c | Cell to divide | |
params | Parameter of the algorithm to use. The type of the params will decide which algorithm to use. | |
to_keep | Set of cells to keep to update the data in the new cells |
Reimplemented from vvcomplex::VVComplex< MANDATORY_COMPLEX_TEMPLATE_ARGS, RESOLVE_LEAF_CLASS(LeafClass, Tissue< ALL_COMPLEX_TEMPLATE_ARGS >)>.
Definition at line 852 of file tissue.h.
References vvcomplex::VVComplex< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::divideCell(), and vvcomplex::FindCenter().
00855 { 00856 division_result_t res = VVComplex::divideCell(c, params, to_keep); 00857 if(res) 00858 { 00859 FindCenter(res.cl, static_cast<leaf_class&>(*this)); 00860 FindCenter(res.cr, static_cast<leaf_class&>(*this)); 00861 } 00862 return res; 00863 }
division_result_t tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::divideCell | ( | const cell & | c, | |
const division_data & | ddata, | |||
const cell & | to_keep | |||
) | [inline] |
Divide a cell with the cells to keep defined by any kind of container.
Reimplemented from vvcomplex::VVComplex< MANDATORY_COMPLEX_TEMPLATE_ARGS, RESOLVE_LEAF_CLASS(LeafClass, Tissue< ALL_COMPLEX_TEMPLATE_ARGS >)>.
Definition at line 827 of file tissue.h.
References vvcomplex::VVComplex< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::divideCell(), and vvcomplex::FindCenter().
00830 { 00831 division_result_t res = VVComplex::divideCell(c, ddata, to_keep); 00832 if(res) 00833 { 00834 FindCenter(res.cl, static_cast<leaf_class&>(*this)); 00835 FindCenter(res.cr, static_cast<leaf_class&>(*this)); 00836 } 00837 return res; 00838 }
division_result_t tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::divideCell | ( | const cell & | c, | |
const division_data & | ddata, | |||
const CellContainer & | to_keep | |||
) | [inline] |
Divide a cell with the cells to keep defined by any kind of container.
Reimplemented from vvcomplex::VVComplex< MANDATORY_COMPLEX_TEMPLATE_ARGS, RESOLVE_LEAF_CLASS(LeafClass, Tissue< ALL_COMPLEX_TEMPLATE_ARGS >)>.
Definition at line 811 of file tissue.h.
References vvcomplex::VVComplex< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::divideCell(), and vvcomplex::FindCenter().
00814 { 00815 division_result_t res = VVComplex::divideCell(c, ddata, to_keep); 00816 if(res) 00817 { 00818 FindCenter(res.cl, static_cast<leaf_class&>(*this)); 00819 FindCenter(res.cr, static_cast<leaf_class&>(*this)); 00820 } 00821 return res; 00822 }
void tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawCell | ( | const cell & | c, | |
double | value | |||
) | [inline] |
Draw a single cell.
The value is used to setup the color (using colorBegin, colorEnd) if the interior of the cell is drawn.
If center_color
is specified, then it is used instead of the usual modification of the color of the cell color.
Definition at line 1260 of file tissue.h.
References tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawCell(), tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawInsides, vvcomplex::VVComplex< MANDATORY_COMPLEX_TEMPLATE_ARGS, RESOLVE_LEAF_CLASS(LeafClass, Tissue< ALL_COMPLEX_TEMPLATE_ARGS >)>::model, tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::valueCenterColor(), and tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::valueColor().
01261 { 01262 Point3d cpos = this->model->position(c); 01263 01264 if(!drawInsides) 01265 { 01266 value = 0; 01267 } 01268 01269 // Draw cell faces 01270 glNormal3dv(this->model->normal(c).c_data()); 01271 01272 drawCell(c, valueColor(value), valueCenterColor(value)); 01273 }
void tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawCell | ( | const cell & | c, | |
util::Palette::Color | cell_color, | |||
util::Palette::Color | center_color | |||
) | [inline] |
Draw a single cell.
The colors used for the cell are specified by cell_color
and center_color
.
Definition at line 1116 of file tissue.h.
References tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::blending, util::Vector< dim, T >::c_data(), tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::calcQuads(), tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::cellWallCorner, tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::cellWallWidth, tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::center_blending, tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::colorEnd, tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::contourColor, tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawBorders, tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawInsides, forall, util::Palette::getColor(), vvcomplex::VVComplex< MANDATORY_COMPLEX_TEMPLATE_ARGS, RESOLVE_LEAF_CLASS(LeafClass, Tissue< ALL_COMPLEX_TEMPLATE_ARGS >)>::model, graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighbors(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::nextTo(), tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::palette, graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::prevTo(), vvcomplex::VVComplex< MANDATORY_COMPLEX_TEMPLATE_ARGS, RESOLVE_LEAF_CLASS(LeafClass, Tissue< ALL_COMPLEX_TEMPLATE_ARGS >)>::S, and util::Palette::useColor().
01118 { 01119 Point3d cpos = this->model->position(c); 01120 01121 if(!drawInsides) 01122 { 01123 cell_color = palette->getColor(colorEnd, blending); 01124 center_color = palette->getColor(colorEnd, center_blending); 01125 } 01126 01127 // Draw cell faces 01128 glNormal3dv(this->model->normal(c).c_data()); 01129 01130 glPolygonMode(GL_FRONT, GL_FILL); 01131 glPolygonOffset(3.0, 1.0); 01132 glBegin(GL_TRIANGLE_FAN); 01133 glColor4fv(center_color.c_data()); 01134 glVertex3dv(cpos.c_data()); 01135 glColor4fv(cell_color.c_data()); 01136 junction fv(0); 01137 forall(const junction& k, this->S.neighbors(c)) 01138 { 01139 if(fv.isNull()) 01140 fv = k; 01141 glVertex3dv(this->model->position(k).c_data()); 01142 } 01143 glVertex3dv(this->model->position(fv).c_data()); 01144 glEnd(); 01145 01146 const std::map<junction,double>& quadsWidth = calcQuads(c); 01147 01148 if(drawBorders) 01149 { 01150 palette->useColor(contourColor); 01151 glPolygonOffset(-1.0, -1.0); 01152 forall(const junction& k, this->S.neighbors(c)) 01153 { 01154 // Get vectors towards neighbors and normalize 01155 const junction& j = this->S.prevTo(c, k); 01156 const junction& l = this->S.nextTo(c, k); 01157 01158 const Point3d& jpos = this->model->position(j); 01159 const Point3d& kpos = this->model->position(k); 01160 const Point3d& lpos = this->model->position(l); 01161 01162 Point3d kj = jpos - kpos; 01163 Point3d kl = lpos - kpos; 01164 Point3d kc = cpos - kpos; 01165 Point3d jc = cpos - jpos; 01166 Point3d kjn = kj, kln =kl, kcn = kc, jcn = jc; 01167 kjn /= norm(kjn); 01168 kln /= norm(kln); 01169 kcn /= norm(kcn); 01170 jcn /= norm(jcn); 01171 01172 // Corner size along cell wall, clip to wall length 01173 double kjl = norm(kj); 01174 if(kjl > cellWallCorner) 01175 kjl = cellWallCorner; 01176 double kll = norm(kl); 01177 if(kll > cellWallCorner) 01178 kll = cellWallCorner; 01179 01180 double kcl = .75 * cellWallCorner * (kjn * kcn + kln * kcn)/2.0; 01181 01182 // Width of quads for walls 01183 double kcqw = quadsWidth.find(k)->second * cellWallWidth; 01184 double jcqw = quadsWidth.find(j)->second * cellWallWidth; 01185 01186 // Adjust corner centers if required 01187 bool ccvx; // convex 01188 ccvx = ((kll*kln - kcl*kcn)^(kjl*kjn - kcl*kcn)) * this->model->normal(k) > 0; 01189 if(!ccvx || kcl < kcqw) 01190 kcl = kcqw; 01191 01192 Point3d p; 01193 01194 // Draw corners 01195 glBegin(GL_TRIANGLE_FAN); 01196 glVertex3dv(kpos.c_data()); 01197 p = kpos + kll * kln; 01198 glVertex3dv(p.c_data()); 01199 p = kpos + kcl * kcn; 01200 glVertex3dv(p.c_data()); 01201 p = kpos + kjl * kjn; 01202 glVertex3dv(p.c_data()); 01203 glEnd(); 01204 01205 // Draw cell walls 01206 glBegin(GL_QUADS); 01207 glVertex3dv(jpos.c_data()); 01208 glVertex3dv(kpos.c_data()); 01209 p = kpos + kcqw * kcn; 01210 glVertex3dv(p.c_data()); 01211 p = jpos + jcqw * jcn; 01212 glVertex3dv(p.c_data()); 01213 glEnd(); 01214 } 01215 } 01216 }
void tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawCellContour | ( | const cell & | c | ) | [inline] |
Draw just the contour of the cells.
This function was extracted as, due to a bug in latest NVidia drivers, alternating between LINE and FILL to draw polygon crashes text rendering.
Definition at line 1225 of file tissue.h.
References tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::contourColor, forall, vvcomplex::VVComplex< MANDATORY_COMPLEX_TEMPLATE_ARGS, RESOLVE_LEAF_CLASS(LeafClass, Tissue< ALL_COMPLEX_TEMPLATE_ARGS >)>::model, graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighbors(), tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::palette, vvcomplex::VVComplex< MANDATORY_COMPLEX_TEMPLATE_ARGS, RESOLVE_LEAF_CLASS(LeafClass, Tissue< ALL_COMPLEX_TEMPLATE_ARGS >)>::S, and util::Palette::useColor().
void tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawSimplifiedCell | ( | const cell & | c | ) | [inline] |
Draw the cell as a simple colored polygon.
Useful for quick drawing of the shape, like for selection system.
Definition at line 1243 of file tissue.h.
References forall, vvcomplex::VVComplex< MANDATORY_COMPLEX_TEMPLATE_ARGS, RESOLVE_LEAF_CLASS(LeafClass, Tissue< ALL_COMPLEX_TEMPLATE_ARGS >)>::model, graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighbors(), and vvcomplex::VVComplex< MANDATORY_COMPLEX_TEMPLATE_ARGS, RESOLVE_LEAF_CLASS(LeafClass, Tissue< ALL_COMPLEX_TEMPLATE_ARGS >)>::S.
void tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawWalledCell | ( | const cell & | c, | |
double | value | |||
) | [inline] |
Draw a cell with walls, specifying the value.
Definition at line 1094 of file tissue.h.
References tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawInsides, tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawWalledCell(), vvcomplex::VVComplex< MANDATORY_COMPLEX_TEMPLATE_ARGS, RESOLVE_LEAF_CLASS(LeafClass, Tissue< ALL_COMPLEX_TEMPLATE_ARGS >)>::model, tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::valueCenterColor(), and tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::valueColor().
01096 { 01097 Point3d cpos = this->model->position(c); 01098 01099 if(!drawInsides) 01100 { 01101 value = 0; 01102 } 01103 01104 // Draw cell faces 01105 glNormal3dv(this->model->normal(c).c_data()); 01106 01107 drawWalledCell(c, valueColor(value), valueCenterColor(value)); 01108 }
void tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawWalledCell | ( | const cell & | c, | |
util::Palette::Color | cell_color, | |||
util::Palette::Color | center_color | |||
) | [inline] |
Draw a single cell with differentiated walls.
The colors used for the cell are specified by cell_color
and center_color
. The color used by the wall depend on the value on the wall.
This method requires two new methods:
util::Palette::Color cellWallColor(const vertex& cell, const vertex& wall_junction)
double cellWallOrder(const vertex& cell, const vertex& wall_junction)
The wall considered is the one from wall_junction
to the next vertex in the neighborhood of cell in the VVGraph. For the order, the value has to be between 0 and 1. A value of 1 will put the representation of the wall on top.
Definition at line 983 of file tissue.h.
References tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::blending, util::Vector< dim, T >::c_data(), tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::calcQuads(), tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::cellWallCorner, tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::cellWallWidth, tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::center_blending, tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::colorEnd, tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawBorders, tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawInsides, forall, util::Palette::getColor(), vvcomplex::VVComplex< MANDATORY_COMPLEX_TEMPLATE_ARGS, RESOLVE_LEAF_CLASS(LeafClass, Tissue< ALL_COMPLEX_TEMPLATE_ARGS >)>::model, graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighbors(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::nextTo(), tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::palette, graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::prevTo(), and vvcomplex::VVComplex< MANDATORY_COMPLEX_TEMPLATE_ARGS, RESOLVE_LEAF_CLASS(LeafClass, Tissue< ALL_COMPLEX_TEMPLATE_ARGS >)>::S.
00986 { 00987 Point3d cpos = this->model->position(c); 00988 00989 if(!drawInsides) 00990 { 00991 cell_color = palette->getColor(colorEnd, blending); 00992 center_color = palette->getColor(colorEnd, center_blending); 00993 } 00994 00995 // Draw cell faces 00996 glNormal3dv(this->model->normal(c).c_data()); 00997 00998 glPolygonMode(GL_FRONT, GL_FILL); 00999 glPolygonOffset(3.0, 1.0); 01000 glBegin(GL_TRIANGLE_FAN); 01001 glColor4fv(center_color.c_data()); 01002 glVertex3dv(cpos.c_data()); 01003 glColor4fv(cell_color.c_data()); 01004 junction fv(0); 01005 forall(const junction& k, this->S.neighbors(c)) 01006 { 01007 if(fv.isNull()) 01008 fv = k; 01009 glVertex3dv(this->model->position(k).c_data()); 01010 } 01011 glVertex3dv(this->model->position(fv).c_data()); 01012 glEnd(); 01013 01014 const std::map<junction,double>& quadsWidth = calcQuads(c); 01015 01016 glPolygonOffset(-1.0, -1.0); 01017 forall(const junction& k, this->S.neighbors(c)) 01018 { 01019 const junction& l = this->S.nextTo(c, k); 01020 const junction& j = this->S.prevTo(c, k); 01021 // Get vectors towards neighbors and normalize 01022 Point3d jpos = this->model->position(j); 01023 Point3d kpos = this->model->position(k); 01024 01025 if(drawBorders) 01026 { 01027 util::Palette::Color col = this->model->cellWallColor(c, j); 01028 double j_order = 2*this->model->cellWallOrder(c, j); 01029 double l_order = 2*this->model->cellWallOrder(c, l); 01030 double order = std::min(j_order, l_order); 01031 Point3d lpos = this->model->position(l); 01032 Point3d kj = jpos - kpos; 01033 Point3d kl = lpos - kpos; 01034 Point3d kc = cpos - kpos; 01035 Point3d jc = cpos - jpos; 01036 Point3d kjn = kj, kln =kl, kcn = kc, jcn = jc; 01037 kjn /= norm(kjn); 01038 kln /= norm(kln); 01039 kcn /= norm(kcn); 01040 jcn /= norm(jcn); 01041 01042 // Corner size along cell wall, clip to wall length 01043 double kjl = norm(kj); 01044 if(kjl > cellWallCorner) 01045 kjl = cellWallCorner; 01046 double kll = norm(kl); 01047 if(kll > cellWallCorner) 01048 kll = cellWallCorner; 01049 01050 double kcl = .75 * cellWallCorner * exp((kjn * kcn + kln * kcn)/2.0); 01051 01052 // Width of quads for walls 01053 double kcqw = quadsWidth.find(k)->second * cellWallWidth; 01054 double jcqw = quadsWidth.find(j)->second * cellWallWidth; 01055 01056 // Adjust corner centers if required 01057 bool ccvx; // convex 01058 ccvx = ((kll*kln - kcl*kcn)^(kjl*kjn - kcl*kcn)) * this->model->normal(k) > 0; 01059 if(!ccvx || kcl < kcqw) 01060 kcl = kcqw; 01061 01062 Point3d p; 01063 01064 // Draw corners 01065 glPolygonOffset((1.0-order)+1, -3.0); 01066 glColor4fv(col.c_data()); 01067 glBegin(GL_TRIANGLE_FAN); 01068 glVertex3dv(kpos.c_data()); 01069 p = kpos + kll * kln; 01070 glVertex3dv(p.c_data()); 01071 p = kpos + kcl * kcn; 01072 glVertex3dv(p.c_data()); 01073 p = kpos + kjl * kjn; 01074 glVertex3dv(p.c_data()); 01075 glEnd(); 01076 01077 // Draw cell walls 01078 glPolygonOffset((1.0-j_order)+1, -3.0); 01079 glBegin(GL_QUADS); 01080 glVertex3dv(jpos.c_data()); 01081 glVertex3dv(kpos.c_data()); 01082 p = kpos + kcqw * kcn; 01083 glVertex3dv(p.c_data()); 01084 p = jpos + jcqw * jcn; 01085 glVertex3dv(p.c_data()); 01086 glEnd(); 01087 } 01088 } 01089 }
CellPinchingParams tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::getCellPinchingParams | ( | ) | [inline] |
Returns the cell pinching parameter object.
Definition at line 760 of file tissue.h.
References tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::cellMaxPinch, and tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::cellPinch.
00761 { 00762 return CellPinchingParams(cellPinch, cellMaxPinch); 00763 }
ClosestMidAlgoParams tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::getClosestMidAlgoParams | ( | ) | [inline] |
Returns the closest mid algorithm parameter object.
Definition at line 778 of file tissue.h.
References tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::cellWallMin, tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::setCellPinchingParams(), and tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::strictCellWallMin.
00779 { 00780 ClosestMidAlgoParams p(cellWallMin, strictCellWallMin); 00781 setCellPinchingParams(p); 00782 return p; 00783 }
ClosestWallAlgoParams tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::getCloseWallAlgoParams | ( | ) | [inline] |
Returns the closest wall algorithm parameter object.
Definition at line 788 of file tissue.h.
References tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::cellWallMin, tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::setCellPinchingParams(), and tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::strictCellWallMin.
00789 { 00790 ClosestWallAlgoParams p(cellWallMin, strictCellWallMin); 00791 setCellPinchingParams(p); 00792 return p; 00793 }
ShortWallAlgoParams tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::getShortWallAlgoParams | ( | ) | [inline] |
Returns the shortest wall algorithm parameter object.
Definition at line 768 of file tissue.h.
References tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::cellWallMin, tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::cellWallSample, tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::sampleDx, tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::setCellPinchingParams(), and tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::strictCellWallMin.
00769 { 00770 ShortWallAlgoParams p(cellWallMin, strictCellWallMin, cellWallSample, sampleDx); 00771 setCellPinchingParams(p); 00772 return p; 00773 }
void tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::postDraw | ( | ) | [inline] |
void tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::preDraw | ( | ) | [inline] |
void tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::readParms | ( | util::Parms & | parms, | |
const QString & | section | |||
) | [inline] |
Read the parameters for the algorithmic part of the object.
parms | Parameter object to read from | |
section | Section containing the parameters |
Definition at line 702 of file tissue.h.
References tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::cellDivAlg, tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::cellMaxPinch, tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::cellPinch, tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::cellWallMin, tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::cellWallSample, tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::sampleDx, tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::strictCellWallMin, and QString::toLower().
00703 { 00704 QString algo; 00705 parms(section, "DivisionAlgorithm", algo); 00706 algo = algo.toLower(); 00707 if( algo == "closestmid" ) 00708 cellDivAlg = CLOSEST_MID; 00709 else if(algo == "shortwall") 00710 cellDivAlg = SHORT_WALL; 00711 else if(algo == "closestwall") 00712 cellDivAlg = CLOSEST_WALL; 00713 else 00714 { 00715 util::err << "Invalid division algorithm, should be ClosestMid, ShortWall or ClosestWall. Choosing ShortWall by default." << endl; 00716 cellDivAlg = SHORT_WALL; 00717 } 00718 parms(section, "CellPinch", cellPinch); 00719 parms(section, "CellMaxPinch", cellMaxPinch); 00720 parms(section, "CellWallMin", cellWallMin); 00721 parms(section, "StrictCellWallMin", strictCellWallMin); 00722 parms(section, "CellWallSample", cellWallSample); 00723 parms(section, "CellSampleDx", sampleDx); 00724 }
void tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::readViewParms | ( | util::Parms & | parms, | |
const QString & | section | |||
) | [inline] |
Read the parameters for the drawing of a cell.
parms | Parameter object to read from | |
section | Section containing the parameters |
Definition at line 732 of file tissue.h.
References tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::blending, tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::cellWallCorner, tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::cellWallWidth, tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::center_blending, tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::colorBegin, tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::colorCenter, tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::colorEnd, tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::contourColor, tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawBorders, and tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawInsides.
00733 { 00734 parms(section, "CellColorBegin", colorBegin); 00735 parms(section, "CellColorEnd", colorEnd); 00736 parms(section, "CellColorCenter", colorCenter); 00737 parms(section, "CellContourColor", contourColor); 00738 parms(section, "CellWallCorner", cellWallCorner); 00739 parms(section, "DrawInsideCells", drawInsides); 00740 parms(section, "DrawCellBorders", drawBorders); 00741 parms(section, "CellBlending", blending); 00742 parms(section, "CellCenterBlending", center_blending); 00743 parms(section, "CellWallWidth", cellWallWidth); 00744 }
void tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::setCellPinchingParams | ( | CellPinchingParams & | params | ) | [inline] |
Set the pinching parameters to be used.
By default, the parameters will be read from the parameter file
Definition at line 751 of file tissue.h.
References tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::cellMaxPinch, tissue::CellPinchingParams::cellMaxPinch, tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::cellPinch, and tissue::CellPinchingParams::cellPinch.
Referenced by tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::getClosestMidAlgoParams(), tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::getCloseWallAlgoParams(), and tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::getShortWallAlgoParams().
00752 { 00753 params.cellPinch = cellPinch; 00754 params.cellMaxPinch = cellMaxPinch; 00755 }
util::Palette::Color tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::valueCenterColor | ( | double | value | ) | [inline] |
Get the center color corresponding to a given value.
Definition at line 1289 of file tissue.h.
References tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::blending, tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::colorBegin, tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::colorCenter, tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::colorEnd, tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::palette, and util::Palette::selectColor().
Referenced by tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawCell(), and tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawWalledCell().
01290 { 01291 if(value > 1.0) 01292 value = 1.0; 01293 value *= (1.0 - colorCenter); 01294 double value_center = value + colorCenter; 01295 return palette->selectColor(colorBegin, colorEnd, value_center, blending); 01296 }
util::Palette::Color tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::valueColor | ( | double | value | ) | [inline] |
Get the color corresponding to a given value.
Definition at line 1278 of file tissue.h.
References tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::blending, tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::colorBegin, tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::colorCenter, tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::colorEnd, tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::palette, and util::Palette::selectColor().
Referenced by tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawCell(), and tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawWalledCell().
01279 { 01280 if(value > 1.0) 01281 value = 1.0; 01282 value *= (1.0 - colorCenter); 01283 return palette->selectColor(colorBegin, colorEnd, value, blending); 01284 }
double tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::blending |
Blending for the exterior of the cell.
(i.e. alpha value)
Definition at line 609 of file tissue.h.
Referenced by tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawCell(), tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawWalledCell(), tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::readViewParms(), tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::valueCenterColor(), and tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::valueColor().
CELL_DIVISION_ALGORITHM tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::cellDivAlg |
Default algorithm to use.
Definition at line 542 of file tissue.h.
Referenced by tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::divideCell(), and tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::readParms().
double tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::cellMaxPinch |
Maximum cell pinching.
Definition at line 550 of file tissue.h.
Referenced by tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::getCellPinchingParams(), tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::readParms(), and tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::setCellPinchingParams().
double tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::cellPinch |
Cell pinching ratio.
Definition at line 546 of file tissue.h.
Referenced by tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::getCellPinchingParams(), tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::readParms(), and tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::setCellPinchingParams().
double tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::cellWallCorner |
Size of the cell corners.
Definition at line 593 of file tissue.h.
Referenced by tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawCell(), tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawWalledCell(), and tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::readViewParms().
double tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::cellWallMin |
Minimum size of a cell wall.
Definition at line 554 of file tissue.h.
Referenced by tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::getClosestMidAlgoParams(), tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::getCloseWallAlgoParams(), tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::getShortWallAlgoParams(), and tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::readParms().
double tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::cellWallSample |
Number of samples to find the shortest wall.
Definition at line 563 of file tissue.h.
Referenced by tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::getShortWallAlgoParams(), and tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::readParms().
double tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::cellWallWidth |
Width of the "thin" cell wall.
Definition at line 619 of file tissue.h.
Referenced by tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawCell(), tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawWalledCell(), and tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::readViewParms().
double tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::center_blending |
Blending for the center of the cell.
(i.e. alpha value)
Definition at line 615 of file tissue.h.
Referenced by tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawCell(), tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawWalledCell(), and tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::readViewParms().
int tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::colorBegin |
Color of the high values for the cell.
Definition at line 577 of file tissue.h.
Referenced by tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::readViewParms(), tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::valueCenterColor(), and tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::valueColor().
double tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::colorCenter |
Increase in color of the center (0 < colorCenter < 1).
Definition at line 585 of file tissue.h.
Referenced by tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::readViewParms(), tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::valueCenterColor(), and tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::valueColor().
int tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::colorEnd |
Color of the low values for the cell.
Definition at line 581 of file tissue.h.
Referenced by tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawCell(), tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawWalledCell(), tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::readViewParms(), tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::valueCenterColor(), and tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::valueColor().
int tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::contourColor |
Color of the contour of the cell.
Definition at line 589 of file tissue.h.
Referenced by tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawCell(), tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawCellContour(), and tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::readViewParms().
bool tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawBorders |
Draw thick corners if true, otherwise draw cellWallWidth
pixel borders.
Definition at line 603 of file tissue.h.
Referenced by tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawCell(), tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawWalledCell(), and tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::readViewParms().
bool tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawInsides |
The inside of the cell is drawn depending on the value is true, otherwise the end color is used.
Definition at line 598 of file tissue.h.
Referenced by tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawCell(), tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawWalledCell(), and tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::readViewParms().
const util::Palette* tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::palette |
Palette to use for the colors.
Definition at line 573 of file tissue.h.
Referenced by tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawCell(), tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawCellContour(), tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawWalledCell(), tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::valueCenterColor(), and tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::valueColor().
double tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::sampleDx |
precision required to consider a point on a segment.
Definition at line 567 of file tissue.h.
Referenced by tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::getShortWallAlgoParams(), and tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::readParms().
bool tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::strictCellWallMin |
If true, the cellWallMin property is strictly enforced.
If false, it's losely inforce, meaning it will never lead to a change of cell wall.
Definition at line 559 of file tissue.h.
Referenced by tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::getClosestMidAlgoParams(), tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::getCloseWallAlgoParams(), tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::getShortWallAlgoParams(), and tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::readParms().