11 #ifndef WALL_SIGNAL_ORIENTATION_HPP
12 #define WALL_SIGNAL_ORIENTATION_HPP
23 setName(
"Mesh/Cell Axis/Polarization/Compute Signal Orientation");
24 setDesc(
"Compute principal orientation of signal gradient between cell border and center.");
25 setIcon(QIcon(
":/images/PDG.png"));
27 addParm(
"Border Size",
"Width of cell border that is not taken into account for the computation.",
"0.5");
28 addParm(
"Minimum inner area ratio",
"Minimum ratio of inner area (whole cell - border) vs. total area needed for computation.",
"0.25");
33 if (!checkState().mesh(MESH_NON_EMPTY|MESH_SIGNAL))
35 Mesh* mesh = currentMesh();
36 return run(mesh, parm(
"Border Size").toFloat(), parm(
"Minimum inner area ratio").toFloat());
39 bool run(
Mesh* mesh,
float border,
float minAreaRatio);
47 setName(
"Mesh/Cell Axis/Polarization/Display Signal Orientation");
48 setDesc(
"Display the orientation of gradients of signal between cell center vs border.");
49 setIcon(QIcon(
":/images/PDG.png"));
51 addParm(
"Heatmap",
"Display strength of orientation as a colormap.\n"
52 "Ratio = Max_gradient/Min_gradient -1Difference = Max_gradient - Min_gradient",
"None",
53 QStringList() <<
"None" <<
"Ratio" <<
"Difference" <<
"BezierX" <<
"BezierY");
54 addParm(
"Axis",
"Display principal directions of signal gradient. \n"
55 "Ratio -> display only Max orientation, scaled by (Max/Min-1). \n"
56 "Difference -> display only Max orientation, scaled by (Max-Min). \n"
57 ,
"Difference", QStringList() <<
"None" <<
"Both" <<
"Ratio" <<
"Difference" <<
"BezierX" <<
"BezierY");
58 addParm(
"Line Color Max",
"Color Max direction.",
"red", QColor::colorNames());
59 addParm(
"Line Color Min",
"Color Min direction.",
"green", QColor::colorNames());
60 addParm(
"Line Width",
"Line Width",
"5.0");
61 addParm(
"Line Scale",
"Length of the vectors = Scale * orientation strength.",
"0.01");
62 addParm(
"Line Offset",
"Draw the vector ends a bit tilted up for proper display on surfaces.",
"0.1");
63 addParm(
"Threshold",
"Minimal value of orientation strength required for drawing main direction. \n"
64 "Either use Ratio or Difference, depending on the display Axis option.",
"0.0");
69 if(!checkState().mesh(MESH_NON_EMPTY))
72 return run(currentMesh(),parm(
"Heatmap"), parm(
"Axis"), QColor(parm(
"Line Color Max")),
73 QColor(parm(
"Line Color Min")), parm(
"Line Width").toFloat(),
74 parm(
"Line Scale").toFloat(), parm(
"Line Offset").toFloat(), parm(
"Threshold").toFloat());
77 bool run(
Mesh *mesh,
const QString displayHeatMap,
const QString displayAxis,
const QColor& qaxisColor1,
78 const QColor& qaxisColor2,
float axisLineWidth,
float axisLineScale,
float axisOffset,
float orientationThreshold);
87 setName(
"Mesh/Cell Axis 3D/Polarization/Compute Signal Orientation");
88 setDesc(
"Compute principal orientation of signal gradient between cell border and center. 3D version for volumetric meshes");
89 setIcon(QIcon(
":/images/PDG.png"));
95 if (!checkState().mesh(MESH_NON_EMPTY|MESH_SIGNAL))
return false;
96 Mesh* mesh = currentMesh();
100 bool run(
Mesh* mesh);
109 setName(
"Mesh/Cell Axis 3D/Polarization/Display Signal Orientation");
110 setDesc(
"Display the orientation of gradients of signal between cell center vs border. 3D version for volumetric meshes");
111 setIcon(QIcon(
":/images/PDG.png"));
113 addParm(
"Heatmap",
"Display strength of orientation as a colormap.\n"
114 "Ratio = Max_gradient/Min_gradient -1Difference = Max_gradient - Min_gradient",
"None",
115 QStringList() <<
"None" <<
"Ratio" <<
"Difference" <<
"BezierX" <<
"BezierY");
116 addParm(
"Axis",
"Display principal directions of signal gradient. \n"
117 "Ratio -> display only Max orientation, scaled by (Max/Min-1). \n"
118 "Difference -> display only Max orientation, scaled by (Max-Min). \n"
119 ,
"Difference", QStringList() <<
"None" <<
"All" <<
"Both" <<
"Ratio" <<
"Difference" <<
"BezierX" <<
"BezierY");
120 addParm(
"Line Color Max",
"Color Max direction.",
"red", QColor::colorNames());
121 addParm(
"Line Color Mid",
"Color Min direction.",
"blueviolet", QColor::colorNames());
122 addParm(
"Line Color Min",
"Color Min direction.",
"lightgreen", QColor::colorNames());
123 addParm(
"Line Width",
"Line Width",
"5.0");
124 addParm(
"Line Scale",
"Length of the vectors = Scale * orientation strength.",
"0.01");
125 addParm(
"Threshold",
"Minimal value of orientation strength required for drawing main direction. \n"
126 "Either use Ratio or Difference, depending on the display Axis option.",
"0.0");
131 if(!checkState().mesh(MESH_NON_EMPTY))
134 return run(currentMesh(),parm(
"Heatmap"), parm(
"Axis"), QColor(parm(
"Line Color Max")), QColor(parm(
"Line Color Mid")),
135 QColor(parm(
"Line Color Min")), parm(
"Line Width").toFloat(), parm(
"Line Scale").toFloat(), parm(
"Threshold").toFloat());
138 bool run(
Mesh *mesh,
const QString displayHeatMap,
const QString displayAxis,
const QColor& qaxisColor1,
const QColor& qaxisColor2,
139 const QColor& qaxisColor3,
float axisLineWidth,
float axisLineScale,
float orientationThreshold);