MorphoGraphX
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
StackProcessAnalyses.hpp
1 #ifndef STACKPROCESSANALYSES_HPP
2 #define STACKPROCESSANALYSES_HPP
3 
4 #include <Process.hpp>
5 
6 namespace mgx {
7 namespace process {
8 
11 
19 class mgxBase_EXPORT ComputeVolume : public StackProcess {
20 public:
21  ComputeVolume(const StackProcess& process)
22  : Process(process)
23  , StackProcess(process)
24  {
25  }
26 
27  bool operator()(const QStringList& parms)
28  {
29  if(!checkState().store(STORE_NON_EMPTY | STORE_LABEL))
30  return false;
31  Store* input = currentStack()->currentStore();
32  return (*this)(input, parms[0]);
33  }
34 
35  bool operator()(const Store* input, QString filename);
36 
37  QString name() const {
38  return "Compute Volumes";
39  }
41  {
42  return "Compute the volumes of the labels, i.e. the number of voxels multiplied by the vocel size.";
43  }
44  QString folder() const {
45  return "Analyses";
46  }
48  return QStringList() << "Filename";
49  }
51  return QStringList() << "Filename";
52  }
54  return QStringList() << "output.csv";
55  }
56  QIcon icon() const {
57  return QIcon(":/images/CellFiles3D.png");
58  }
59 };
61 } // namespace process
62 } // namespace mgx
63 
64 #endif
QStringList parmNames() const
List of named parameters.
Definition: StackProcessAnalyses.hpp:47
bool operator()(const QStringList &parms)
Implementation of the process with generic arguments.
Definition: StackProcessAnalyses.hpp:27
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: StackProcessAnalyses.hpp:56
The Store class holds the actual 3D data and properties specific to it.
Definition: Store.hpp:25
QStringList parmDescs() const
List of parameters descriptions.
Definition: StackProcessAnalyses.hpp:50
QStringList parmDefaults() const
List of default parms.
Definition: StackProcessAnalyses.hpp:53
QString name() const
Returns the name of the process.
Definition: StackProcessAnalyses.hpp:37
QString folder() const
Folder in which to place the process.
Definition: StackProcessAnalyses.hpp:44
File containing the definition of a Process.
Compute the volume of each label and write the result in a CSV file.
Definition: StackProcessAnalyses.hpp:19
This is the main process class, the one all process inherit from.
Definition: Process.hpp:248
QString description() const
Returns a description of the process for the GUI.
Definition: StackProcessAnalyses.hpp:40
Stack processes have non-mutable access to meshes and mutable access to stacks.
Definition: Process.hpp:819