MorphoGraphX
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MeshProcessCellAxis.hpp
1 #ifndef MESH_PROCESSS_CELLAXIS_HPP
2 #define MESH_PROCESSS_CELLAXIS_HPP
3 
4 #include <Process.hpp>
5 
6 #include <MeshProcessCellMesh.hpp>
7 
8 namespace mgx {
9 namespace process {
12 
15 class mgxBase_EXPORT SaveCellAxis : public MeshProcess {
16 public:
17  SaveCellAxis(const MeshProcess& process)
18  : Process(process)
19  , MeshProcess(process)
20  {
21  }
22 
23  bool initialize(QStringList& parms, QWidget* parent);
24 
25  bool operator()(const QStringList& parms)
26  {
27  if(!checkState().mesh(MESH_NON_EMPTY))
28  return false;
29  return (*this)(currentMesh(), parms[0]);
30  }
31 
32  bool operator()(Mesh* mesh, const QString& filename);
33 
34  QString folder() const {
35  return "Cell Axis";
36  }
37  QString name() const {
38  return "Cell Axis Save";
39  }
40  QString description() const {
41  return "Save PDG, Fibril Orientations or Curvature to a spreadsheet file.";
42  }
44  return QStringList() << "Output File";
45  }
47  return QStringList() << "Path to output file";
48  }
50  return QStringList() << "";
51  }
52  QIcon icon() const {
53  return QIcon(":/images/CellAxisSave.png");
54  }
55 };
56 
60 class mgxBase_EXPORT LoadCellAxis : public MeshProcess {
61 public:
62  LoadCellAxis(const MeshProcess& process)
63  : Process(process)
64  , MeshProcess(process)
65  {
66  }
67 
68  bool initialize(QStringList& parms, QWidget* parent);
69 
70  bool operator()(const QStringList& parms)
71  {
72  if(!checkState().mesh(MESH_NON_EMPTY))
73  return false;
74  return (*this)(currentMesh(), parms[0], parms[1]);
75  }
76 
77  bool operator()(Mesh* mesh, const QString& type, const QString& filename);
78 
79  QString folder() const {
80  return "Cell Axis";
81  }
82  QString name() const {
83  return "Cell Axis Load";
84  }
85  QString description() const {
86  return "Load cell axis from a spreadsheet file.";
87  }
89  {
90  return QStringList() << "Type"
91  << "Input File";
92  }
94  {
95  return QStringList() << "Load PDG, Fibril Orientations or Curvature from a spreadsheet file."
96  << "Path to input file. If empty, a browser will open.";
97  }
99  {
100  return QStringList() << "PDG"
101  << "";
102  }
104  {
105  ParmChoiceMap map;
106  map[0] = QStringList() << "PDG"
107  << "fibril"
108  << "curvature";
109  return map;
110  }
111  QIcon icon() const {
112  return QIcon(":/images/CellAxisOpen.png");
113  }
114 };
115 
121 class mgxBase_EXPORT ClearCellAxis : public MeshProcess {
122 public:
123  ClearCellAxis(const MeshProcess& process)
124  : Process(process)
125  , MeshProcess(process)
126  {
127  }
128 
129  bool operator()(const QStringList&)
130  {
131  if(!checkState().mesh(MESH_NON_EMPTY))
132  return false;
133  return (*this)(currentMesh());
134  }
135 
136  bool operator()(Mesh* mesh);
137 
138  QString folder() const {
139  return "Cell Axis";
140  }
141  QString name() const {
142  return "Cell Axis Clear";
143  }
145  return "Remove any cell axis information from the current mesh.";
146  }
148  return QStringList();
149  }
151  return QStringList();
152  }
153  QIcon icon() const {
154  return QIcon(":/images/CellAxisClear.png");
155  }
156 };
157 
163 class mgxBase_EXPORT HideCellAxis : public MeshProcess {
164 public:
165  HideCellAxis(const MeshProcess& process)
166  : Process(process)
167  , MeshProcess(process)
168  {
169  }
170 
171  bool operator()(const QStringList& )
172  {
173  if(!checkState().mesh(MESH_NON_EMPTY))
174  return false;
175  return (*this)(currentMesh());
176  }
177 
178  bool operator()(Mesh* mesh);
179 
180  QString folder() const {
181  return "Cell Axis";
182  }
183  QString name() const {
184  return "Cell Axis Hide";
185  }
187  return "Hide the cell axis on the current mesh.";
188  }
190  return QStringList();
191  }
193  return QStringList();
194  }
195  QIcon icon() const {
196  return QIcon(":/images/CellAxisHide.png");
197  }
198 };
200 } // namespace process
201 } // namespace mgx
202 #endif
QStringList parmNames() const
List of named parameters.
Definition: MeshProcessCellAxis.hpp:43
QString name() const
Returns the name of the process.
Definition: MeshProcessCellAxis.hpp:37
QString name() const
Returns the name of the process.
Definition: MeshProcessCellAxis.hpp:141
QStringList parmDescs() const
List of parameters descriptions.
Definition: MeshProcessCellAxis.hpp:192
QStringList parmDefaults() const
List of default parms.
Definition: MeshProcessCellAxis.hpp:49
bool operator()(const QStringList &parms)
Implementation of the process with generic arguments.
Definition: MeshProcessCellAxis.hpp:70
QString description() const
Returns a description of the process for the GUI.
Definition: MeshProcessCellAxis.hpp:40
QStringList parmDescs() const
List of parameters descriptions.
Definition: MeshProcessCellAxis.hpp:93
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: MeshProcessCellAxis.hpp:111
Definition: MeshProcessCellAxis.hpp:15
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: MeshProcessCellAxis.hpp:52
QString description() const
Returns a description of the process for the GUI.
Definition: MeshProcessCellAxis.hpp:85
QStringList parmDescs() const
List of parameters descriptions.
Definition: MeshProcessCellAxis.hpp:150
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: MeshProcessCellAxis.hpp:195
QStringList parmNames() const
List of named parameters.
Definition: MeshProcessCellAxis.hpp:189
bool operator()(const QStringList &parms)
Implementation of the process with generic arguments.
Definition: MeshProcessCellAxis.hpp:25
QStringList parmNames() const
List of named parameters.
Definition: MeshProcessCellAxis.hpp:88
QString folder() const
Folder in which to place the process.
Definition: MeshProcessCellAxis.hpp:180
This class holds the actual mesh as a VV Graph and all sort of properties for it, including visualiza...
Definition: Mesh.hpp:167
QString folder() const
Folder in which to place the process.
Definition: MeshProcessCellAxis.hpp:138
ParmChoiceMap parmChoice() const
Purely for GUI purposes, provides for some of the parms parameter a choice.
Definition: MeshProcessCellAxis.hpp:103
Definition: MeshProcessCellAxis.hpp:60
bool operator()(const QStringList &)
Implementation of the process with generic arguments.
Definition: MeshProcessCellAxis.hpp:129
bool operator()(const QStringList &)
Implementation of the process with generic arguments.
Definition: MeshProcessCellAxis.hpp:171
File containing the definition of a Process.
QStringList parmDescs() const
List of parameters descriptions.
Definition: MeshProcessCellAxis.hpp:46
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: MeshProcessCellAxis.hpp:153
This is the main process class, the one all process inherit from.
Definition: Process.hpp:248
Definition: MeshProcessCellAxis.hpp:121
QString name() const
Returns the name of the process.
Definition: MeshProcessCellAxis.hpp:82
QString description() const
Returns a description of the process for the GUI.
Definition: MeshProcessCellAxis.hpp:144
QStringList parmDefaults() const
List of default parms.
Definition: MeshProcessCellAxis.hpp:98
QStringList parmNames() const
List of named parameters.
Definition: MeshProcessCellAxis.hpp:147
QString folder() const
Folder in which to place the process.
Definition: MeshProcessCellAxis.hpp:34
QString description() const
Returns a description of the process for the GUI.
Definition: MeshProcessCellAxis.hpp:186
Hide the cell axis on the mesh.
Definition: MeshProcessCellAxis.hpp:163
QString folder() const
Folder in which to place the process.
Definition: MeshProcessCellAxis.hpp:79
Mesh processes have mutable access to meshes and non-mutable access to stacks.
Definition: Process.hpp:855
QString name() const
Returns the name of the process.
Definition: MeshProcessCellAxis.hpp:183