11 #ifndef MESH_PROCESS_HEAT_MAP_HPP 12 #define MESH_PROCESS_HEAT_MAP_HPP 22 mgxBase_EXPORT
void getBBox(
const HVec3F& pts, Point3f* bBox);
39 enum MapType { AREA, VOLUME, WALL };
50 enum PolarityType { NONE, CELL_AVERAGE, WALL_MIN };
78 bool operator()(
Mesh* mesh1,
Mesh* mesh2, MapType map, SignalType signal,
const QString& reportFile,
int report,
79 bool manualRange,
float rangeMin,
float rangeMax,
bool signalAverage,
bool globalCoordinates,
80 PolarityType polarity, MultiMapType multiMapType,
float growthTime,
float borderSize);
90 <<
"Type" <<
"Visualize" <<
"FileName" <<
"ReportFields" <<
"Man. Range" <<
"Range Min" 91 <<
"Range Max" <<
"Signal Avg" <<
"Global Coord" <<
"Polarity Type" <<
"Change Map" 92 <<
"Increasing" <<
"Diff Type" <<
"Growth Time" <<
QString(
"Border Size(%1)").
arg(UM);
97 <<
"Area: signal/geometry on curved surfaces,\n" 98 "Volume: for 3D only,\n" 99 "Walls: quantify signal or geometry at cell borders." 100 <<
"Geometry: cell areas or volume,\n" 101 "Border signal: signal associated with cell borders, within a given distance (Border Size)\n" 102 "Interior signal: total signal of a cell - border signal.\n" 103 <<
"Path to output file." 104 <<
"Options to report the following fields in spreadsheet: Geometry, Signal, Border-Interior" 105 <<
"Manually define the range of the color map." 106 <<
"Color map lower bound." 107 <<
"Color map upper bound." 108 <<
"Option to normalize the signal by cell area or volume" 109 <<
"Apply the rotation/translation of the stack to the cell center coordinates." 110 <<
"Experimental option, attempt to determine cell signal polarity based on strength of signal on " 112 "Cell Average: compare each wall signal to signal average,\n" 113 "Wall/Min: compare wall signal to the weakest wall signal in the cell." 114 <<
"Compare two meshes with each other (deformation or change in signal) .\n" 115 <<
"Increasing: the current mesh is the reference (T0), the other mesh is the changed state (T1),\n" 116 "Decreasing: the other mesh is the reference (T0), the current mesh is the changed state (T1)." 117 <<
"Ratio: area or signal in changed state(T1) / area or signal in reference (T0),\n" 118 "Difference: area or signal in changed state(T1) - area or signal in reference (T0),\n" 119 "Growth: (Ratio -1) / growth time.\n" 120 <<
"Time interval between the two samples." <<
QString(
"Border Size(%1)").
arg(UM);
125 <<
"Area" <<
"Geometry" <<
"" <<
"Geometry" <<
"No" <<
"0" <<
"65535" <<
"Yes" 126 <<
"No" <<
"None" <<
"No" <<
"Yes" <<
"Ratio" <<
".001" <<
"1.0";
133 void changeMapType(
const QString& type);
134 void selectSpreadsheetFile();
145 bool globalCoordinates;
146 PolarityType polarity;
148 MultiMapType multiMapType;
164 if(!checkState().mesh(MESH_NON_EMPTY))
168 if(parms[2].isEmpty())
169 min = std::numeric_limits<float>::quiet_NaN();
171 min = parms[2].toFloat(&ok);
173 return setErrorMessage(
"Error, parameter 'Min Heat' must be either empty, or a number");
174 if(parms[3].isEmpty())
175 max = std::numeric_limits<float>::quiet_NaN();
177 max = parms[3].toFloat(&ok);
179 return setErrorMessage(
"Error, parameter 'Min Heat' must be either empty, or a number");
183 bool operator()(
Mesh* mesh,
bool rescale,
bool deleteCells,
float min,
float max);
188 "Delete labels with heat within a given range. The heat is given relative to the total range."; }
190 <<
"Rescale" <<
"Delete cells" <<
"Min Heat" <<
"Max Heat"; }
192 <<
"Redefine the lower/upper bounds of colormap to fit the range of values." 193 <<
"Delete vertices within a given range of the color map (Min Heat-Max Heat)." 194 <<
"Lower bound of color value for which the cells will be deleted (empty for current min)." 195 <<
"Upper bound of color value for which the cells will be deleted (empty for current max)."; }
200 map[0] = booleanChoice();
201 map[1] = booleanChoice();
218 if(!checkState().mesh(MESH_HEAT))
220 Mesh* m = currentMesh();
223 if(parms[0].isEmpty())
224 min = std::numeric_limits<float>::quiet_NaN();
226 min = parms[0].toFloat(&ok);
228 return setErrorMessage(
"Error, parameter 'Min' must be either empty, or a number");
229 if(parms[1].isEmpty())
230 max = std::numeric_limits<float>::quiet_NaN();
232 max = parms[1].toFloat(&ok);
234 return setErrorMessage(
"Error, parameter 'Max' must be either empty, or a number");
235 return (*
this)(m, min, max);
238 bool operator()(
Mesh* m,
float min,
float max);
245 <<
"Lower bound (empty for current)" <<
"Upper bound (empty for current)"; }
264 if(!checkState().mesh(MESH_ANY))
266 Mesh* m = currentMesh();
267 return (*
this)(m, parms[0]);
270 bool operator()(
Mesh* mesh,
const QString& filename);
301 if(!checkState().mesh(MESH_ANY))
303 Mesh* m = currentMesh();
304 return (*
this)(m, parms[0], parms[1].toInt(), parms[2].toFloat());
307 bool operator()(
Mesh* mesh,
const QString& filename,
int column,
float border_size);
311 QString description()
const {
return "Load a heat map file and set the corresponding heat for each label"; }
313 <<
"Filename" <<
"Column" <<
QString(
"Border size (%1)").
arg(UM); }
315 <<
"Path to spreadsheet file." 316 <<
"Column of the csv file to load for display.\n" 317 "Label: cell labels, Value: original computed values (e.g. growth or signal), Heat: " 318 "values scaled for visualization (always between 0-1)." 319 <<
"Width of cell outline used for vizualization of 'wall' colormaps"; }
324 void selectFile(
const QString& filename);
326 void selectColumn(
int c);
347 if(!checkState().mesh(MESH_ANY))
349 Mesh* m = currentMesh();
350 return (*
this)(m, parms[0]);
353 bool operator()(
Mesh* mesh,
const QString& filename);
377 if(!checkState().mesh(MESH_ANY))
379 Mesh* m = currentMesh();
380 return (*
this)(m, parms[0]);
383 bool operator()(
Mesh* mesh,
const QString& filename);
403 if(!checkState().mesh(MESH_ANY))
405 Mesh* m = currentMesh();
409 bool operator()(
Mesh* mesh);
Definition: MeshProcessHeatMap.hpp:62
QString name() const
Returns the name of the process.
Definition: MeshProcessHeatMap.hpp:412
QString folder() const
Folder in which to place the process.
Definition: MeshProcessHeatMap.hpp:411
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: MeshProcessHeatMap.hpp:278
std::map< int, HVec3U > IntHVec3uMap
Map of an integer to a host vector of 3 unsigned integers.
Definition: Mesh.hpp:78
QString description() const
Returns a description of the process for the GUI.
Definition: MeshProcessHeatMap.hpp:387
QString folder() const
Folder in which to place the process.
Definition: MeshProcessHeatMap.hpp:84
QStringList parmNames() const
List of named parameters.
Definition: MeshProcessHeatMap.hpp:414
QString description() const
Returns a description of the process for the GUI.
Definition: MeshProcessHeatMap.hpp:413
QStringList parmNames() const
List of named parameters.
Definition: MeshProcessHeatMap.hpp:243
QStringList parmDescs() const
List of parameters descriptions.
Definition: MeshProcessHeatMap.hpp:191
std::map< IntIntPair, float > IntIntFloatMap
Map of a pair of integers to a float.
Definition: Mesh.hpp:122
arg(const QString &a, int fieldWidth=0, const QChar &fillChar=QLatin1Char( ' ')
std::map< int, float > IntFloatMap
Map of an integer to a float.
Definition: Mesh.hpp:68
QStringList parmDescs() const
List of parameters descriptions.
Definition: MeshProcessHeatMap.hpp:389
QStringList parmDefaults() const
List of default parms.
Definition: MeshProcessHeatMap.hpp:196
Rescale the heat map, specifying new lower and upper bound.
Definition: MeshProcessHeatMap.hpp:212
QString description() const
Returns a description of the process for the GUI.
Definition: MeshProcessHeatMap.hpp:357
bool operator()(const QStringList &parms)
Implementation of the process with generic arguments.
Definition: MeshProcessHeatMap.hpp:299
QString description() const
Returns a description of the process for the GUI.
Definition: MeshProcessHeatMap.hpp:311
Save the current heat map in a CSV file.
Definition: MeshProcessHeatMap.hpp:255
QString name() const
Returns the name of the process.
Definition: MeshProcessHeatMap.hpp:386
Store mapping from each label to a label in a different mesh (parent).
Definition: MeshProcessHeatMap.hpp:339
Compute heat map on the current mesh.
Definition: MeshProcessHeatMap.hpp:32
QString folder() const
Folder in which to place the process.
Definition: MeshProcessHeatMap.hpp:240
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: MeshProcessHeatMap.hpp:361
QStringList parmDescs() const
List of parameters descriptions.
Definition: MeshProcessHeatMap.hpp:359
QString folder() const
Folder in which to place the process.
Definition: MeshProcessHeatMap.hpp:272
QString name() const
Returns the name of the process.
Definition: MeshProcessHeatMap.hpp:310
QString name() const
Returns the name of the process.
Definition: MeshProcessHeatMap.hpp:273
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: MeshProcessHeatMap.hpp:204
QStringList parmNames() const
List of named parameters.
Definition: MeshProcessHeatMap.hpp:312
QStringList parmNames() const
List of named parameters.
Definition: MeshProcessHeatMap.hpp:189
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: MeshProcessHeatMap.hpp:247
QString folder() const
Folder in which to place the process.
Definition: MeshProcessHeatMap.hpp:355
bool operator()(const QStringList &parms)
Implementation of the process with generic arguments.
Definition: MeshProcessHeatMap.hpp:345
QString description() const
Returns a description of the process for the GUI.
Definition: MeshProcessHeatMap.hpp:86
QStringList parmDefaults() const
List of default parms.
Definition: MeshProcessHeatMap.hpp:277
QStringList parmDescs() const
List of parameters descriptions.
Definition: MeshProcessHeatMap.hpp:276
QString name() const
Returns the name of the process.
Definition: MeshProcessHeatMap.hpp:356
std::map< int, VIdSet > IntVIdSetMap
Map of an integer to a set of vertex ids.
Definition: Mesh.hpp:98
This class holds the actual mesh as a VV Graph and all sort of properties for it, including visualiza...
Definition: Mesh.hpp:177
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: MeshProcessHeatMap.hpp:128
QString folder() const
Folder in which to place the process.
Definition: MeshProcessHeatMap.hpp:185
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: MeshProcessHeatMap.hpp:391
QStringList parmDescs() const
List of parameters descriptions.
Definition: MeshProcessHeatMap.hpp:94
Load the heat map from a CSV file.
Definition: MeshProcessHeatMap.hpp:292
QString folder() const
Folder in which to place the process.
Definition: MeshProcessHeatMap.hpp:385
Load mapping from each label to a label in a different mesh (parent).
Definition: MeshProcessHeatMap.hpp:369
QStringList parmDefaults() const
List of default parms.
Definition: MeshProcessHeatMap.hpp:320
This namespace contains all the API of MorphoGraphX.
Definition: Assert.hpp:26
QStringList parmDescs() const
List of parameters descriptions.
Definition: MeshProcessHeatMap.hpp:244
QString name() const
Returns the name of the process.
Definition: MeshProcessHeatMap.hpp:186
QStringList parmNames() const
List of named parameters.
Definition: MeshProcessHeatMap.hpp:388
File containing the definition of a Process.
ParmChoiceMap parmChoice() const
Purely for GUI purposes, provides for some of the parms parameter a choice.
Definition: MeshProcessHeatMap.hpp:197
QStringList parmDefaults() const
List of default parms.
Definition: MeshProcessHeatMap.hpp:390
QStringList parmNames() const
List of named parameters.
Definition: MeshProcessHeatMap.hpp:87
This is the main process class, the one all process inherit from.
Definition: Process.hpp:258
QString name() const
Returns the name of the process.
Definition: MeshProcessHeatMap.hpp:85
mgx_EXPORT bool stringToBool(const QString &string)
Helper function converting a string into a boolean.
This namespace contains all the classes needed to define processes.
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: MeshProcessHeatMap.hpp:416
QStringList parmDescs() const
List of parameters descriptions.
Definition: MeshProcessHeatMap.hpp:314
bool operator()(const QStringList &)
Implementation of the process with generic arguments.
Definition: MeshProcessHeatMap.hpp:401
QStringList parmNames() const
List of named parameters.
Definition: MeshProcessHeatMap.hpp:275
bool operator()(const QStringList &parms)
Implementation of the process with generic arguments.
Definition: MeshProcessHeatMap.hpp:262
QStringList parmNames() const
List of named parameters.
Definition: MeshProcessHeatMap.hpp:358
QStringList parmDefaults() const
List of default parms.
Definition: MeshProcessHeatMap.hpp:360
QStringList parmDefaults() const
List of default parms.
Definition: MeshProcessHeatMap.hpp:122
QString description() const
Returns a description of the process for the GUI.
Definition: MeshProcessHeatMap.hpp:187
QString description() const
Returns a description of the process for the GUI.
Definition: MeshProcessHeatMap.hpp:242
QString folder() const
Folder in which to place the process.
Definition: MeshProcessHeatMap.hpp:309
QStringList parmDefaults() const
List of default parms.
Definition: MeshProcessHeatMap.hpp:246
QString name() const
Returns the name of the process.
Definition: MeshProcessHeatMap.hpp:241
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: MeshProcessHeatMap.hpp:321
bool operator()(const QStringList &parms)
Implementation of the process with generic arguments.
Definition: MeshProcessHeatMap.hpp:216
bool operator()(const QStringList &parms)
Implementation of the process with generic arguments.
Definition: MeshProcessHeatMap.hpp:162
bool operator()(const QStringList &parms)
Implementation of the process with generic arguments.
Definition: MeshProcessHeatMap.hpp:375
QString description() const
Returns a description of the process for the GUI.
Definition: MeshProcessHeatMap.hpp:274
Clear label to parent mapping.
Definition: MeshProcessHeatMap.hpp:397
QStringList parmDescs() const
List of parameters descriptions.
Definition: MeshProcessHeatMap.hpp:415
Mesh processes have mutable access to meshes and non-mutable access to stacks.
Definition: Process.hpp:865
Delete labeling, and possibly cells, if their heat falls within a defined range.
Definition: MeshProcessHeatMap.hpp:158