1 #ifndef MESH_PROCESS_CREATION_HPP
2 #define MESH_PROCESS_CREATION_HPP
6 #include <Polygonizer.hpp>
23 , progress(
"Marching Cubes Surface", 0)
29 if(!checkState().store(STORE_NON_EMPTY).mesh())
32 _stack = currentStack();
33 _store = _stack->currentStore();
34 Mesh* mesh = currentMesh();
36 bool result = (*this)(mesh, _store, parms[0].toFloat(), parms[1].toInt());
39 if(result and not mesh->isSurfaceVisible() and not mesh->isMeshVisible())
44 bool operator()(
Mesh* mesh,
const Store* store,
float cubeSize,
int threshold);
50 return "Marching Cubes Surface";
54 return "Extract surface mesh with marching cubes. A threshold to 0 will interpret the image as binary.";
61 return QStringList() <<
"Size for the marching cubes."
62 <<
"Minimal signal used for surface extraction.";
70 return QIcon(
":/images/MarchCubes.png");
93 , progress(
"Marching Cubes 3D", 0)
99 if(!checkState().store(STORE_LABEL).mesh())
102 _stack = currentStack();
103 _store = _stack->currentStore();
104 Mesh* mesh = currentMesh();
106 bool result = (*this)(mesh, _store, parms[0].toFloat(), parms[1].toInt(), parms[2].toInt(), parms[3].toInt());
109 if(result and not mesh->isSurfaceVisible() and not currentMesh()->isMeshVisible())
110 currentMesh()->showSurface();
114 bool operator()(
Mesh* mesh,
const Store* store,
float cubeSize,
int minVoxels,
int smooth,
int singleLabel);
120 return "Marching Cubes 3D";
123 return "Extract 3D meshes with marching cubes";
133 return QStringList() <<
"Size for the marching cubes."
134 <<
"Minimal number of voxels for extracting surface."
136 <<
"Extract surface only for this label.";
146 return QIcon(
":/images/MarchCubes3D.png");
174 if(!checkState().mesh())
176 return (*
this)(currentMesh());
179 bool operator()(
Mesh* mesh);
185 return "Mesh Cutting Surface";
188 return "Make mesh from cutting surface";
197 return QIcon(
":/images/MakePlane.png");
bool operator()(const QStringList &parms)
Implementation of the process with generic arguments.
Definition: MeshProcessCreation.hpp:27
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: MeshProcessCreation.hpp:196
Definition: Polygonizer.hpp:26
QStringList parmNames() const
List of named parameters.
Definition: MeshProcessCreation.hpp:190
arg(const QString &a, int fieldWidth=0, const QChar &fillChar=QLatin1Char( ' ')
QStringList parmNames() const
List of named parameters.
Definition: MeshProcessCreation.hpp:56
QString name() const
Returns the name of the process.
Definition: MeshProcessCreation.hpp:49
QStringList parmDescs() const
List of parameters descriptions.
Definition: MeshProcessCreation.hpp:193
QString folder() const
Folder in which to place the process.
Definition: MeshProcessCreation.hpp:116
QStringList parmDescs() const
List of parameters descriptions.
Definition: MeshProcessCreation.hpp:131
The Store class holds the actual 3D data and properties specific to it.
Definition: Store.hpp:25
This class holds the actual mesh as a VV Graph and all sort of properties for it, including visualiza...
Definition: Mesh.hpp:167
Definition: MeshProcessCreation.hpp:88
QStringList parmDefaults() const
List of default parms.
Definition: MeshProcessCreation.hpp:138
Create a surface matching the current cutting surface, whether it's a plane or a Bezier surface...
Definition: MeshProcessCreation.hpp:164
QStringList parmNames() const
List of named parameters.
Definition: MeshProcessCreation.hpp:125
Definition: Progress.hpp:89
bool operator()(const QStringList &)
Implementation of the process with generic arguments.
Definition: MeshProcessCreation.hpp:172
bool operator()(const QStringList &parms)
Implementation of the process with generic arguments.
Definition: MeshProcessCreation.hpp:97
Find the surface of a volume defined by an iso-surface on the image intensity using a variation on th...
Definition: MeshProcessCreation.hpp:18
File containing the definition of a Process.
The Stack class represent the dimensions of the 3D data, and the frames transformations.
Definition: Stack.hpp:25
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: MeshProcessCreation.hpp:145
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: MeshProcessCreation.hpp:187
QString description() const
Returns a description of the process for the GUI.
Definition: MeshProcessCreation.hpp:122
QString name() const
Returns the name of the process.
Definition: MeshProcessCreation.hpp:119
QString folder() const
Folder in which to place the process.
Definition: MeshProcessCreation.hpp:181
QString description() const
Returns a description of the process for the GUI.
Definition: MeshProcessCreation.hpp:52
QString folder() const
Folder in which to place the process.
Definition: MeshProcessCreation.hpp:46
QStringList parmDefaults() const
List of default parms.
Definition: MeshProcessCreation.hpp:64
QString name() const
Returns the name of the process.
Definition: MeshProcessCreation.hpp:184
Mesh processes have mutable access to meshes and non-mutable access to stacks.
Definition: Process.hpp:855
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: MeshProcessCreation.hpp:69
QStringList parmDescs() const
List of parameters descriptions.
Definition: MeshProcessCreation.hpp:59