11 #ifndef MESH_PROCESS_MEASURES_3D_HPP
12 #define MESH_PROCESS_MEASURES_3D_HPP
26 setName(
"Mesh/Heat Map/Measures 3D/Geometry/Volume");
27 setDesc(
"Volume of a 3D cell.");
28 setIcon(QIcon(
":/images/MakeHeatMap.png"));
36 if(!checkState().mesh(MESH_ANY))
38 Mesh *mesh = currentMesh();
56 setName(
"Mesh/Heat Map/Measures 3D/Network/Neighbors");
57 setDesc(
"Number of neighbors of a 3D cell.");
58 setIcon(QIcon(
":/images/MakeHeatMap.png"));
66 if(!checkState().mesh(MESH_ANY))
68 Mesh *mesh = currentMesh();
86 setName(
"Mesh/Heat Map/Measures 3D/Geometry/Cell Wall Area");
87 setDesc(
"Cell Wall Area of a 3D cell");
88 setIcon(QIcon(
":/images/MakeHeatMap.png"));
96 if(!checkState().mesh(MESH_ANY))
98 Mesh *mesh = currentMesh();
114 setName(
"Mesh/Heat Map/Measures 3D/Cell Atlas/Coord Longitudinal");
115 setDesc(
"Longitudinal Coord of a 3D cell. Requires the Cell Atlas measure maps.");
116 setIcon(QIcon(
":/images/MakeHeatMap.png"));
123 if(!checkState().mesh(MESH_ANY))
125 Mesh *mesh = currentMesh();
142 setName(
"Mesh/Heat Map/Measures 3D/Cell Atlas/Coord Circumferential");
143 setDesc(
"Circumferential Coord of a 3D cell. Requires the Cell Atlas measure maps.");
144 setIcon(QIcon(
":/images/MakeHeatMap.png"));
152 if(!checkState().mesh(MESH_ANY))
154 Mesh *mesh = currentMesh();
171 setName(
"Mesh/Heat Map/Measures 3D/Cell Atlas/Coord Radial");
172 setDesc(
"Radial Coord of a 3D cell. Requires the Cell Atlas measure maps.");
173 setIcon(QIcon(
":/images/MakeHeatMap.png"));
181 if(!checkState().mesh(MESH_ANY))
183 Mesh *mesh = currentMesh();
200 setName(
"Mesh/Heat Map/Measures 3D/Cell Atlas/Cell Length Longitudinal");
201 setDesc(
"Longitudinal Cell Size of a 3D cell. Requires the Cell Atlas measure maps.");
202 setIcon(QIcon(
":/images/MakeHeatMap.png"));
210 if(!checkState().mesh(MESH_ANY))
212 Mesh *mesh = currentMesh();
228 setName(
"Mesh/Heat Map/Measures 3D/Cell Atlas/Cell Length Circumferential");
229 setDesc(
"Circumferential Cell Size of a 3D cell. Requires the Cell Atlas measure maps.");
230 setIcon(QIcon(
":/images/MakeHeatMap.png"));
238 if(!checkState().mesh(MESH_ANY))
240 Mesh *mesh = currentMesh();
257 setName(
"Mesh/Heat Map/Measures 3D/Cell Atlas/Cell Length Radial");
258 setDesc(
"Radial Cell Size of a 3D cell. Requires the Cell Atlas measure maps.");
259 setIcon(QIcon(
":/images/MakeHeatMap.png"));
267 if(!checkState().mesh(MESH_ANY))
269 Mesh *mesh = currentMesh();
286 setName(
"Mesh/Heat Map/Measures 3D/Geometry/Cell Length X");
287 setDesc(
"Cell Size in x dimension of a 3D cell");
288 setIcon(QIcon(
":/images/MakeHeatMap.png"));
296 if(!checkState().mesh(MESH_ANY))
298 Mesh *mesh = currentMesh();
315 setName(
"Mesh/Heat Map/Measures 3D/Geometry/Cell Length Y");
316 setDesc(
"Cell Size in y dimension of a 3D cell");
317 setIcon(QIcon(
":/images/MakeHeatMap.png"));
324 if(!checkState().mesh(MESH_ANY))
326 Mesh *mesh = currentMesh();
343 setName(
"Mesh/Heat Map/Measures 3D/Geometry/Cell Length Z");
344 setDesc(
"Cell Size in z dimension of a 3D cell");
345 setIcon(QIcon(
":/images/MakeHeatMap.png"));
353 if(!checkState().mesh(MESH_ANY))
355 Mesh *mesh = currentMesh();
372 setName(
"Mesh/Heat Map/Measures 3D/Geometry/Cell Length Custom");
373 setDesc(
"Cell Size in custom direction a 3D cell \n"
374 "Requires a valid Custom Directions Attribute Map in the active mesh \n"
375 "(which can be generated using the Custom processes in Cell Axis");
376 setIcon(QIcon(
":/images/MakeHeatMap.png"));
378 addParm(
"Custom Direction",
"Custom Direction Dimension",
"X", QStringList() <<
"X" <<
"Y" <<
"Z");
380 addParm(
"Custom Direction Heat",
"Custom Direction Heat",
"X", QStringList() <<
"X" <<
"Y" <<
"Z");
381 addParm(
"Attribute Map X",
"Attribute Map X",
"customX");
382 addParm(
"Attribute Map Y",
"Attribute Map Y",
"customY");
383 addParm(
"Attribute Map Z",
"Attribute Map Z",
"customZ");
392 if(!checkState().mesh(MESH_ANY))
394 Mesh *mesh = currentMesh();
395 return run(mesh, parm(
"Custom Direction"), parm(
"Attribute Map X"), parm(
"Attribute Map Y"), parm(
"Attribute Map Z"));
398 bool run(
Mesh* mesh, QString dim, QString attr1, QString attr2, QString attr3){
399 return run(mesh, dim, attr1, attr2, attr3, mesh->
labelHeat());
402 bool run(
Mesh* mesh, QString dim, QString attr1, QString attr2, QString attr3,
IntFloatAttr& heatMap);
412 setName(
"Mesh/Heat Map/Measures 3D/Geometry/Volume Surface Ratio");
413 setDesc(
"Volume Surface Ratio of a 3D cell (root3(volume)/root2(wall area)). Requires the Cell Atlas measure maps.");
414 setIcon(QIcon(
":/images/MakeHeatMap.png"));
416 addParm(
"Root Volume",
"Root Volume",
"3.0");
417 addParm(
"Root Wall Area",
"Root Wall Area",
"2.0");
425 if(!checkState().mesh(MESH_ANY))
427 Mesh *mesh = currentMesh();
428 return run(mesh, parm(
"Root Volume").toDouble(), parm(
"Root Wall Area").toDouble());
431 bool run(
Mesh* mesh,
double powerVol,
double powerWall){
432 return run(mesh, mesh->
labelHeat(), powerVol, powerWall);
435 bool run(
Mesh* mesh,
IntFloatAttr& heatMap,
double powerVol,
double powerWall);
444 setName(
"Mesh/Heat Map/Measures 3D/Geometry/Outside Wall Area Ratio");
445 setDesc(
"Wall Area of a cell not shared with a neighbor cell");
446 setIcon(QIcon(
":/images/MakeHeatMap.png"));
454 if(!checkState().mesh(MESH_ANY))
456 Mesh *mesh = currentMesh();
473 setName(
"Mesh/Heat Map/Measures 3D/Geometry/Outside Wall Area Ratio");
474 setDesc(
"Wall Area of a cell not shared with a neighbor cell");
475 setIcon(QIcon(
":/images/MakeHeatMap.png"));
483 if(!checkState().mesh(MESH_ANY))
485 Mesh *mesh = currentMesh();
502 setName(
"Mesh/Heat Map/Measures 3D/Location/Cell Distance");
503 setDesc(
"Distance through the tissue to the nearest selected cells.");
504 setIcon(QIcon(
":/images/MakeHeatMap.png"));
506 addParm(
"Wall Weights",
"Wall Weights",
"Euclidean", QStringList() <<
"1 / Wall Length" <<
"1" <<
"Euclidean");
507 addParm(
"Restrict connectivity to same cell type",
"Restrict connectivity to same cell type",
"No", booleanChoice());
515 if(!checkState().mesh(MESH_ANY))
517 Mesh *mesh = currentMesh();
518 return run(mesh, parm(
"Wall Weights"),
stringToBool(parm(
"Restrict connectivity to same cell type")));
521 bool run(
Mesh* mesh, QString weight,
bool cellTypes){
522 return run(mesh, weight, cellTypes, mesh->
labelHeat());
525 bool run(
Mesh* mesh, QString weight,
bool cellTypes,
IntFloatAttr& heatMap);
535 setName(
"Mesh/Heat Map/Measures 3D/Location/Cell Distance Bezier Ring");
536 setDesc(
"Distance through the tissue to the nearest selected cells.");
537 setIcon(QIcon(
":/images/MakeHeatMap.png"));
539 addParm(
"Wall Weights",
"Wall Weights",
"1", QStringList() <<
"1" <<
"Euclidean");
540 addParm(
"Restrict connectivity to same cell type",
"Restrict connectivity to same cell type",
"Yes", booleanChoice());
541 addParm(
"Direct Distance Limit (um)",
"Direct Distance Limit (um)",
"20.0");
542 addParm(
"Selected as Direct",
"Selected as Direct",
"Yes", booleanChoice());
543 addParm(
"Consider Ring Orientation",
"Consider Ring Orientation",
"Yes", booleanChoice());
544 addParm(
"Select Direct Cells",
"Select Direct Cells",
"No", booleanChoice());
545 addParm(
"Keep Selected Cells",
"Keep Selected Cells",
"Yes", booleanChoice());
553 if(!checkState().mesh(MESH_ANY))
555 Mesh *mesh = currentMesh();
556 return run(mesh, parm(
"Wall Weights"),
stringToBool(parm(
"Restrict connectivity to same cell type")),
557 parm(
"Direct Distance Limit (um)").toDouble(),
stringToBool(parm(
"Selected as Direct")),
565 bool run(
Mesh* mesh, QString weight,
bool cellTypes,
double thresholdDis,
bool selectedAsDirect,
bool considerOrientation,
575 setName(
"Mesh/Heat Map/Measures 3D/Location/Cell Coordinate");
576 setDesc(
"Distance through the tissue to the nearest selected cells.");
577 setIcon(QIcon(
":/images/MakeHeatMap.png"));
579 addParm(
"Dimension",
"Dimension",
"X", QStringList() <<
"X" <<
"Y" <<
"Z" <<
"Distance Origin");
584 if(!checkState().mesh(MESH_ANY))
586 Mesh *mesh = currentMesh();
587 Stack* s = currentStack();
588 return run(s, mesh, parm(
"Dimension"),mesh->
labelHeat());
600 setName(
"Mesh/Heat Map/Measures 3D/Location/Mesh Distance");
601 setDesc(
"Distance to the other mesh");
602 setIcon(QIcon(
":/images/MakeHeatMap.png"));
608 if(!checkState().mesh(MESH_ANY))
610 Mesh *mesh = currentMesh();
611 Mesh *mesh2 = otherMesh();
612 return run(mesh, mesh2);
616 return run(mesh, mesh2, mesh->
labelHeat());
629 setName(
"Mesh/Heat Map/Measures 3D/Location/Distance to Bezier");
630 setDesc(
"Computes for each cell the distance to a defined Bezier grid or line");
631 setIcon(QIcon(
":/images/MakeHeatMap.png"));
633 addParm(
"Consider Orientation",
"Consider Orientation",
"Yes",booleanChoice());
634 addParm(
"Reverse Orientation",
"Reverse Orientation",
"No",booleanChoice());
640 if(!checkState().mesh(MESH_ANY))
642 Mesh *mesh = currentMesh();
643 Stack *s1 = currentStack();
657 setName(
"Mesh/Heat Map/Measures 3D/Location/Bezier Coord");
659 setIcon(QIcon(
":/images/MakeHeatMap.png"));
666 if(!checkState().mesh(MESH_ANY))
668 Mesh *mesh = currentMesh();
669 Stack *s1 = currentStack();
683 setName(
"Mesh/Heat Map/Measures 3D/Location/Distance to Plane from Bezier");
684 setDesc(
"Computes for each cell the distance to fitted plane of the supporting points of a defined Bezier grid or line");
685 setIcon(QIcon(
":/images/MakeHeatMap.png"));
687 addParm(
"Consider Orientation",
"Consider Orientation",
"Yes",booleanChoice());
688 addParm(
"Reverse Orientation",
"Reverse Orientation",
"No",booleanChoice());
694 if(!checkState().mesh(MESH_ANY))
696 Mesh *mesh = currentMesh();
697 Stack *s1 = currentStack();