MorphoGraphX
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MeshProcessSignal.hpp
1 #ifndef MESH_PROCESS_SIGNAL_HPP
2 #define MESH_PROCESS_SIGNAL_HPP
3 
4 #include <Process.hpp>
5 
6 #include <Curvature.hpp>
7 
8 class Ui_LoadHeatMap;
9 
10 namespace mgx { namespace process {
11 
12  typedef std::map<int, HVec3U> IntHVec3UMap;
13 
16 
22  class mgxBase_EXPORT ViewMeshProcess : public MeshProcess {
23  public:
24  ViewMeshProcess(const MeshProcess& process) : Process(process), MeshProcess(process) {}
25 
26  bool operator()(const QStringList& parms);
27 
28  QString folder() const { return "System"; }
29  QString name() const { return "View"; }
30  QString description() const { return
31  "Modify how the current mesh is viewed. Useful for scripts."; }
32  QStringList parmNames() const { return QStringList()
33  << "Show Surface" << "Surface Type" << "Signal Type" << "Blend" << "Cull"
34  << "Show Mesh" << "Mesh View" << "Show Lines" << "Show Points" << "Show Map"
35  << "Scale" << "Transform" << "BBox" << "Brightness" << "Opacity";
36  }
37  QStringList parmDescs() const { return QStringList()
38  << "Draw mesh as a continuous surface."
39  << "Nrml: show projected signal, Labels: color triangles according to assigned "
40  "labels, Parents: color triangles with parent labels, Heat: color triangles "
41  "with computed heat map (e.g. growth)"
42  << "Signal: show projected signal, Tex: Use 3D stack as texture, Img: Use 2D "
43  "texture (height map)."
44  << "Semi-transparent mesh, for example to superimpose to meshes or view the "
45  "stack through the mesh."
46  << "Color the triangles (with signal or labels) only on the top of the mesh."
47  << "Draw triangle edges and nodes"
48  << "All: draw all triangles. Border: draw outside edge of the mesh only. "
49  "Cells: draw cell outlines only. Selected: draw selected nodes only. "
50  << "Show connecting lines between nodes in the mesh."
51  << "Show mesh nodes."
52  << "Mapping of text on the labels (e.g. label number)"
53  << "Change scaling of mesh/stacks, independently in 3 directions (x,y,z). NB: "
54  << "a stack saved with 'Scale' turned on will have a modified voxel size, "
55  "while saved meshes are unaffected. "
56  << "Apply rotation and translation to the mesh/stack."
57  << "Display the bounding box (i.e. total size) of a stack."
58  << "Brightness of signal, labels or heat"
59  << "Opacity of signal, labels or heat";
60  }
61 
62  QStringList parmDefaults() const { return QStringList()
63  << "" << "" << "" << "" << "" << "" << "" << "" << "" << ""
64  << "" << "" << "" << "-1" << "-1"; }
65 
67  {
68  QStringList bools = QStringList() << "" << booleanChoice();
69  ParmChoiceMap map;
70  map[0] = bools;
71  map[1] = QStringList() << "" << "Normal" << "Heat" << "Label";
72  map[2] = QStringList() << "" << "Signal" << "Texture" << "Image";
73  map[3] = map[4] = map[5] = bools;
74  map[6] = QStringList() << "" << "All" << "Border" << "Cells" << "Selected";
75  map[7] = map[8] = map[9] = map[10] = map[11] = map[12] = bools;
76  return map;
77  }
78  QIcon icon() const { return QIcon(":/images/Palette.png"); }
79  };
80 
86  class mgxBase_EXPORT ProjectSignal : public MeshProcess {
87  public:
88  ProjectSignal(const MeshProcess& process) : Process(process), MeshProcess(process) {}
89 
90  bool operator()(const QStringList& parms)
91  {
92  if(!checkState().store(STORE_NON_LABEL).mesh(MESH_NON_EMPTY))
93  return false;
94  return (*this)(currentStack()->currentStore(), currentMesh(), stringToBool(parms[0]),
95  parms[1].toFloat(), parms[2].toFloat(), parms[3].toFloat(), parms[4].toFloat());
96  }
97 
98  bool operator()(const Store* store, Mesh* mesh, bool useAbsSignal, float minDist,
99  float maxDist, float absSignalMin, float absSignalMax);
100  void projSignal(const Stack* stack, const HVecUS& data, vertex v, float mindist, float maxdist);
101  QString folder() const { return "Signal"; }
102  QString name() const { return "Project Signal"; }
103  QString description() const { return "Project signal onto mesh, perpendicular to its curved surface."; }
104  QStringList parmNames() const { return QStringList()
105  << "Use absolute" << QString("Min Dist (%1)").arg(UM) << QString("Max Dist (%1)").arg(UM)
106  << "Min Signal" << "Max Signal";
107  }
108  QStringList parmDescs() const { return QStringList()
109  << "Use absolute values of signal, instead of normalizing it, useful for signal quantification."
110  << "Distance (triangle-voxel) above which the signal is projected."
111  << "Maximal distance (triangle-voxel) used for signal projection."
112  << "Lower bound of signal value if 'Use absolute' is chosen"
113  << "Upper bound of projected signal value.";
114  }
115  QStringList parmDefaults() const { return QStringList() << "No" << "2.0" << "6.0" << "0.0" << "60000.0"; }
117  {
118  ParmChoiceMap map;
119  map[0] = booleanChoice();
120  return map;
121  }
122  QIcon icon() const { return QIcon(":/images/ProjectColor.png"); }
123  };
124 
130  class mgxBase_EXPORT SmoothMeshSignal : public MeshProcess {
131  public:
132  SmoothMeshSignal(const MeshProcess& process) : Process(process), MeshProcess(process) {}
133 
134  bool operator()(const QStringList& parms)
135  {
136  if(!checkState().mesh(MESH_NON_EMPTY))
137  return false;
138  return (*this)(currentMesh(), parms[0].toUInt());
139  }
140 
141  bool operator()(Mesh* mesh, uint passes);
142 
143  QString folder() const { return "Signal"; }
144  QString name() const { return "Smooth Mesh Signal"; }
145  QString description() const { return "Averages the signal of each node, based on its immediate neighbors."; }
146  QStringList parmNames() const { return QStringList() << "Passes"; }
147  QStringList parmDescs() const { return QStringList() << "Number of smoothing iterations."; }
148  QStringList parmDefaults() const { return QStringList() << "3"; }
149  QIcon icon() const { return QIcon(":/images/SmoothColor.png"); }
150  };
151 
157  class mgxBase_EXPORT MeshBrightness : public MeshProcess {
158  public:
159  MeshBrightness(const MeshProcess& process) : Process(process), MeshProcess(process) {}
160 
161  bool operator()(const QStringList& parms)
162  {
163  if(!checkState().mesh(MESH_NON_EMPTY))
164  return false;
165  return (*this)(currentMesh(), parms[0].toFloat());
166  }
167 
168  bool operator()(Mesh* mesh, float amount);
169 
170  QString folder() const { return "Signal"; }
171  QString name() const { return "Mesh Brighness"; }
172  QString description() const { return "Changes the brightness of the signal on a mesh."; }
173  QStringList parmNames() const { return QStringList() << "Amount"; }
174  QStringList parmDescs() const { return QStringList() << "Amount to multiply the signal, >1 is brighter"; }
175  QStringList parmDefaults() const { return QStringList() << "2.0"; }
176  QIcon icon() const { return QIcon(":/images/Brightness.png"); }
177  };
178 
184  class mgxBase_EXPORT ClearMeshSignal : public MeshProcess {
185  public:
186  ClearMeshSignal(const MeshProcess& process) : Process(process), MeshProcess(process) {}
187 
188  bool operator()(const QStringList& parms)
189  {
190  if(!checkState().mesh(MESH_NON_EMPTY))
191  return false;
192  return (*this)(currentMesh(), parms[0].toUInt());
193  }
194 
195  bool operator()(Mesh* mesh, uint value);
196 
197  QString folder() const { return "Signal"; }
198  QString name() const { return "Clear Mesh Signal"; }
199  QString description() const { return "Erase the signal on the mesh"; }
200  QStringList parmNames() const { return QStringList() << "Value"; }
201  QStringList parmDescs() const { return QStringList() << "Assign this signal value to the mesh."; }
202  QStringList parmDefaults() const { return QStringList() << "50000"; }
203  QIcon icon() const { return QIcon(":/images/ClearSignal.png"); }
204  };
205 
212  class mgxBase_EXPORT ProjectCurvature : public MeshProcess {
213  public:
214  ProjectCurvature(const MeshProcess& process) : Process(process), MeshProcess(process) {}
215 
216  bool operator()(const QStringList& parms)
217  {
218  if(!checkState().mesh(MESH_NON_EMPTY))
219  return false;
220  bool ok;
221  float neighborhood = parms[2].toFloat(&ok);
222  if(not ok)
223  return setErrorMessage("Error, parameter 'Neighborhood' must be a number");
224  float mincurv = parms[4].toFloat(&ok);
225  if(not ok)
226  return setErrorMessage("Error, parameter 'Min Curv' must be a number");
227  float maxcurv = parms[5].toFloat(&ok);
228  if(not ok)
229  return setErrorMessage("Error, parameter 'Max Curv' must be a number");
230  float percentile = parms[6].toFloat(&ok);
231  if(not ok)
232  return setErrorMessage("Error, parameter 'Percentile' must be a number");
233  return (*this)(currentMesh(), parms[0], parms[1], neighborhood, stringToBool(parms[3]), mincurv, maxcurv,
234  percentile);
235  }
236 
237  bool operator()(Mesh* mesh, QString output, QString type, float neighborhood, bool auto_scale, float mincurv,
238  float maxcurv, int percentile);
239 
240  QString folder() const { return "Signal"; }
241  QString name() const { return "Project Mesh Curvature"; }
242  QString description() const { return
243  "Compute curvature at each node of the mesh, for a given neighborhood size. "
244  "Curvature values are stored as signal.";
245  }
246  QStringList parmNames() const { return QStringList()
247  << "Output" << "Type" << QString("Neighborhood (%1)").arg(UM) << "AutoScale"
248  << "Min Curv" << "Max Curv" << "Autoscale percentile";
249  }
250  QStringList parmDescs() const { return QStringList()
251  << "Name of output file, if desired."
252  << "Minimal = minCurv, Maximal = maxCurv, Gaussian = maxCurv * minCurv, "
253  "SumSquare = maxCurv^2 + minCurv^2, Average = (maxCurv + minCurv)/2, "
254  "SignedAverageAbs = sign(max or min) x (abs(maxCurv) + abs(minCurv))/2"
255  << QString("Neighborhood (%1)").arg(UM)
256  << "Clip max and min signal range according to curvature distribution"
257  << "Minimal curvature value displayed"
258  << "Maximal curvature value displayed"
259  << "Auto-scale signal range based on curvature percentile";
260  }
262  << "" << "Gaussian" << "3.0" << "Yes" << "-50.0" << "50.0" << "85"; }
264  {
265  ParmChoiceMap map;
266  map[1] = QStringList() << "Minimal" << "Maximal" << "Gaussian" << "SumSquare" << "Average" << "SignedAverageAbs";
267  map[3] = booleanChoice();
268  return map;
269  }
270  QIcon icon() const { return QIcon(":/images/Curvature.png"); }
271  };
272 
278  class mgxBase_EXPORT MeshGaussianBlur : public MeshProcess {
279  public:
280  MeshGaussianBlur(const MeshProcess& process) : Process(process), MeshProcess(process) {}
281 
282  bool operator()(const QStringList& parms)
283  {
284  if(!checkState().mesh(MESH_NON_EMPTY))
285  return false;
286  return (*this)(currentMesh(), parms[0].toFloat());
287  }
288 
289  bool operator()(Mesh* mesh, float radius);
290 
291  QString folder() const { return "Signal"; }
292  QString name() const { return "Gaussian Blur"; }
293  QString description() const { return "Apply Gaussian Blur to mesh signal"; }
294  QStringList parmNames() const { return QStringList() << QString("Radius (%1)").arg(UM); }
295  QStringList parmDescs() const { return QStringList()
296  << "Size of neighborhood used for Gaussian blur. The blur function standard "
297  "deviation is given by sigma = radius/2. ";
298  }
299  QStringList parmDefaults() const { return QStringList() << "2.0"; }
300  QIcon icon() const { return QIcon(":/images/Blur.png"); }
301  };
302 
308  class mgxBase_EXPORT MeshDiffGaussians : public MeshProcess {
309  public:
310  MeshDiffGaussians(const MeshProcess& process) : Process(process), MeshProcess(process) {}
311 
312  bool operator()(const QStringList& parms)
313  {
314  if(!checkState().mesh(MESH_NON_EMPTY))
315  return false;
316  return (*this)(currentMesh(), parms[0].toFloat(), parms[1].toFloat());
317  }
318 
319  bool operator()(Mesh* mesh, float radius1, float radius2);
320 
321  QString folder() const { return "Signal"; }
322  QString name() const { return "Difference of Gaussians"; }
323  QString description() const { return "Calculate a difference of Gaussians for the mesh signal"; }
324  QStringList parmNames() const { return QStringList() << QString("Radius1 (%1)").arg(UM) << QString("Radius2 (%1)").arg(UM); }
325  QStringList parmDescs() const { return QStringList() << "Size of first neighborhood" << "Size of second neighborhood"; }
326  QStringList parmDefaults() const { return QStringList() << "1.0" << "5.0"; }
327  QIcon icon() const { return QIcon(":/images/Blur.png"); }
328  };
329 
335  class mgxBase_EXPORT MeshLocalMinima : public MeshProcess {
336  public:
337  MeshLocalMinima(const MeshProcess& process) : Process(process), MeshProcess(process) {}
338 
339  bool operator()(const QStringList& parms)
340  {
341  if(!checkState().mesh(MESH_NON_EMPTY))
342  return false;
343  return (*this)(currentMesh(), parms[0].toFloat());
344  }
345 
346  bool operator()(Mesh* mesh, float radius);
347 
348  QString folder() const { return "Segmentation"; }
349  QString name() const { return "Auto-Seeding"; }
350  QString description() const { return "Put a seed at local minima of mesh signal."; }
351  QStringList parmNames() const { return QStringList() << QString("Radius (%1)").arg(UM); }
352  QStringList parmDescs() const { return QStringList()
353  << "Size of neighborhood used for search of local minima. Typically, "
354  "the radius of smallest cells in the sample.";
355  }
356  QStringList parmDefaults() const { return QStringList() << "3.0"; }
357  QIcon icon() const { return QIcon(":/images/LocalMinima.png"); }
358  };
359 
365  class mgxBase_EXPORT MeshNormalize : public MeshProcess {
366  public:
367  MeshNormalize(const MeshProcess& process) : Process(process), MeshProcess(process) {}
368 
369  bool operator()(const QStringList& parms)
370  {
371  if(!checkState().mesh(MESH_NON_EMPTY))
372  return false;
373  return (*this)(currentMesh(), parms[0].toFloat());
374  }
375 
376  bool operator()(Mesh* mesh, float radius);
377 
378  QString folder() const { return "Signal"; }
379  QString name() const { return "Normalize Signal"; }
380  QString description() const { return "Normalize mesh signal locally."; }
381  QStringList parmNames() const { return QStringList() << QString("Radius (%1)").arg(UM); }
382  QStringList parmDescs() const { return QStringList() << "Size of neighborhood used for normalization."; }
383  QStringList parmDefaults() const { return QStringList() << "5.0"; }
384  QIcon icon() const { return QIcon(":/images/Normalize.png"); }
385  };
386 
394  class MeshDilation : public MeshProcess {
395  public:
396  MeshDilation(const MeshProcess& process) : Process(process), MeshProcess(process) {}
397 
398  bool operator()(const QStringList& parms)
399  {
401  return false;
402  return (*this)(currentMesh(), parms[0].toFloat());
403  }
404 
405  bool operator()(Mesh* mesh, float radius);
406 
407  QString folder() const { return "Signal"; }
408  QString name() const { return "Dilate Signal"; }
409  QString description() const { return "Morphological dilation of signal on mesh."; }
410  QStringList parmNames() const { return QStringList() << QString("Radius (%1)").arg(UM); }
411  QStringList parmDescs() const { return QStringList() << "Size of neighborhood used for dilation."; }
412  QStringList parmDefaults() const { return QStringList() << "1.0"; }
413  QIcon icon() const { return QIcon(":/images/Dilate.png"); }
414  };
415 
423  class MeshErosion : public MeshProcess {
424  public:
425  MeshErosion(const MeshProcess& process) : Process(process), MeshProcess(process) {}
426 
427  bool operator()(const QStringList& parms)
428  {
430  return false;
431  return (*this)(currentMesh(), parms[0].toFloat());
432  }
433 
434  bool operator()(Mesh* mesh, float radius);
435 
436  QString folder() const { return "Signal"; }
437  QString name() const { return "Erode Signal"; }
438  QString description() const { return "Apply morphological erosion to mesh signal (opposite to Dilate Signal)."; }
439  QStringList parmNames() const { return QStringList() << QString("Radius (%1)").arg(UM); }
440  QStringList parmDescs() const { return QStringList() << "Size of neighborhood used for erosion."; }
441  QStringList parmDefaults() const { return QStringList() << "1.0"; }
442  QIcon icon() const { return QIcon(":/images/Erode.png"); }
443  };
444 
451  class MeshClosing : public MeshProcess {
452  public:
453  MeshClosing(const MeshProcess& process) : Process(process), MeshProcess(process) {}
454 
455  bool operator()(const QStringList& parms)
456  {
458  return false;
459  return (*this)(currentMesh(), parms[0].toFloat());
460  }
461 
462  bool operator()(Mesh* mesh, float radius);
463 
464  QString folder() const { return "Signal"; }
465  QString name() const { return "Close Signal"; }
466  QString description() const { return "Apply morphological dilation followed by erosion to mesh signal."; }
467  QStringList parmNames() const { return QStringList() << QString::fromWCharArray(L"Radius (\xb5m)"); }
468  QStringList parmDescs() const { return QStringList() << "Size of neighborhood used for dilation/erosion."; }
469  QStringList parmDefaults() const { return QStringList() << "1.0"; }
470  QIcon icon() const { return QIcon(":/images/Closing.png"); }
471  };
472 
479  class MeshOpening : public MeshProcess {
480  public:
481  MeshOpening(const MeshProcess& process) : Process(process), MeshProcess(process) {}
482 
483  bool operator()(const QStringList& parms)
484  {
486  return false;
487  return (*this)(currentMesh(), parms[0].toFloat());
488  }
489 
490  bool operator()(Mesh* mesh, float radius);
491 
492  QString folder() const { return "Signal"; }
493  QString name() const { return "Open Signal"; }
494  QString description() const { return "Apply morphological erosion followed by dilation to mesh signal."; }
495  QStringList parmNames() const { return QStringList() << QString::fromWCharArray(L"Radius (\xb5m)"); }
496  QStringList parmDescs() const { return QStringList() << "Size of neighborhood used for erosion/dilation."; }
497  QStringList parmDefaults() const { return QStringList() << "1.0"; }
498  QIcon icon() const { return QIcon(":/images/Opening.png"); }
499  };
500 
501  class mgxBase_EXPORT RescaleSignal : public MeshProcess {
502  public:
503  RescaleSignal(const MeshProcess& process) : Process(process) , MeshProcess(process) {}
504 
505  bool operator()(const QStringList& parms)
506  {
507  if(!checkState().mesh(MESH_NON_EMPTY))
508  return false;
509  bool ok;
510  float percentile = parms[1].toFloat(&ok);
511  if(!ok)
512  return setErrorMessage("Error, argument 'Percentile' must be a number");
513  float minimum = parms[2].toFloat(&ok);
514  if(!ok)
515  return setErrorMessage("Error, argument 'Minimum' must be a number");
516  float maximum = parms[3].toFloat(&ok);
517  if(!ok)
518  return setErrorMessage("Error, argument 'Maximum' must be a number");
519  return (*this)(currentMesh(), stringToBool(parms[0]), percentile, minimum, maximum);
520  }
521 
522  bool operator()(Mesh* mesh, bool use_zero, float percentile, float minimum, float maximum);
523 
524  QString folder() const { return "Signal"; }
525  QString name() const { return "Rescale Signal"; }
526  QString description() const { return
527  "Change the colorbar of the signal.\n"
528  "If percentile is set to 0, it uses the minimum and maximum arguments.\n"
529  "Only the visualization is affected, the signal projection remains unchanged";
530  }
531  QStringList parmNames() const { return QStringList()
532  << "Zero as reference" << "Percentile" << "Minimum" << "Maximum";
533  }
534  QStringList parmDescs() const { return QStringList()
535  << "If true, 0 will be used as a reference.\n"
536  "If the signal is all positive (resp. negative), 0 will be added as a minimum (resp. maximum).\n"
537  "If the signal is both positive and negative, 0 will be place at the center of the range"
538  << "Keep only this percentage of the signal to compute the range."
539  << "If the percentile specified is 0, uses this as the minimum value for the range"
540  << "If the percentile specified is 0, uses this as the maximum value for the range";
541  }
542  QStringList parmDefaults() const { return QStringList() << "No" << "99" << "0" << "1"; }
543 
545  {
546  ParmChoiceMap map;
547  map[0] = booleanChoice();
548  return map;
549  }
550 
551  QIcon icon() const { return QIcon(":/images/Normalize.png"); }
552  };
553 
559  class mgxBase_EXPORT SetSignalProcess : public MeshProcess {
560  public:
561  SetSignalProcess(const MeshProcess& process) : Process(process), MeshProcess(process) {}
562 
563  bool operator()(const QStringList& parms)
564  {
565  if(not checkState().mesh(MESH_VISIBLE))
566  return false;
567  bool ok;
568  float value = parms[0].toFloat(&ok);
569  if(not ok)
570  return setErrorMessage("Parameter 'Value' must be a number");
571  float percentile = parms[2].toFloat(&ok);
572  if(not ok)
573  return setErrorMessage("Parameter 'Percentile' must be a number");
574  return (*this)(currentMesh(), value, stringToBool(parms[1]), percentile, stringToBool(parms[3]));
575  }
576 
577  bool operator()(Mesh* m, float value, bool rescale, float percentile, bool use_zero);
578 
579  QString folder() const { return "Signal"; }
580  QString name() const { return "Set Signal"; }
581  QString description() const { return "Set the signal for the whole mesh, or for the currently selected part of it."; }
582 
583  QStringList parmNames() const { return QStringList() << "Value" << "Rescale" << "Percentile" << "Use zero"; }
584  QStringList parmDescs() const { return QStringList()
585  << "New value for the signal"
586  << "If true, the signal bounds will be rescaled"
587  << "If rescaling, which percentile to use?"
588  << "If rescaling, should we use zero as reference?";
589  }
590  QStringList parmDefaults() const { return QStringList() << "1" << "Yes" << "100" << "No"; }
592  {
593  ParmChoiceMap map;
594  map[1] = booleanChoice();
595  map[3] = booleanChoice();
596  return map;
597  }
598  QIcon icon() const { return QIcon(":/images/Sharpen.png"); }
599  };
600 
602 
603  class mgxBase_EXPORT ProjectCurvatureOp {
604  public:
605  ProjectCurvatureOp(const vvgraph& S, const VtxVec& vs, std::string type, float radius, FloatVec& values,
606  std::vector<util::Curvature>& curvs);
607  void operator()(int i);
608 
609  private:
610  const vvgraph& S;
611  const VtxVec& vs;
612  std::string type;
613  float radius;
614  FloatVec& values;
615  std::vector<util::Curvature>& curvs;
616  };
617 
618  class mgxBase_EXPORT MeshGaussianBlurOp {
619  public:
620  MeshGaussianBlurOp(const vvgraph& S, const VtxVec& vs, float radius);
621  void operator()(int i);
622 
623  private:
624  const vvgraph& S;
625  const VtxVec& vs;
626  float radius;
627  };
628 
629  class mgxBase_EXPORT MeshLocalMinimaOp {
630  public:
631  MeshLocalMinimaOp(const vvgraph& S, const VtxVec& vs, float radius, int startLabel);
632  void operator()(int i);
633 
634  private:
635  const vvgraph& S;
636  const VtxVec& vs;
637  float radius;
638  int label;
639  };
640 
641  class mgxBase_EXPORT MeshNormalizeOp {
642  public:
643  MeshNormalizeOp(const vvgraph& S, const VtxVec& vs, float radius);
644 
645  void operator()(int i);
646 
647  private:
648  const vvgraph& S;
649  const VtxVec& vs;
650  float radius;
651  };
652 
654  public:
655  MeshDilationOp(const vvgraph& S, const VtxVec& vs, float radius);
656  void operator()(int vi);
657 
658  private:
659  const vvgraph& S;
660  const VtxVec& vs;
661  float radius;
662  };
663 
665  public:
666  MeshErosionOp(const vvgraph& S, const VtxVec& vs, float radius);
667  void operator()(int vi);
668 
669  private:
670  const vvgraph& S;
671  const VtxVec& vs;
672  float radius;
673  };
674 
675 }}
676 
677 #endif
fromWCharArray(const wchar_t *string, int size=-1)
Calculate a difference of Gaussians on mesh.
Definition: MeshProcessSignal.hpp:308
QString description() const
Returns a description of the process for the GUI.
Definition: MeshProcessSignal.hpp:145
QStringList parmDescs() const
List of parameters descriptions.
Definition: MeshProcessSignal.hpp:325
QStringList parmDefaults() const
List of default parms.
Definition: MeshProcessSignal.hpp:412
ParmChoiceMap parmChoice() const
Purely for GUI purposes, provides for some of the parms parameter a choice.
Definition: MeshProcessSignal.hpp:544
QStringList parmNames() const
List of named parameters.
Definition: MeshProcessSignal.hpp:531
QString description() const
Returns a description of the process for the GUI.
Definition: MeshProcessSignal.hpp:409
bool operator()(const QStringList &parms)
Implementation of the process with generic arguments.
Definition: MeshProcessSignal.hpp:282
bool operator()(const QStringList &parms)
Implementation of the process with generic arguments.
Definition: MeshProcessSignal.hpp:90
QString name() const
Returns the name of the process.
Definition: MeshProcessSignal.hpp:525
ParmChoiceMap parmChoice() const
Purely for GUI purposes, provides for some of the parms parameter a choice.
Definition: MeshProcessSignal.hpp:116
Set the mesh signal to be the curvature of the mesh.
Definition: MeshProcessSignal.hpp:212
QString folder() const
Folder in which to place the process.
Definition: MeshProcessSignal.hpp:101
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: MeshProcessSignal.hpp:78
QString folder() const
Folder in which to place the process.
Definition: MeshProcessSignal.hpp:197
QString name() const
Returns the name of the process.
Definition: MeshProcessSignal.hpp:379
QString folder() const
Folder in which to place the process.
Definition: MeshProcessSignal.hpp:348
bool operator()(const QStringList &parms)
Implementation of the process with generic arguments.
Definition: MeshProcessSignal.hpp:427
Definition: MeshProcessSignal.hpp:629
bool operator()(const QStringList &parms)
Implementation of the process with generic arguments.
Definition: MeshProcessSignal.hpp:563
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: MeshProcessSignal.hpp:176
QString name() const
Returns the name of the process.
Definition: MeshProcessSignal.hpp:437
ParmChoiceMap parmChoice() const
Purely for GUI purposes, provides for some of the parms parameter a choice.
Definition: MeshProcessSignal.hpp:591
bool operator()(const QStringList &parms)
Implementation of the process with generic arguments.
Definition: MeshProcessSignal.hpp:505
MeshNormalize MeshProcessSignal.hpp <MeshProcessSignal.hpp>
Definition: MeshProcessSignal.hpp:365
QString folder() const
Folder in which to place the process.
Definition: MeshProcessSignal.hpp:240
arg(const QString &a, int fieldWidth=0, const QChar &fillChar=QLatin1Char( ' ')
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: MeshProcessSignal.hpp:551
QString name() const
Returns the name of the process.
Definition: MeshProcessSignal.hpp:408
QStringList parmDefaults() const
List of default parms.
Definition: MeshProcessSignal.hpp:441
QStringList parmDefaults() const
List of default parms.
Definition: MeshProcessSignal.hpp:590
QString folder() const
Folder in which to place the process.
Definition: MeshProcessSignal.hpp:170
QStringList parmDefaults() const
List of default parms.
Definition: MeshProcessSignal.hpp:299
QString description() const
Returns a description of the process for the GUI.
Definition: MeshProcessSignal.hpp:581
Smooth the mesh signal using local averaging.
Definition: MeshProcessSignal.hpp:130
QStringList parmNames() const
List of named parameters.
Definition: MeshProcessSignal.hpp:104
Process()
Default constructor.
bool operator()(const QStringList &parms)
Implementation of the process with generic arguments.
Definition: MeshProcessSignal.hpp:134
Definition: MeshProcessSignal.hpp:641
QString description() const
Returns a description of the process for the GUI.
Definition: MeshProcessSignal.hpp:438
QStringList parmNames() const
List of named parameters.
Definition: MeshProcessSignal.hpp:410
QStringList parmDefaults() const
List of default parms.
Definition: MeshProcessSignal.hpp:62
QStringList parmDescs() const
List of parameters descriptions.
Definition: MeshProcessSignal.hpp:534
QString description() const
Returns a description of the process for the GUI.
Definition: MeshProcessSignal.hpp:466
Definition: MeshProcessSignal.hpp:603
QStringList parmDescs() const
List of parameters descriptions.
Definition: MeshProcessSignal.hpp:147
QString description() const
Returns a description of the process for the GUI.
Definition: MeshProcessSignal.hpp:103
QString description() const
Returns a description of the process for the GUI.
Definition: MeshProcessSignal.hpp:242
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: MeshProcessSignal.hpp:598
QStringList parmNames() const
List of named parameters.
Definition: MeshProcessSignal.hpp:146
bool operator()(const QStringList &parms)
Implementation of the process with generic arguments.
Definition: MeshProcessSignal.hpp:216
QStringList parmDefaults() const
List of default parms.
Definition: MeshProcessSignal.hpp:115
QString folder() const
Folder in which to place the process.
Definition: MeshProcessSignal.hpp:524
QString name() const
Returns the name of the process.
Definition: MeshProcessSignal.hpp:144
QString description() const
Returns a description of the process for the GUI.
Definition: MeshProcessSignal.hpp:199
ParmChoiceMap parmChoice() const
Purely for GUI purposes, provides for some of the parms parameter a choice.
Definition: MeshProcessSignal.hpp:263
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: MeshProcessSignal.hpp:413
Morphological erosion on the mesh, using a spherical kernel.
Definition: MeshProcessSignal.hpp:423
QString description() const
Returns a description of the process for the GUI.
Definition: MeshProcessSignal.hpp:30
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: MeshProcessSignal.hpp:498
QStringList parmDescs() const
List of parameters descriptions.
Definition: MeshProcessSignal.hpp:250
QStringList parmDefaults() const
List of default parms.
Definition: MeshProcessSignal.hpp:326
QStringList parmNames() const
List of named parameters.
Definition: MeshProcessSignal.hpp:439
QString name() const
Returns the name of the process.
Definition: MeshProcessSignal.hpp:102
This process is used to change how the mesh is seen.
Definition: MeshProcessSignal.hpp:22
QString folder() const
Folder in which to place the process.
Definition: MeshProcessSignal.hpp:143
QString folder() const
Folder in which to place the process.
Definition: MeshProcessSignal.hpp:378
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: MeshProcessSignal.hpp:384
QStringList parmDefaults() const
List of default parms.
Definition: MeshProcessSignal.hpp:497
CheckState checkState()
Call this function and convert the result to a boolean.
The Store class holds the actual 3D data and properties specific to it.
Definition: Store.hpp:25
QString name() const
Returns the name of the process.
Definition: MeshProcessSignal.hpp:465
QStringList parmNames() const
List of named parameters.
Definition: MeshProcessSignal.hpp:32
QStringList parmDescs() const
List of parameters descriptions.
Definition: MeshProcessSignal.hpp:201
This class holds the actual mesh as a VV Graph and all sort of properties for it, including visualiza...
Definition: Mesh.hpp:167
QStringList parmDescs() const
List of parameters descriptions.
Definition: MeshProcessSignal.hpp:352
bool operator()(const QStringList &parms)
Implementation of the process with generic arguments.
Definition: MeshProcessSignal.hpp:339
bool operator()(const QStringList &parms)
Implementation of the process with generic arguments.
Definition: MeshProcessSignal.hpp:369
QString folder() const
Folder in which to place the process.
Definition: MeshProcessSignal.hpp:321
QString description() const
Returns a description of the process for the GUI.
Definition: MeshProcessSignal.hpp:172
QString folder() const
Folder in which to place the process.
Definition: MeshProcessSignal.hpp:464
ParmChoiceMap parmChoice() const
Purely for GUI purposes, provides for some of the parms parameter a choice.
Definition: MeshProcessSignal.hpp:66
Definition: MeshProcessSignal.hpp:653
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: MeshProcessSignal.hpp:203
QStringList parmNames() const
List of named parameters.
Definition: MeshProcessSignal.hpp:351
QString name() const
Returns the name of the process.
Definition: MeshProcessSignal.hpp:349
Morphological dilation on the mesh, using a spherical kernel.
Definition: MeshProcessSignal.hpp:394
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: MeshProcessSignal.hpp:122
Definition: MeshProcessSignal.hpp:618
QString name() const
Returns the name of the process.
Definition: MeshProcessSignal.hpp:198
QStringList parmNames() const
List of named parameters.
Definition: MeshProcessSignal.hpp:324
QString name() const
Returns the name of the process.
Definition: MeshProcessSignal.hpp:493
Set the signal to a given value for all currently active vertices.
Definition: MeshProcessSignal.hpp:559
QStringList parmDefaults() const
List of default parms.
Definition: MeshProcessSignal.hpp:202
QString name() const
Returns the name of the process.
Definition: MeshProcessSignal.hpp:322
QStringList parmDescs() const
List of parameters descriptions.
Definition: MeshProcessSignal.hpp:411
QStringList parmNames() const
List of named parameters.
Definition: MeshProcessSignal.hpp:467
bool operator()(const QStringList &parms)
Implementation of the process with generic arguments.
Definition: MeshProcessSignal.hpp:188
bool operator()(const QStringList &parms)
Implementation of the process with generic arguments.
Definition: MeshProcessSignal.hpp:398
QString name() const
Returns the name of the process.
Definition: MeshProcessSignal.hpp:171
QStringList parmDescs() const
List of parameters descriptions.
Definition: MeshProcessSignal.hpp:108
File containing the definition of a Process.
QStringList parmNames() const
List of named parameters.
Definition: MeshProcessSignal.hpp:173
Definition: MeshProcessSignal.hpp:664
Mesh * mesh(int i)
Returns the ith mesh.
The Stack class represent the dimensions of the 3D data, and the frames transformations.
Definition: Stack.hpp:25
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: MeshProcessSignal.hpp:470
QStringList parmDescs() const
List of parameters descriptions.
Definition: MeshProcessSignal.hpp:382
QString folder() const
Folder in which to place the process.
Definition: MeshProcessSignal.hpp:28
bool operator()(const QStringList &parms)
Implementation of the process with generic arguments.
Definition: MeshProcessSignal.hpp:483
This is the main process class, the one all process inherit from.
Definition: Process.hpp:248
QStringList parmDefaults() const
List of default parms.
Definition: MeshProcessSignal.hpp:542
QStringList parmNames() const
List of named parameters.
Definition: MeshProcessSignal.hpp:294
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: MeshProcessSignal.hpp:327
QString name() const
Returns the name of the process.
Definition: MeshProcessSignal.hpp:29
QStringList parmNames() const
List of named parameters.
Definition: MeshProcessSignal.hpp:200
QString description() const
Returns a description of the process for the GUI.
Definition: MeshProcessSignal.hpp:494
Morphological opening on the mesh.
Definition: MeshProcessSignal.hpp:479
mgx_EXPORT bool stringToBool(const QString &string)
Helper function converting a string into a boolean.
QStringList parmNames() const
List of named parameters.
Definition: MeshProcessSignal.hpp:583
QStringList parmDefaults() const
List of default parms.
Definition: MeshProcessSignal.hpp:356
QStringList parmDescs() const
List of parameters descriptions.
Definition: MeshProcessSignal.hpp:584
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: MeshProcessSignal.hpp:357
QStringList parmDescs() const
List of parameters descriptions.
Definition: MeshProcessSignal.hpp:174
QStringList parmNames() const
List of named parameters.
Definition: MeshProcessSignal.hpp:246
QString description() const
Returns a description of the process for the GUI.
Definition: MeshProcessSignal.hpp:380
QString description() const
Returns a description of the process for the GUI.
Definition: MeshProcessSignal.hpp:323
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: MeshProcessSignal.hpp:149
QStringList parmDescs() const
List of parameters descriptions.
Definition: MeshProcessSignal.hpp:468
bool operator()(const QStringList &parms)
Implementation of the process with generic arguments.
Definition: MeshProcessSignal.hpp:455
QString description() const
Returns a description of the process for the GUI.
Definition: MeshProcessSignal.hpp:526
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: MeshProcessSignal.hpp:300
std::vector< float > FloatVec
Vector of floats.
Definition: Mesh.hpp:98
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: MeshProcessSignal.hpp:442
QString name() const
Returns the name of the process.
Definition: MeshProcessSignal.hpp:241
Morphological closing on the mesh.
Definition: MeshProcessSignal.hpp:451
QStringList parmDefaults() const
List of default parms.
Definition: MeshProcessSignal.hpp:175
QString description() const
Returns a description of the process for the GUI.
Definition: MeshProcessSignal.hpp:293
QStringList parmDefaults() const
List of default parms.
Definition: MeshProcessSignal.hpp:383
QStringList parmNames() const
List of named parameters.
Definition: MeshProcessSignal.hpp:381
QString name() const
Returns the name of the process.
Definition: MeshProcessSignal.hpp:580
Project stack signal onto the current mesh.
Definition: MeshProcessSignal.hpp:86
Definition: MeshProcessSignal.hpp:157
bool operator()(const QStringList &parms)
Implementation of the process with generic arguments.
Definition: MeshProcessSignal.hpp:312
Clear the mesh signal to a defined value.
Definition: MeshProcessSignal.hpp:184
Non-empty mesh.
Definition: Process.hpp:664
std::vector< vertex > VtxVec
Vector of vertices.
Definition: Mesh.hpp:79
QString folder() const
Folder in which to place the process.
Definition: MeshProcessSignal.hpp:407
QString folder() const
Folder in which to place the process.
Definition: MeshProcessSignal.hpp:291
QStringList parmDefaults() const
List of default parms.
Definition: MeshProcessSignal.hpp:469
Mesh * currentMesh()
Returns the current mesh (i.e.
bool operator()(const QStringList &parms)
Implementation of the process with generic arguments.
Definition: MeshProcessSignal.hpp:161
QStringList parmDescs() const
List of parameters descriptions.
Definition: MeshProcessSignal.hpp:295
QStringList parmDefaults() const
List of default parms.
Definition: MeshProcessSignal.hpp:148
Smooth the mesh signal using a gaussian kernel.
Definition: MeshProcessSignal.hpp:278
QString folder() const
Folder in which to place the process.
Definition: MeshProcessSignal.hpp:579
QString folder() const
Folder in which to place the process.
Definition: MeshProcessSignal.hpp:492
QStringList parmDefaults() const
List of default parms.
Definition: MeshProcessSignal.hpp:261
Definition: MeshProcessSignal.hpp:501
QStringList parmDescs() const
List of parameters descriptions.
Definition: MeshProcessSignal.hpp:440
QStringList parmNames() const
List of named parameters.
Definition: MeshProcessSignal.hpp:495
QStringList parmDescs() const
List of parameters descriptions.
Definition: MeshProcessSignal.hpp:496
QString folder() const
Folder in which to place the process.
Definition: MeshProcessSignal.hpp:436
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: MeshProcessSignal.hpp:270
QString description() const
Returns a description of the process for the GUI.
Definition: MeshProcessSignal.hpp:350
Mesh processes have mutable access to meshes and non-mutable access to stacks.
Definition: Process.hpp:855
QStringList parmDescs() const
List of parameters descriptions.
Definition: MeshProcessSignal.hpp:37
Find the local minima in the current mesh.
Definition: MeshProcessSignal.hpp:335
QString name() const
Returns the name of the process.
Definition: MeshProcessSignal.hpp:292