MorphoGraphX  2.0-1-227
CellAtlas.hpp
Go to the documentation of this file.
1 //
2 // This file is part of 3DCellAtlas.
3 // Copyright (C) 2015 George W. Bassel and collaborators.
4 //
5 // If you use 3DCellAtlas in your work, please cite:
6 // http://dx.doi.org/10.1105/tpc.15.00175
7 //
8 // 3DCellAtlas is an AddOn for MorphoGraphX - http://www.MorphoGraphX.org
9 // Copyright (C) 2012-2015 Richard S. Smith and collaborators.
10 //
11 // 3DCellAtlas and MorphoGraphX are free software, and are licensed under under the terms of the
12 // GNU General (GPL) Public License version 2.0, http://www.gnu.org/licenses.
13 //
14 #ifndef CELL_ATLAS_HPP
15 #define CELL_ATLAS_HPP
16 
17 #include <CellAtlasConfig.hpp>
18 
19 #include <Process.hpp>
20 #include <BezierProcess.hpp>
21 #include "RootCellAnalyzing.hpp"
22 #include "RootCellProcessing.hpp"
23 #include "DataAnalyzer.hpp"
24 #include "ui_CellAtlasGUI.h"
25 
27 
28 namespace mgx {
29 
30 // static QDialog* dlg;
31 
32  void discretizeBezierLineRef(CuttingSurface* cutSurf, double vPos, double vRefPos, Matrix4d rotMat, int bezMapSize,
33  std::map<int, Point3d>& bMap, std::map<int, Point3d>& diffbMap, std::map<int, Point3d>& refbMap);
34 
35  // TODO openmpMode not implemented yet
37  {
38  public:
39  AnalyzeCells(const Process& process) : Process(process)
40  {
41 
42  setName("Mesh/Cell Atlas 3D/Root/A Analyze Cells 3D");
43  setDesc("Analyze the 3D properties of the cells according to the Bezier-coordinate system. \n"
44  "This process is needed for most of the other processes as it provides the raw data. \n"
45  "Requirements: \n"
46  "- Bezier line through the root body \n"
47  "- A selected first cell for defining the orientation \n"
48  "Mode: Specifies which coordiante system will be used: \n"
49  "Root : Bezier Line \n"
50  "Layer: Bezier Grid \n"
51  "Cartesian: Cartesian XYZ");
52  setIcon(QIcon(":/images/CellGraph3D.png"));
53 
54  addParm("Volume Threshold","","0");
55  addParm("Mode","","Root", QStringList() << "Root" << "Layer" << "Cartesian");
56  }
57 
58  bool run()
59  {
60  const Stack *s1 = stack(0);
61  const Stack *s2 = stack(1);
62  Mesh *m1 = mesh(0);
63  Mesh *m2 = mesh(1);
64  return run(s1, s2, m1, m2, parm("Volume Threshold").toDouble(), parm("Mode"), false /*stringToBool(parms[2])*/);
65  }
66 
67  bool run(const Stack *s1, const Stack *s2, Mesh *m1, Mesh *m2, double minVolume, QString mode, bool openmpMode);
68  };
69 
76  {
77  public:
78  SelectBadCells(const Process& process) : Process(process)
79  {
80  setName("Mesh/Cell Atlas 3D/Root/Tools/Select Bad Cells");
81  setDesc("Select cells that were labelled as bad by the Analyze Cells 3D process. \n"
82  "Bad cells are: \n"
83  "- Cells that have a small volume (threshold in Analyze Cells 3D) \n"
84  "- Cells that have an invalid centroid and/or cell size");
85  setIcon(QIcon(":/images/CellAtlas.png"));
86  }
87 
88  bool run()
89  {
90  Mesh *m1 = mesh(0);
91  return run(m1);
92  }
93 
94  bool run(Mesh *m1);
95 
96  };
97 
104  {
105  public:
106  CellAtlasFindCells(const Process& process) : Process(process)
107  {
108  setName("Mesh/Cell Atlas 3D/Tools/Find Cells");
109  setDesc("TBD");
110  setIcon(QIcon(":/images/CellAtlas.png"));
111 
112  addParm("Volume Lower","","0");
113  addParm("Any Size Lower","","0");
114  addParm("Volume Cell Wall Ratio Lower","","0");
115  addParm("Outside Cell Wall Percent Higher","","100");
116  addParm("Connector","","AND", QStringList() << "AND" << "OR");
117  }
118 
119  bool run()
120  {
121  Mesh *m1 = mesh(0);
122  return run(m1, parm("Volume Lower").toDouble(), parm("Any Size Lower").toDouble(), parm("Volume Cell Wall Ratio Lower").toDouble(), parm("Outside Cell Wall Percent Higher").toDouble(), parm("Connector"));
123  }
124 
125  bool run(Mesh *m1, double vol, double sizes, double volratio, double outsideArea, QString logicalCon);
126 
127  };
128 
129 
131  {
132  public:
133  SaveCellData(const Process& process) : Process(process)
134  {
135  setName("Mesh/Cell Atlas 3D/Root/Tools/Save Cell Data");
136  setDesc("Save current data to csv-files");
137  setIcon(QIcon(":/images/CellAtlasSave.png"));
138 
139  addParm("Filename","","");
140  addParm("Filetype","","Root", QStringList() << "Root" << "Meristem");
141  addParm("Extended File","","No",booleanChoice());
142  }
143 
144  bool initialize(QWidget* parent);
145 
146  bool run(){
147  return run(parm("Filename"), parm("Filetype"), stringToBool(parm("Extended File")));
148  }
149  bool run(QString filename, QString type, bool extended);
150 
151  };
152 
153 
155  {
156  public:
157  SaveNeighborhoodData(const Process& process) : Process(process)
158  {
159  setName("Mesh/Export/Save Cell Neighborhood 3D");
160  setDesc("Save a file with all cell walls, their adjacent cell labels and cell wall sizes.");
161  setIcon(QIcon(":/images/CellAtlasSave.png"));
162 
163  addParm("Filename","Filename","");
164  addParm("Parents","Parents","No",booleanChoice());
165  }
166 
167  bool initialize(QWidget* parent);
168 
169  bool run(){
170 
171  Mesh* m = currentMesh();
172 
173  double vertexTolerance = 0.001;
174 
175  NhbdGraphInfo info1;
176  neighborhoodGraph(m->graph(), vertexTolerance, info1);
177 
178  return run(m, parm("Filename"), info1, stringToBool(parm("Parents")));
179  }
180 
181  bool run(Mesh* m, QString filename, NhbdGraphInfo& info1, bool parentLabels);
182 
183  };
184 
185 
187  {
188  public:
189  SaveNeighborhoodData2D(const Process& process) : Process(process)
190  {
191  setName("Mesh/Export/Save Cell Neighborhood 2D");
192  setDesc("Save a file with all cell walls, their adjacent cell labels and cell wall sizes.");
193  setIcon(QIcon(":/images/CellAtlasSave.png"));
194 
195  addParm("Filename","Filename","");
196  addParm("Parents","Parents","No",booleanChoice());
197  addParm("Save","Save","Active Mesh",QStringList() << "Active Mesh" << "Other Mesh" << "Change Map");
198 
199  }
200 
201  bool initialize(QWidget* parent);
202 
203  bool run(){
204 
205  Mesh* m = currentMesh();
206 
207  Mesh* m2 = otherMesh();
208 
209  return run(m, m2, parm("Filename"), stringToBool(parm("Parents")));
210  }
211 
212  bool run(Mesh* m, Mesh* m2, QString filename, bool parents);
213 
214  };
215 
217  {
218  public:
219  DisplayCellData(const Process& process) : Process(process)
220  {
221  setName("Mesh/Cell Atlas 3D/Root/Tools/Heatmap Cell Data");
222  setDesc("Display Cell Data \n"
223  "Displays cell properties as a heatmap. \n"
224  "Requires analyzed or loaded data in the memory.");
225  setIcon(QIcon(":/images/CellAtlas.png"));
226 
227  addParm("Data","","Longitudinal (Arclengths)", QStringList() << "Longitudinal (Arclengths)" << "Longitudinal (Absolute)" << "Circumferential Angle" << "Radial" << "Radial (Absolute)" << "Longitudinal Cell Length" << "Circumferential Cell Length" << "Radial Cell Length" << "Nr of Neighbors" << "Volume" << "Cell Wall Area" << "Outside Wall Area" << "Outside Wall Area percent" << "Associated Cortical Cell" << "Long Min" << "Long Max"); // 0
228  addParm("Stack","","1");
229 
230 
231  }
232 
233  bool run(){
234 
235  Mesh *m1 = mesh(0);
236  if(parm("Data").toInt() == 2)
237  m1 = mesh(1);
238 
239  return run(m1, parm("Data"));
240  }
241 
242  bool run(Mesh* m1, QString choice);
243 
244  };
245 
247  {
248  public:
249  LoadCellData(const Process& process) : Process(process)
250  {
251  setName("Mesh/Cell Atlas 3D/Root/Tools/Load Cell Data");
252  setDesc("Load Cell Data \n"
253  "Loads data from an analyzed root from csv files");
254  setIcon(QIcon(":/images/CellAtlasLoad.png"));
255 
256  addParm("Filename","","");
257  addParm("File Type","","All", QStringList() << "All" << "Data" << "Config" << "Neighborhood");
258  }
259 
260  bool initialize(QWidget *parent);
261 
262  bool run(){
263  return run(parm("Filename"), parm("File Type"));
264  }
265 
266  bool run(QString filename, QString type);
267 
268  };
269 
271  {
272  public:
273  TopologicalCheck(const Process& process) : Process(process)
274  {
275  setName("Mesh/Cell Atlas 3D/Root/E Topological Check");
276  setDesc("Topological Check \n"
277 
278  "Selects potentially mislabelled cells \n"
279 
280  "This process checks the neighborhood relation of the parent labels of the cells. \n"
281  "Every parent label cell layer only allows connections to two other parent labels (the layer above and below). \n"
282 
283  "Exceptions are the columella parent label (=10) and the airbubble parent label which can be specified as a parameter. \n"
284  "Those two cell types are ignored in the neighborhood graph. \n"
285 
286  "Further exceptions are the rootcap and the vasculature tissue. \n"
287  "hose two cell types allow connections only to one further cell type and also have to be specified as parameters. \n"
288 
289  "he process works either on the whole root or on a selection. \n"
290  "Potentially mislabelled cells will be selected according to the Error Count parameter");
291  setIcon(QIcon(":/images/SubdivideTriAdapt.png"));
292 
293  addParm("Work on Selection","","No",booleanChoice());
294  addParm("Threshold Volume","","10");
295  addParm("Threshold Wall Area","","1");
296  addParm("Root Cap Label","","7");
297  addParm("Air Bubble Label","","6");
298  addParm("Vasculature Label","","5");
299  addParm("Error Limit","","2");
300  }
301 
302  bool run(){
303  return run(parm("Work on Selection"), parm("Threshold Volume").toDouble(), parm("Threshold Wall Area").toDouble(), parm("Root Cap Label").toInt(), parm("Air Bubble Label").toInt(), parm("Vasculature Label").toInt(), parm("Error Limit").toInt());
304  }
305  bool run(QString selection, double threshVol, double threshWallArea, int rootCapLabel, int airBubbleLabel, int vascLabel, int errors);
306 
307  };
308 
310  {
311  Q_OBJECT
312  public:
313 
317  Ui_CellAtlasDialog ui;
318 
319  CellAtlas(const Process& process) : Process(process)
320  {
321  setName("Mesh/Cell Atlas 3D/Root/B Assign Cell Types");
322  setDesc("Assign Cell Types \n"
323 
324  "View the cell property heat map and assign parent labels to the different cell types. \n"
325 
326  "Requires a selected first cell and a last root cap cell (if required). Also requires root cell data in the memory (either loaded or from the plugin Analyze Cells 3D \n"
327 
328  "GUI options: \n"
329  "- Mouseclick: creates a new cluster if no existing one is nearby \n"
330  "- Drag and Drop on cluster: moves the cluster \n"
331  "- Double Click on cluster: deletes the cluster");
332  setIcon(QIcon(":/images/Cluster.png"));
333 
334  addParm("Has multiple segments","","Yes",booleanChoice());
335  }
336 
337  virtual ~CellAtlas() { }
338 
339  bool initialize(QWidget *parent);
340 
341  bool run(){
342  return run(parm("Has multiple segments"));
343  }
344  bool run(QString rootCap);
345 
346  protected slots:
347 
348  void setImage();
349  void setDeletePosition(const QPoint& p);
350  void setPosition(const QPoint& p);
351  void setReleasePosition(const QPoint& p);
352  void setAutoCluster();
353  void changeHeatmapX(QString stringX);
354  void changeHeatmapY(QString string);
355  void setClusterLabel(QString label);
356  void setMousePosition(const QPoint& p);
357  void changeSigma(double sigma);
358  void changeRootPart();
359  void setPreCluster();
360  void resetCluster();
361 
362  protected:
363  QDialog *dlg;
365 
366  };
367 
369  {
370  public:
371  CollapseBezierCellAtlas(const Process& process) : CollapseBezier(process)
372  {
373  setName("Mesh/Cell Atlas 3D/Tools/Collapse Bezier Points");
374  setDesc("Collapse the 2D Bezier gridpoints into a line (needed for Analyze Cells 3D)");
375  }
376 
377  };
378 
380  {
381  public:
382  AssignColumella(const Process& process) : Process(process)
383  {
384  setName("Mesh/Cell Atlas 3D/Root/C Assign Columella");
385  setDesc("Assign Columella \n"
386 
387  "Assign the Columella Cells according to the given labels");
388  setIcon(QIcon(":/images/CellAtlasCol.png"));
389 
390  addParm("Root Cap Label","Root Cap Label","7");
391  addParm("Columella Label","Columella Label","10");
392  addParm("Ratio Threshold","Ratio Threshold","0.4");
393  addParm("Radial Threshold","Radial Threshold","0.48");
394  }
395 
396  bool run(){
397  return run(parm("Root Cap Label").toInt(), parm("Columella Label").toInt(), parm("Ratio Threshold").toDouble(), parm("Radial Threshold").toDouble());
398  }
399 
400  bool run(int labelRootCap, int labelCol, double rat_val, double sca_val);
401 
402  };
403 
405  {
406  public:
407  AssignCorticalCells(const Process& process) : Process(process)
408  {
409  setName("Mesh/Cell Atlas 3D/Root/D Assign Cortical Cells");
410  setDesc("Assign Cortical Cells \n"
411 
412  "Assign the associated cortical cells to all cells \n"
413 
414  "Requires Analyze Cells 3D, loading files is not enough!");
415  setIcon(QIcon(":/images/CellAtlasCort.png"));
416 
417  addParm("Cortical Cell Label","","2");
418  }
419 
420  bool run(){
421  return run(parm("Cortical Cell Label").toInt());
422  }
423 
424  bool run(int labelCort);
425 
426  };
427 
429  {
430  public:
431  DataAnalysis(const Process& process) : Process(process)
432  {
433  setName("Mesh/Cell Atlas 3D/Root/Statistics/Reporter abundance analysis 3D");
434  setDesc("3D reporter abundance analysis \n"
435 
436  "Data Analysis tool. \n"
437 
438  "Requires all input data in one folder. Note that input files come in pairs: \n"
439  "One file for the cell data and another for the reporter data. Files have to named in the following way for the plugin to find the file pairs: \n"
440  "cell data: filename.csv \n"
441  "reporter data: filename''reporter file string''.csv, where ''reporter file string'' can be specified. \n"
442  "Output files will be saved in the input folder");
443  setIcon(QIcon(":/images/CellAtlasCort.png"));
444 
445  addParm("Input folder","","");
446  addParm("Reporter file string","","_reporter");
447  addParm("Merge With File","","Yes",booleanChoice());
448  addParm("Output File","","");
449  addParm("Sliding Avg","","No",booleanChoice());
450  addParm("Sliding Avg Window","","3");
451  addParm("Upper Filter Type","","No Filter", QStringList() << "No Filter" << "Percentage" << "Value");
452  addParm("Upper Filter Limit","","100");
453  addParm("Lower Filter Type","","No Filter", QStringList() << "No Filter" << "Percentage" << "Value");
454  addParm("Lower Filter Limit","","0");
455  }
456 
457  bool initialize(QWidget* parent);
458 
459  bool run(){
460  return run(parm("Input folder"), parm("Reporter file string"), parm("Merge With File"), parm("Output File"), parm("Sliding Avg"), parm("Sliding Avg Window").toDouble(), stringToBool(parm("Upper Filter Type")));
461  }
462 
463  bool run(QString folderControl, QString folderTreatment, QString folderOutput, QString outputFileType, QString avg, double window, bool perCell);
464 
465  };
466 
468  {
469  public:
470  DataAnalysisGUS(const Process& process) : Process(process)
471  {
472  setName("Mesh/Cell Atlas 3D/Root/Statistics/Reporter abundance analysis 3D");
473  setDesc("3D reporter abundance analysis \n"
474 
475  "Data Analysis tool. \n"
476 
477  "Requires all input data in one folder. Note that input files come in pairs: \n"
478  "One file for the cell data and another for the reporter data. Files have to named in the following way for the plugin to find the file pairs: \n"
479  "cell data: filename.csv \n"
480  "reporter data: filename''reporter file string''.csv, where ''reporter file string'' can be specified. \n"
481  "Output files will be saved in the input folder");
482  setIcon(QIcon(":/images/CellAtlas.png"));
483 
484  addParm("Input folder","","");
485  addParm("Reporter file string","","_reporter");
486  addParm("Merge With File","","Yes",booleanChoice());
487  addParm("Output File","","");
488  addParm("Sliding Avg","","No",booleanChoice());
489  addParm("Sliding Avg Window","","3");
490  addParm("Upper Filter Type","","No Filter", QStringList() << "No Filter" << "Percentage" << "Value");
491  addParm("Upper Filter Limit","","100");
492  addParm("Lower Filter Type","","No Filter", QStringList() << "No Filter" << "Percentage" << "Value");
493  addParm("Lower Filter Limit","","0");
494  }
495 
496  bool initialize(QWidget* parent);
497 
498  bool run(){
499  Mesh *m1 = mesh(0);
500  return run(m1, parm("Input folder"), parm("Reporter file string"), parm("Merge With File"), parm("Output File"), parm("Sliding Avg"), parm("Sliding Avg Window").toDouble(), parm("Upper Filter Type"), parm("Upper Filter Limit").toDouble(), parm("Lower Filter Type"), parm("Lower Filter Limit").toDouble());
501  }
502 
503  bool run(Mesh *m1, QString folderInput, QString gusFileExt, QString mergeWithFile, QString fileToMerge, QString avg, double window, QString upperFilter, double upperFilterValue, QString lowerFilter, double lowerFilterValue);
504 
505  };
506 
508  {
509  public:
510  ExamineBadVasculature(const Process& process) : Process(process)
511  {
512  setName("Mesh/Cell Atlas 3D/Root/F Examine Vasculature");
513  setDesc("Examine all cells that are selected as wrong (use Topological check) and marked as vasculature \n"
514  "in order to split them into air bubble and endoderm \n"
515 
516  "Requires selected cells from Topological Check in order to work. Hereby note the Topological Check parameters: \n"
517  "If a cell/air bubble is not selected it can't be fixed with this plugin! (It might be necessary to lower the thresholds there) \n"
518 
519  "The matlab function didn't work very well (creating the function with Gaussians, looking for min to find a separation point \n"
520  "between air bubbles and endoderm), so another function was implemented which bases the separation point on the cell lengths \n"
521  "of correct endoderm cells (the Average Separation parameter 1 choses this, 0 will use the matlab function)");
522  setIcon(QIcon(":/images/CellAtlasVasc.png"));
523 
524  addParm("Vasculature Label","The parent label of the vasculature","5");
525  addParm("Air Bubble Label","The parent label of air bubbles","6");
526  addParm("Endo Label","The parent label of the endoderm","4");
527  addParm("Average Separation","Average Separation","1");
528  addParm("Sigma","Sigma","4.5");
529  }
530 
531  bool run(){
532  Mesh *m1 = mesh(0);
533  return run(m1, parm("Vasculature Label").toInt(), parm("Air Bubble Label").toInt(), parm("Endo Label").toInt(), parm("Average Separation").toInt(), parm("Sigma").toDouble());
534  }
535 
536  bool run(Mesh *m1, int labelVasc, int labelAirBubble, int labelEndo, int methodAvg, double sigma);
537 
538  };
539 
541  {
542  public:
543  DisplayShortestPath(const Process& process) : Process(process)
544  {
545  setName("Mesh/Cell Atlas 3D/Tools/Display Shortest Path");
546  setDesc("Calculates the shortest path between two selected cells.");
547  setIcon(QIcon(":/images/CellAtlas.png"));
548 
549  addParm("Min Wall Area","","0.001");
550  addParm("Distance Measure","","Euclidian", QStringList() << "Euclidian" << "Cells");
551  }
552  bool run(){
553  Mesh *m1 = currentMesh();
554  return run(m1, parm("Min Wall Area").toDouble(), parm("Distance Measure"));
555  }
556 
557  bool run(Mesh *m1, double wallThreshold, QString weight);
558 
559  };
560 
562  {
563  public:
564  WriteGrowthMapData(const Process& process) : Process(process)
565  {
566  setName("Mesh/Cell Atlas 3D/Tools/Write Growth Map Data File");
567  setDesc("Write Growth Map Data File");
568  setIcon(QIcon(":/images/CellAtlas.png"));
569 
570  addParm("Filename","Filename","");
571 
572 
573  }
574  bool processParms();
575 
576  bool initialize(QWidget* parent);
577 
578  bool run()
579  {
580  Mesh *m = currentMesh();
581  return run(m, parm("Filename"));
582  }
583 
584  bool run(Mesh* m, QString filename);
585 
586  };
587 
589  {
590  public:
591  LabelledStackComparison(const Process& process) : Process(process)
592  {
593  setName("Stack/Segmentation/Compare Labelled Stacks");
594  setDesc("Find the cell centers of Stack 1 and the label at their position in Stack 2");
595  setIcon(QIcon(":/images/CellAtlas.png"));
596 
597  addParm("Filename","Filename","");
598  addParm("Overwrite Labels Stack 2","Overwrite Labels Stack 2","No",booleanChoice());
599  }
600  bool processParms();
601 
602  bool initialize(QWidget* parent);
603 
604  bool run()
605  {
606  Stack* s1 = stack(0);
607  Stack* s2 = stack(1);
608  return run(s1, s2, parm("Filename"), stringToBool(parm("Overwrite Labels Stack 2")));
609  }
610 
611  bool run(Stack* s1, Stack* s2, QString filename, bool overwrite);
612 
613  };
614 
615 
617  {
618  public:
619  CellAnalysis3D(const Process& process) : Process(process)
620  {
621  setName("Mesh/Heat Map/Analysis/Cell Analysis 3D");
622  setDesc("Calculates basic geometric properties of 3D cells. Visualize them using the Measure processes.");
623  setIcon(QIcon(":/images/MakeHeatMap.png"));
624 
625  addParm("Use Surface Mesh","Use Surface Mesh","No", booleanChoice()); // 0
626  }
627 
628  bool run()
629  {
630  Mesh* m = currentMesh();
631  Mesh* m2 = otherMesh();
632  return run(m, m2, stringToBool(parm("Use Surface Mesh")));
633  }
634 
635  bool run(Mesh* m, Mesh* m2, bool useSurface);
636 
639  std::map<int, triVector> cellTriangles;
640  std::vector<int> uniqueLabels;
641 
642  };
643 
645  {
646  public:
647  GrowthAnalysis3D(const Process& process) : Process(process)
648  {
649  setName("Mesh/Heat Map/Analysis/Growth Analysis 3D");
650  setDesc("TBD");
651  setIcon(QIcon(":/images/MakeHeatMap.png"));
652 
653  addParm("Name Prefix (optional)","Name Prefix (optional)","");
654  addParm("Name Time Point 1","Name Time Point 1","T1");
655  addParm("Name Time Point 2","Name Time Point 2","T2");
656  }
657 
658  bool run()
659  {
660  Mesh* m = currentMesh();
661  Mesh* m2 = otherMesh();
662  return run(m, m2, parm("Name Prefix (optional)"), parm("Name Time Point 1"), parm("Name Time Point 2"));
663  }
664 
665  bool run(Mesh* m, Mesh* m2, QString name, QString t1, QString t2);
666 
667  };
668 
702  public:
703  BezierFromCellFile(const Process& proc) : Process(proc)
704  {
705  setName("Misc/Bezier/Bezier From Cell File");
706  setDesc("Create a Bezier line from a cell file of selected 3D cells (cells are not allowed to have more than 2 neighbors)");
707  setIcon(QIcon(":/images/open.png"));
708 
709  addParm("Max Points","Max Points","20");
710  }
711 
712  bool run()
713  {
714  Mesh* m = currentMesh();
715  return run(m, parm("Max Points").toInt());
716  }
717 
718  bool run(Mesh* m, int maxP);
719  };
720 
721 
728  public:
730  {
731  setName("Mesh/Cell Atlas 3D/Surface/Analyze Cells Bezier Line");
732  setDesc("Analyze a surface mesh with a Bezier line coordinate system");
733  setIcon(QIcon(":/images/open.png"));
734 
735  addParm("Flip Bezier","Flip Bezier","No",booleanChoice());
736  }
737 
738  bool run()
739  {
740  const Stack *s1 = currentStack();
741  Mesh* m1 = currentMesh();
742  return run(s1, m1, stringToBool(parm("Flip Bezier")));
743  }
744 
745  bool run(const Stack* s1, Mesh* m1, bool flipBezier);
746 
747  };
748 
749 // class CellAtlas_EXPORT DetectSurfaceWalls : public Process
750 // {
751 // public:
752 // DetectSurfaceWalls(const Process& process) : Process(process) {}
753 
754 // bool run(const QStringList &parms)
755 // {
756 // Mesh* m = currentMesh();
757 // Mesh* m2 = mesh(1);
758 // if(m == m2) m2 = mesh(0);
759 // return run(m, m2, parms[0].toDouble(), parms[1]);
760 // }
761 // bool run(Mesh* m, Mesh* m2, double maxDis, QString mode);
762 
763 // QString name() const { return "Mesh/Cell Atlas 3D/Tools/Detect Surface Walls"; }
764 // QString description() const { return ""; }
765 // QStringList parmNames() const { return QStringList() << "Max Distance" << "Output"; }
766 // QStringList parmDescs() const { return QStringList() << "Max Distance" << "Output"; }
767 // QStringList parmDefaults() const { return QStringList() << "5.0" << "Label Cells"; }
768 // QIcon icon() const { return QIcon(":/images/MakeHeatMap.png"); }
769 
770 // ParmChoiceMap parmChoice() const
771 // {
772 // ParmChoiceMap map;
773 // map[1] = QStringList() << "Label Cells" << "Label Walls";
774 // return map;
775 // }
776 
777 
778 // };
779 
780 
781 
782 }
783 
784 #endif
mgx::DataAnalysis::run
bool run()
Runs the process.
Definition: CellAtlas.hpp:459
mgx::SaveNeighborhoodData
Definition: CellAtlas.hpp:154
mgx::WriteGrowthMapData::WriteGrowthMapData
WriteGrowthMapData(const Process &process)
Definition: CellAtlas.hpp:564
mgx::RootCellProcessing
Definition: RootCellProcessing.hpp:408
mgx::SurfaceAnalyzeBezierLine::SurfaceAnalyzeBezierLine
SurfaceAnalyzeBezierLine(const Process &proc)
Definition: CellAtlas.hpp:729
mgx::AnalyzeCells::AnalyzeCells
AnalyzeCells(const Process &process)
Definition: CellAtlas.hpp:39
mgx::CollapseBezierCellAtlas
Definition: CellAtlas.hpp:368
mgx::CellAnalysis3D::lvMap
labelVertexMap lvMap
Definition: CellAtlas.hpp:638
mgx::NhbdGraphInfo
Definition: GraphUtils.hpp:242
Process.hpp
mgx::SaveNeighborhoodData2D::run
bool run()
Runs the process.
Definition: CellAtlas.hpp:203
mgx::WriteGrowthMapData::run
bool run()
Runs the process.
Definition: CellAtlas.hpp:578
mgx::CellAnalysis3D::CellAnalysis3D
CellAnalysis3D(const Process &process)
Definition: CellAtlas.hpp:619
BezierProcess.hpp
mgx::CellAtlas::run
bool run()
Runs the process.
Definition: CellAtlas.hpp:341
mgx::SaveCellData
Definition: CellAtlas.hpp:130
mgx::SaveNeighborhoodData2D
Definition: CellAtlas.hpp:186
mgx::BezierFromCellFile::BezierFromCellFile
BezierFromCellFile(const Process &proc)
Definition: CellAtlas.hpp:703
mgx::WriteGrowthMapData
Definition: CellAtlas.hpp:561
mgx::SurfaceAnalyzeBezierLine::run
bool run()
Runs the process.
Definition: CellAtlas.hpp:738
mgx::GrowthAnalysis3D::run
bool run()
Runs the process.
Definition: CellAtlas.hpp:658
mgx::TopologicalCheck::TopologicalCheck
TopologicalCheck(const Process &process)
Definition: CellAtlas.hpp:273
mgx::SelectBadCells::SelectBadCells
SelectBadCells(const Process &process)
Definition: CellAtlas.hpp:78
mgx::AssignColumella
Definition: CellAtlas.hpp:379
mgx::SaveCellData::run
bool run()
Runs the process.
Definition: CellAtlas.hpp:146
mgx::CellAnalysis3D::cellTriangles
std::map< int, triVector > cellTriangles
Definition: CellAtlas.hpp:639
mgx::DisplayCellData::DisplayCellData
DisplayCellData(const Process &process)
Definition: CellAtlas.hpp:219
mgx::CellAtlas::dlg
QDialog * dlg
Definition: CellAtlas.hpp:363
mgx::GrowthAnalysis3D::GrowthAnalysis3D
GrowthAnalysis3D(const Process &process)
Definition: CellAtlas.hpp:647
mgx::DataAnalysisGUS::run
bool run()
Runs the process.
Definition: CellAtlas.hpp:498
mgx::Stack
Definition: Stack.hpp:33
mgx::CellAnalysis3D
Definition: CellAtlas.hpp:616
mgx::SelectBadCells::run
bool run()
Runs the process.
Definition: CellAtlas.hpp:88
mgx::AssignCorticalCells::AssignCorticalCells
AssignCorticalCells(const Process &process)
Definition: CellAtlas.hpp:407
mgx::SaveNeighborhoodData::SaveNeighborhoodData
SaveNeighborhoodData(const Process &process)
Definition: CellAtlas.hpp:157
mgx::GrowthAnalysis3D
Definition: CellAtlas.hpp:644
RootCellProcessing.hpp
mgx
Distributed matrix library.
Definition: Assert.hpp:26
MeshProcessCellAnalysis3D.hpp
mgx::discretizeBezierLineRef
void discretizeBezierLineRef(CuttingSurface *cutSurf, double vPos, double vRefPos, Matrix4d rotMat, int bezMapSize, std::map< int, Point3d > &bMap, std::map< int, Point3d > &diffbMap, std::map< int, Point3d > &refbMap)
mgx::labelVertexMap
std::map< int, std::vector< vertex > > labelVertexMap
Definition: CellAtlasUtils.hpp:16
mgx::neighborhoodGraph
mgx_EXPORT bool neighborhoodGraph(const vvGraph &S, double tolerance, NhbdGraphInfo &info, bool throwError=true)
mgx::Matrix4d
Matrix< 4, 4, double > Matrix4d
Definition: Geometry.hpp:119
mgx::LabelledStackComparison::LabelledStackComparison
LabelledStackComparison(const Process &process)
Definition: CellAtlas.hpp:591
mgx::CellAnalysis3D::uniqueLabels
std::vector< int > uniqueLabels
Definition: CellAtlas.hpp:640
mgx::CellAtlas::cellAtlasAttr
CellAtlasAttr * cellAtlasAttr
Definition: CellAtlas.hpp:315
RootCellAnalyzing.hpp
mgx::LabelledStackComparison::run
bool run()
Runs the process.
Definition: CellAtlas.hpp:604
CellAtlas_EXPORT
#define CellAtlas_EXPORT
Definition: CellAtlasConfig.hpp:26
mgx::Process
Definition: Process.hpp:219
mgx::SaveNeighborhoodData::run
bool run()
Runs the process.
Definition: CellAtlas.hpp:169
mgx::SaveNeighborhoodData2D::SaveNeighborhoodData2D
SaveNeighborhoodData2D(const Process &process)
Definition: CellAtlas.hpp:189
mgx::DataAnalysisGUS::DataAnalysisGUS
DataAnalysisGUS(const Process &process)
Definition: CellAtlas.hpp:470
mgx::CellAtlas::mousePos
Point2d mousePos
Definition: CellAtlas.hpp:364
mgx::stringToBool
mgx_EXPORT bool stringToBool(const QString &string)
Helper function converting a string into a boolean.
mgx::CellAtlas::CellAtlas
CellAtlas(const Process &process)
Definition: CellAtlas.hpp:319
mgx::CellAnalysis3D::run
bool run()
Runs the process.
Definition: CellAtlas.hpp:628
mgx::AssignCorticalCells::run
bool run()
Runs the process.
Definition: CellAtlas.hpp:420
mgx::DisplayCellData::run
bool run()
Runs the process.
Definition: CellAtlas.hpp:233
mgx::SelectBadCells
Definition: CellAtlas.hpp:75
mgx::CellAtlasFindCells::CellAtlasFindCells
CellAtlasFindCells(const Process &process)
Definition: CellAtlas.hpp:106
mgx::CellAtlasFindCells
Definition: CellAtlas.hpp:103
mgx::ExamineBadVasculature::run
bool run()
Runs the process.
Definition: CellAtlas.hpp:531
mgx::CellAtlas::~CellAtlas
virtual ~CellAtlas()
Definition: CellAtlas.hpp:337
mgx::DisplayCellData
Definition: CellAtlas.hpp:216
mgx::CellAtlas::ui
Ui_CellAtlasDialog ui
Definition: CellAtlas.hpp:317
mgx::Mesh
Definition: Mesh.hpp:54
DataAnalyzer.hpp
mgx::DataAnalysis::DataAnalysis
DataAnalysis(const Process &process)
Definition: CellAtlas.hpp:431
mgx::AnalyzeCells
Definition: CellAtlas.hpp:36
mgx::LabelledStackComparison
Definition: CellAtlas.hpp:588
mgx::AssignCorticalCells
Definition: CellAtlas.hpp:404
mgx::Mesh::graph
vvGraph & graph()
Get the VV graph of the mesh.
Definition: Mesh.hpp:355
mgx::DataAnalysis
Definition: CellAtlas.hpp:428
mgx::CellAtlas::cellAtlasConfigAttr
CellAtlasConfigAttr * cellAtlasConfigAttr
Definition: CellAtlas.hpp:316
mgx::DisplayShortestPath::DisplayShortestPath
DisplayShortestPath(const Process &process)
Definition: CellAtlas.hpp:543
mgx::Vector< 2, double >
mgx::AssignColumella::AssignColumella
AssignColumella(const Process &process)
Definition: CellAtlas.hpp:382
mgx::ExamineBadVasculature::ExamineBadVasculature
ExamineBadVasculature(const Process &process)
Definition: CellAtlas.hpp:510
mgx::BezierFromCellFile
Definition: CellAtlas.hpp:701
mgx::CellAtlasFindCells::run
bool run()
Runs the process.
Definition: CellAtlas.hpp:119
mgx::CollapseBezier
Definition: BezierProcess.hpp:147
mgx::DisplayShortestPath::run
bool run()
Runs the process.
Definition: CellAtlas.hpp:552
mgx::CellAnalysis3D::rcp
RootCellProcessing rcp
Definition: CellAtlas.hpp:637
mgx::CellAtlas::rcp
RootCellProcessing rcp
Definition: CellAtlas.hpp:314
mgx::ExamineBadVasculature
Definition: CellAtlas.hpp:507
mgx::BezierFromCellFile::run
bool run()
Runs the process.
Definition: CellAtlas.hpp:712
mgx::LoadCellData::run
bool run()
Runs the process.
Definition: CellAtlas.hpp:262
mgx::SaveCellData::SaveCellData
SaveCellData(const Process &process)
Definition: CellAtlas.hpp:133
mgx::AnalyzeCells::run
bool run()
Runs the process.
Definition: CellAtlas.hpp:58
CellAtlasConfig.hpp
mgx::TopologicalCheck::run
bool run()
Runs the process.
Definition: CellAtlas.hpp:302
mgx::CellAtlas
Definition: CellAtlas.hpp:309
mgx::DisplayShortestPath
Definition: CellAtlas.hpp:540
mgx::AssignColumella::run
bool run()
Runs the process.
Definition: CellAtlas.hpp:396
mgx::DataAnalysisGUS
Definition: CellAtlas.hpp:467
mgx::TopologicalCheck
Definition: CellAtlas.hpp:270
mgx::LoadCellData
Definition: CellAtlas.hpp:246
mgx::LoadCellData::LoadCellData
LoadCellData(const Process &process)
Definition: CellAtlas.hpp:249
mgx::AttrMap
Attribute map wraps std::map.
Definition: Attributes.hpp:686
mgx::CollapseBezierCellAtlas::CollapseBezierCellAtlas
CollapseBezierCellAtlas(const Process &process)
Definition: CellAtlas.hpp:371
mgx::SurfaceAnalyzeBezierLine
Definition: CellAtlas.hpp:727