MorphoGraphX
StackProcessAnalyses.hpp
1 //
2 // This file is part of MorphoGraphX - http://www.MorphoGraphX.org
3 // Copyright (C) 2012-2015 Richard S. Smith and collaborators.
4 //
5 // If you use MorphoGraphX in your work, please cite:
6 // http://dx.doi.org/10.7554/eLife.05864
7 //
8 // MorphoGraphX is free software, and is licensed under under the terms of the
9 // GNU General (GPL) Public License version 2.0, http://www.gnu.org/licenses.
10 //
11 #ifndef STACKPROCESSANALYSES_HPP
12 #define STACKPROCESSANALYSES_HPP
13 
14 #include <Process.hpp>
15 
16 namespace mgx {
17 namespace process {
18 
21 
29 class mgxBase_EXPORT ComputeVolume : public StackProcess {
30 public:
32  : Process(process)
33  , StackProcess(process)
34  {
35  }
36 
37  bool operator()(const QStringList& parms)
38  {
39  if(!checkState().store(STORE_NON_EMPTY | STORE_LABEL))
40  return false;
41  Store* input = currentStack()->currentStore();
42  return (*this)(input, parms[0]);
43  }
44 
45  bool operator()(const Store* input, QString filename);
46 
47  QString name() const {
48  return "Compute Volumes";
49  }
51  {
52  return "Compute the volumes of the labels, i.e. the number of voxels multiplied by the vocel size.";
53  }
54  QString folder() const {
55  return "Analyses";
56  }
58  return QStringList() << "Filename";
59  }
61  return QStringList() << "Filename";
62  }
64  return QStringList() << "output.csv";
65  }
66  QIcon icon() const {
67  return QIcon(":/images/CellFiles3D.png");
68  }
69 };
71 } // namespace process
72 } // namespace mgx
73 
74 #endif
QStringList parmNames() const
List of named parameters.
Definition: StackProcessAnalyses.hpp:57
bool operator()(const QStringList &parms)
Implementation of the process with generic arguments.
Definition: StackProcessAnalyses.hpp:37
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: StackProcessAnalyses.hpp:66
The Store class holds the actual 3D data and properties specific to it.
Definition: Store.hpp:35
QStringList parmDescs() const
List of parameters descriptions.
Definition: StackProcessAnalyses.hpp:60
QStringList parmDefaults() const
List of default parms.
Definition: StackProcessAnalyses.hpp:63
QString name() const
Returns the name of the process.
Definition: StackProcessAnalyses.hpp:47
This namespace contains all the API of MorphoGraphX.
Definition: Assert.hpp:26
QString folder() const
Folder in which to place the process.
Definition: StackProcessAnalyses.hpp:54
File containing the definition of a Process.
Compute the volume of each label and write the result in a CSV file.
Definition: StackProcessAnalyses.hpp:29
This is the main process class, the one all process inherit from.
Definition: Process.hpp:258
This namespace contains all the classes needed to define processes.
QString description() const
Returns a description of the process for the GUI.
Definition: StackProcessAnalyses.hpp:50
Stack processes have non-mutable access to meshes and mutable access to stacks.
Definition: Process.hpp:829