11 #ifndef GLOBALPROCESS_HPP
12 #define GLOBALPROCESS_HPP
30 setName(
"Stack/System/Set Current Stack");
31 setDesc(
"Change the current stack and mesh. Needed for scripts.");
32 setIcon(QIcon(
":/images/Relabel.png"));
34 addParm(
"Store",
"Current store, or 'Both'",
"Main", QStringList() <<
"Main" <<
"Work" <<
"Both" <<
"None");
35 addParm(
"Stack id",
"Stack id",
"0");
41 int id = parm(
"Stack id").toInt();
42 return run(parm(
"Store"),
id);
45 bool run(
const QString &store,
int id);
69 setName(
"Misc/Transform/Save Global Transform");
70 setDesc(
"Save the global alignment (transform) matrix from one stack to the other into a file");
72 setIcon(QIcon(
":/images/save.png"));
73 addParm(
"Filename",
"Filename",
"");
76 bool initialize(QWidget* parent);
78 bool run() {
return run(parm(
"Filename")); }
80 bool run(
const QString& filename);
97 setName(
"Stack/Segmentation/Join Regions");
98 setDesc(
"Join Regions after 3D segmentation.Cells selected in the 3D cell mesh extracted from the stack will be merged and re-extracted.");
99 setIcon(QIcon(
":/images/JoinRegions.png"));
101 addParm(
"Cube Size",
"Cube Size for the Marching Cube process.",
"0");
106 if(!checkState().store(STORE_WORK | STORE_LABEL).mesh(MESH_NON_EMPTY))
108 Store* work = currentStack()->work();
109 Mesh* mesh = currentMesh();
112 float cubeSize = parm(
"Cube Size").toFloat(&ok);
114 return setErrorMessage(
"Error, the parameter 'Cube Size' must be a number.");
116 bool res = run(work, mesh, cubeSize);
122 bool run(
Store* work,
Mesh* mesh,
float cubeSize);