11 #ifndef STACKPROCESSMORPHOLOGY_HPP 12 #define STACKPROCESSMORPHOLOGY_HPP 35 if(!checkState().store(STORE_NON_EMPTY | STORE_NON_LABEL))
37 Stack* stack = currentStack();
40 bool res = (*this)(store, work, parms[0].toFloat(), parms[1].toFloat(), parms[2].toFloat(), parms[3].toUInt());
48 bool operator()(
Store* input,
Store* output,
float threshold,
float multiplier,
float factor, uint fillValue);
58 return "Do a multipass edge detection in Z direction.\n" 59 "Stack is turned into a mask (0 or fill value)";
70 return QStringList() <<
"Values of signal that should not belong to surface." 71 <<
"Multiplicative factor for the threshold." 72 <<
"Adaptative factor for threshold." 73 <<
"Value to fill the mask with.";
83 return QIcon(
":/images/EdgeDetect.png");
108 if(!checkState().store(STORE_NON_EMPTY))
110 Stack* s = currentStack();
113 bool res = (*this)(s, input, output, parms[0].toUInt(), parms[1].toUInt(), parms[2].toUInt(),
121 bool operator()(
Stack* stack,
const Store* input,
Store* output, uint xradius, uint yradius, uint zradius,
122 bool auto_resize =
true);
131 return "Morphological dilation (max filter) on stack";
157 map[3] = booleanChoice();
161 return QIcon(
":/images/Dilate.png");
186 if(!checkState().store(STORE_NON_EMPTY))
188 Stack* s = currentStack();
191 bool res = (*this)(s, input, output, parms[0].toUInt(), parms[1].toUInt(), parms[2].toUInt(),
199 bool operator()(
Stack* stack,
const Store* input,
Store* output, uint xradius, uint yradius, uint zradius,
200 bool auto_resize =
true);
209 return "Morphological erosion on stack";
235 map[3] = booleanChoice();
239 return QIcon(
":/images/Erode.png");
262 if(!checkState().store(STORE_NON_EMPTY))
264 Stack* s = currentStack();
267 bool res = (*this)(s, input, output, parms[0].toUInt(), parms[1].toUInt(), parms[2].toUInt());
274 bool operator()(
Stack* stack,
const Store* input,
Store* output, uint xradius, uint yradius, uint zradius);
283 return "Morphological closure (i.e. dilatation followed erosion) on stack";
304 return QIcon(
":/images/Closing.png");
328 if(!checkState().store(STORE_NON_EMPTY))
330 Stack* s = currentStack();
333 bool res = (*this)(s, input, output, parms[0].toUInt(), parms[1].toUInt(), parms[2].toUInt());
340 bool operator()(
Stack* stack,
const Store* input,
Store* output, uint xradius, uint yradius, uint zradius);
349 return "Morphological opening (i.e. erosion followed dilatation) on stack";
370 return QIcon(
":/images/Opening.png");
384 if(!checkState().store(STORE_NON_EMPTY | STORE_NON_LABEL))
386 Stack* s = currentStack();
389 bool res = (*this)(input, output, parms[0].toUInt(), parms[1].toUInt(), parms[2].toUInt(), parms[3].toUInt());
396 bool operator()(
const Store* input,
Store* output, uint xradius, uint yradius, uint threshold, uint fillValue);
406 return "Fill holes in stack.\n" 407 "Use after Edge Detect.";
419 <<
"Y Radius of hole" 420 <<
"Minimal signal value to fill the hole." 421 <<
"Filling value. Usually same as Edge Detect.";
431 return QIcon(
":/images/FillHoles.png");
454 if(!checkState().store(STORE_NON_EMPTY | STORE_LABEL))
456 Stack* s = currentStack();
459 bool res = (*this)(s, input, output, parms[0].toUInt(), parms[1].toUInt(), parms[2].toUInt());
466 bool operator()(
Stack* stack,
const Store* input,
Store* output, uint xradius, uint yradius, uint zradius);
472 return "Open by label";
475 return "Morphological opening on a labeled stack";
496 return QIcon(
":/images/Opening.png");
521 if(!checkState().store(STORE_NON_EMPTY | STORE_LABEL))
523 Stack* s = currentStack();
526 bool res = (*this)(s, input, output, parms[0].toUInt(), parms[1].toUInt(), parms[2].toUInt());
533 bool operator()(
Stack* stack,
const Store* input,
Store* output, uint xradius, uint yradius, uint zradius);
539 return "Close by label";
542 return "Morphological closure on a labeled stack";
563 return QIcon(
":/images/Closing.png");
593 if(!checkState().store(STORE_NON_EMPTY))
595 Stack* stack = currentStack();
598 bool res = (*this)(stack, input, output, parms[0], parms[1].toUInt());
611 return "Apply Mask to Stack";
614 return "Apply the work mask to the main replacing work";
640 return QIcon(
":/images/Mask.png");
665 if(!checkState().store(STORE_NON_EMPTY))
667 Stack* stack = currentStack();
670 bool res = (*this)(stack, input, output, parms[0].toUInt(),
stringToBool(parms[1]));
674 output->setLabels(
true);
678 bool operator()(
Stack* stack,
const Store* input,
Store* output,
bool invert, uint threshold);
684 return "Apply Mask to Labels";
687 return "Apply mask in work stack to labels in main stack, replacing work";
707 map[0] = booleanChoice();
711 return QIcon(
":/images/MaskLabels.png");
ParmChoiceMap parmChoice() const
Purely for GUI purposes, provides for some of the parms parameter a choice.
Definition: StackProcessMorphology.hpp:232
QStringList parmDefaults() const
List of default parms.
Definition: StackProcessMorphology.hpp:423
QString folder() const
Folder in which to place the process.
Definition: StackProcessMorphology.hpp:124
QString folder() const
Folder in which to place the process.
Definition: StackProcessMorphology.hpp:50
QStringList parmDefaults() const
List of default parms.
Definition: StackProcessMorphology.hpp:489
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: StackProcessMorphology.hpp:160
Close the gray-level stack using a cubic kernel.
Definition: StackProcessMorphology.hpp:252
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: StackProcessMorphology.hpp:430
QString folder() const
Folder in which to place the process.
Definition: StackProcessMorphology.hpp:342
ParmChoiceMap parmChoice() const
Purely for GUI purposes, provides for some of the parms parameter a choice.
Definition: StackProcessMorphology.hpp:631
QString description() const
Returns a description of the process for the GUI.
Definition: StackProcessMorphology.hpp:348
QStringList parmNames() const
List of named parameters.
Definition: StackProcessMorphology.hpp:285
QString name() const
Returns the name of the process.
Definition: StackProcessMorphology.hpp:127
QString folder() const
Folder in which to place the process.
Definition: StackProcessMorphology.hpp:202
QStringList parmNames() const
List of named parameters.
Definition: StackProcessMorphology.hpp:477
ParmChoiceMap parmChoice() const
Purely for GUI purposes, provides for some of the parms parameter a choice.
Definition: StackProcessMorphology.hpp:704
QString name() const
Returns the name of the process.
Definition: StackProcessMorphology.hpp:538
QStringList parmDescs() const
List of parameters descriptions.
Definition: StackProcessMorphology.hpp:694
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: StackProcessMorphology.hpp:710
bool operator()(const QStringList &parms)
Implementation of the process with generic arguments.
Definition: StackProcessMorphology.hpp:591
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: StackProcessMorphology.hpp:495
const Store * currentStore() const
Returns the current store.
Definition: Stack.hpp:122
Open the gray-level stack using a cubic kernel.
Definition: StackProcessMorphology.hpp:318
QStringList parmDefaults() const
List of default parms.
Definition: StackProcessMorphology.hpp:626
QStringList parmDescs() const
List of parameters descriptions.
Definition: StackProcessMorphology.hpp:357
QStringList parmDescs() const
List of parameters descriptions.
Definition: StackProcessMorphology.hpp:483
QStringList parmNames() const
List of named parameters.
Definition: StackProcessMorphology.hpp:351
QString name() const
Returns the name of the process.
Definition: StackProcessMorphology.hpp:683
QStringList parmDescs() const
List of parameters descriptions.
Definition: StackProcessMorphology.hpp:621
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: StackProcessMorphology.hpp:562
Definition: StackProcessMorphology.hpp:374
QString name() const
Returns the name of the process.
Definition: StackProcessMorphology.hpp:205
QStringList parmNames() const
List of named parameters.
Definition: StackProcessMorphology.hpp:689
QString description() const
Returns a description of the process for the GUI.
Definition: StackProcessMorphology.hpp:130
bool operator()(const QStringList &parms)
Implementation of the process with generic arguments.
Definition: StackProcessMorphology.hpp:519
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: StackProcessMorphology.hpp:639
QStringList parmDescs() const
List of parameters descriptions.
Definition: StackProcessMorphology.hpp:416
Apply a mask to labels.
Definition: StackProcessMorphology.hpp:655
QStringList parmNames() const
List of named parameters.
Definition: StackProcessMorphology.hpp:61
QString name() const
Returns the name of the process.
Definition: StackProcessMorphology.hpp:471
QStringList parmDefaults() const
List of default parms.
Definition: StackProcessMorphology.hpp:147
The Store class holds the actual 3D data and properties specific to it.
Definition: Store.hpp:35
Erode the gray-level stack using a cubic kernel.
Definition: StackProcessMorphology.hpp:176
QString name() const
Returns the name of the process.
Definition: StackProcessMorphology.hpp:345
QStringList parmDefaults() const
List of default parms.
Definition: StackProcessMorphology.hpp:363
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: StackProcessMorphology.hpp:369
QString name() const
Returns the name of the process.
Definition: StackProcessMorphology.hpp:610
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: StackProcessMorphology.hpp:238
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: StackProcessMorphology.hpp:303
QString folder() const
Folder in which to place the process.
Definition: StackProcessMorphology.hpp:276
ParmChoiceMap parmChoice() const
Purely for GUI purposes, provides for some of the parms parameter a choice.
Definition: StackProcessMorphology.hpp:154
QString description() const
Returns a description of the process for the GUI.
Definition: StackProcessMorphology.hpp:541
QString description() const
Returns a description of the process for the GUI.
Definition: StackProcessMorphology.hpp:56
QString folder() const
Folder in which to place the process.
Definition: StackProcessMorphology.hpp:680
TODO: This class needs documenting!
Definition: StackProcessMorphology.hpp:25
This namespace contains all the API of MorphoGraphX.
Definition: Assert.hpp:26
bool operator()(const QStringList &parms)
Implementation of the process with generic arguments.
Definition: StackProcessMorphology.hpp:106
QString description() const
Returns a description of the process for the GUI.
Definition: StackProcessMorphology.hpp:404
QStringList parmDescs() const
List of parameters descriptions.
Definition: StackProcessMorphology.hpp:218
QString name() const
Returns the name of the process.
Definition: StackProcessMorphology.hpp:53
QStringList parmDescs() const
List of parameters descriptions.
Definition: StackProcessMorphology.hpp:550
QStringList parmDescs() const
List of parameters descriptions.
Definition: StackProcessMorphology.hpp:291
QString folder() const
Folder in which to place the process.
Definition: StackProcessMorphology.hpp:468
Close a labeled stack.
Definition: StackProcessMorphology.hpp:511
QStringList parmNames() const
List of named parameters.
Definition: StackProcessMorphology.hpp:133
QString description() const
Returns a description of the process for the GUI.
Definition: StackProcessMorphology.hpp:474
QStringList parmDescs() const
List of parameters descriptions.
Definition: StackProcessMorphology.hpp:68
File containing the definition of a Process.
QStringList parmDefaults() const
List of default parms.
Definition: StackProcessMorphology.hpp:699
QString name() const
Returns the name of the process.
Definition: StackProcessMorphology.hpp:401
QString folder() const
Folder in which to place the process.
Definition: StackProcessMorphology.hpp:607
The Stack class represent the dimensions of the 3D data, and the frames transformations.
Definition: Stack.hpp:35
QStringList parmNames() const
List of named parameters.
Definition: StackProcessMorphology.hpp:409
QStringList parmNames() const
List of named parameters.
Definition: StackProcessMorphology.hpp:211
bool operator()(const QStringList &parms)
Implementation of the process with generic arguments.
Definition: StackProcessMorphology.hpp:663
This is the main process class, the one all process inherit from.
Definition: Process.hpp:258
QString folder() const
Folder in which to place the process.
Definition: StackProcessMorphology.hpp:398
bool operator()(const QStringList &parms)
Implementation of the process with generic arguments.
Definition: StackProcessMorphology.hpp:184
void hide()
Ask the user interface to hide this store.
Definition: Store.hpp:183
QString description() const
Returns a description of the process for the GUI.
Definition: StackProcessMorphology.hpp:208
mgx_EXPORT bool stringToBool(const QString &string)
Helper function converting a string into a boolean.
This namespace contains all the classes needed to define processes.
QStringList parmNames() const
List of named parameters.
Definition: StackProcessMorphology.hpp:616
Dilate the gray-level stack using a cubic kernel.
Definition: StackProcessMorphology.hpp:98
const Store * work() const
Access the work store.
Definition: Stack.hpp:103
QString name() const
Returns the name of the process.
Definition: StackProcessMorphology.hpp:279
QStringList parmDefaults() const
List of default parms.
Definition: StackProcessMorphology.hpp:556
Apply a mask to a grey-level image.
Definition: StackProcessMorphology.hpp:583
QString folder() const
Folder in which to place the process.
Definition: StackProcessMorphology.hpp:535
QStringList parmDefaults() const
List of default parms.
Definition: StackProcessMorphology.hpp:225
const Store * main() const
Access the main store.
Definition: Stack.hpp:84
QString description() const
Returns a description of the process for the GUI.
Definition: StackProcessMorphology.hpp:613
Stack processes have non-mutable access to meshes and mutable access to stacks.
Definition: Process.hpp:829
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: StackProcessMorphology.hpp:82
bool operator()(const QStringList &parms)
Implementation of the process with generic arguments.
Definition: StackProcessMorphology.hpp:260
QStringList parmDefaults() const
List of default parms.
Definition: StackProcessMorphology.hpp:75
bool operator()(const QStringList &parms)
Implementation of the process with generic arguments.
Definition: StackProcessMorphology.hpp:382
QString description() const
Returns a description of the process for the GUI.
Definition: StackProcessMorphology.hpp:686
QStringList parmNames() const
List of named parameters.
Definition: StackProcessMorphology.hpp:544
QStringList parmDescs() const
List of parameters descriptions.
Definition: StackProcessMorphology.hpp:140
bool operator()(const QStringList &parms)
Implementation of the process with generic arguments.
Definition: StackProcessMorphology.hpp:33
bool operator()(const QStringList &parms)
Implementation of the process with generic arguments.
Definition: StackProcessMorphology.hpp:452
bool operator()(const QStringList &parms)
Implementation of the process with generic arguments.
Definition: StackProcessMorphology.hpp:326
QString description() const
Returns a description of the process for the GUI.
Definition: StackProcessMorphology.hpp:282
QStringList parmDefaults() const
List of default parms.
Definition: StackProcessMorphology.hpp:297
Open a labeled stack.
Definition: StackProcessMorphology.hpp:444