11 #ifndef MESHPROCESSEXPORT_HPP
12 #define MESHPROCESSEXPORT_HPP
15 #include <QFileDialog>
17 #include <QTreeWidget>
21 class Ui_PlyCellGraphDlg;
41 std::map<std::pair<int, int>,
int>
intData;
50 void createPlyDataFromAttr(
Mesh* m, QStringList attrMapsToBeSaved, std::vector<PlyCellData>& cellVec, std::vector<PlyWallData>& wallVec);
59 Ui_PlyCellGraphDlg*
ui;
63 setName(
"Mesh/Export/Cell Graph Ply File Save");
64 setDesc(
"Saves a standard PLY file and a cell graph PLY file with specified attributes. If Marion's file is selected than it will create a file with a fixed set of attributes.");
65 setIcon(QIcon(
":/images/MakeHeatMap.png"));
67 addParm(
"Filename",
"Filename",
"");
68 addParm(
"Mesh Type",
"Mesh Type",
"2D", QStringList() <<
"2D" <<
"3D");
72 bool initialize(QWidget* parent);
76 if(!checkState().mesh(MESH_ANY))
78 Mesh *mesh = currentMesh();
79 return run(mesh, parm(
"Filename"), parm(
"Mesh Type"));
82 bool run(
Mesh* mesh, QString filename, QString meshType);
95 setName(
"Mesh/Export/Cell Graph Ply File Load");
96 setDesc(
"Loads Cell Graph data from a file and creates Attribute Maps from the data.");
97 setIcon(QIcon(
":/images/MakeHeatMap.png"));
99 addParm(
"Filename",
"Filename",
"");
104 bool initialize(QWidget* parent);
108 if(!checkState().mesh(MESH_ANY))
110 Mesh *mesh = currentMesh();
111 return run(mesh, parm(
"Filename"));
114 bool run(
Mesh* mesh,
const QString& filename);
123 setName(
"Mesh/Export/Cell Contour File Save");
124 setDesc(
"Saves a cell contour file to be used in Babak's leaf interogator software");
125 setIcon(QIcon(
":/images/MakeHeatMap.png"));
127 addParm(
"Filename",
"Filename",
"");
132 bool initialize(QWidget* parent);
136 if(!checkState().mesh(MESH_ANY))
138 Mesh *mesh = currentMesh();
139 return run(mesh, parm(
"Filename"));
142 bool run(
Mesh* mesh,
const QString& filename);
156 setName(
"Mesh/Export/Export Internal Angles");
158 setIcon(QIcon(
":/images/open.png"));
160 addParm(
"Filename",
"Filename",
"");
161 addParm(
"Junction Merging Threshold",
"Junction Merging Threshold",
"0.1");
167 Mesh* m = currentMesh();
168 return run(m, parm(
"Filename"), parm(
"Junction Merging Threshold").toDouble());
170 bool run(
Mesh* m, QString filename,
double threshold);
172 bool initialize(QWidget* parent);
184 setName(
"Mesh/Export/Export Junction Angles");
185 setDesc(
"Compute wall angles at the cell junctions and export them to a file.");
186 setIcon(QIcon(
":/images/open.png"));
188 addParm(
"Filename",
"Filename",
"");
189 addParm(
"Inclusion Radius",
"Inclusion Radius",
"1.0");
190 addParm(
"Method",
"Method",
"Furthest", QStringList() <<
"Closest" <<
"Average" <<
"Furthest");
196 Mesh* m = currentMesh();
197 Mesh* m2 = otherMesh();
198 return run(m, m2, parm(
"Filename"), parm(
"Inclusion Radius").toDouble(), parm(
"Method"));
200 bool run(
Mesh* m,
Mesh* m2, QString filename,
double thresholdDis, QString method);
202 bool initialize(QWidget* parent);
214 setName(
"Mesh/Export/Export Junction Angles New");
215 setDesc(
"Compute wall angles at the cell junctions and export them to a file.");
216 setIcon(QIcon(
":/images/open.png"));
218 addParm(
"Filename",
"Filename",
"");
219 addParm(
"Inclusion Radius",
"Inclusion Radius",
"1.0");
220 addParm(
"Method",
"Method",
"Furthest", QStringList() <<
"Closest" <<
"Average" <<
"Furthest");
221 addParm(
"Change Map",
"Change Map",
"No",booleanChoice());
227 Mesh* m = currentMesh();
228 Mesh* m2 = otherMesh();
229 return run(m, m2, parm(
"Filename"), parm(
"Inclusion Radius").toDouble(), parm(
"Method"),
stringToBool(parm(
"Change Map")));
231 bool run(
Mesh* m,
Mesh* m2, QString filename,
double thresholdDis, QString method,
bool changeMap);
233 bool initialize(QWidget* parent);