1 #ifndef SYSTEMPROCESSLOAD_HPP
2 #define SYSTEMPROCESSLOAD_HPP
14 class Ui_LoadStackDialog;
15 class Ui_LoadMeshDialog;
16 class Ui_ImportMeshDialog;
20 namespace mgx {
namespace process {
37 std::vector<Point3i>& triangles);
54 if(!checkState().store(STORE_NON_EMPTY))
56 Store* input = currentStack()->currentStore();
57 Store* output = currentStack()->work();
58 bool res = (*this)(input, output);
66 bool operator()(
const Store* input,
Store* output);
92 int stackId = parms[0].toInt();
94 Point3f step(parms[2].toFloat(), parms[3].toFloat(), parms[4].toFloat());
95 float brightness(parms[5].toFloat());
99 Stack* stk = currentStack();
101 stk = stack(parms[0].toInt());
102 if(!checkState().stack(STACK_ANY, stackId))
106 if(storeName ==
"Main")
108 else if(storeName ==
"Work")
111 return (*
this)(stk, store, step, brightness, filename);
129 <<
"Stack" <<
"Store" <<
"X Step" <<
"Y Step" <<
"Z Step" <<
"Brightness" <<
"Profile File"; }
131 <<
"Stack" <<
"Store" <<
"X Step" <<
"Y Step" <<
"Z Step" <<
"Brightness" <<
"Profile File"; }
133 <<
"-1" <<
"Current" <<
"1.0" <<
"1.0" <<
"1.0" <<
"1.0" <<
""; }
137 map[1] <<
"Main" <<
"Work" <<
"Current";
147 void RemoveFilesSlot();
148 void FilterFilesSlot();
149 void SortAscendingSlot(
bool val =
true);
150 void SortDescendingSlot();
154 void setImageSize(
Point3u size);
155 void setImageSize(uint x, uint y, uint z) {
156 setImageSize(
Point3u(x, y, z));
158 void setImageResolution(
Point3f step);
159 void setImageResolution(
float x,
float y,
float z) {
160 setImageResolution(
Point3f(x, y, z));
162 Point3f imageResolution();
166 Ui_LoadStackDialog* ui;
200 map[1] = storeChoice();
238 bool operator()(
Mesh* mesh,
QString filename,
bool transform,
bool add);
243 <<
"Filename" <<
"Transform" <<
"Add" <<
"Stack number"; }
245 <<
"Filename" <<
"Transform" <<
"Add" <<
"Stack number"; }
247 <<
"" <<
"no" <<
"no" <<
"0"; }
251 map[1] = map[2] = booleanChoice();
257 bool loadMGXM_0(
QIODevice& file,
Mesh* mesh,
bool scale,
bool transform,
bool add,
bool has_color =
true);
258 bool loadMGXM_1_0(
QIODevice& file,
Mesh* mesh,
bool& scale,
bool& transform,
bool add,
bool has_color =
true);
259 bool loadMGXM_1_1(
QIODevice& file,
Mesh* mesh,
bool& scale,
bool& transform,
bool add,
bool has_color =
true);
260 bool loadMGXM_1_2(
QIODevice& file,
Mesh* mesh,
bool& scale,
bool& transform,
bool add,
bool has_color =
true);
261 bool loadMGXM_1_3(
QIODevice& file,
Mesh* mesh,
bool& scale,
bool& transform,
bool add);
263 void findSignalBounds(
Mesh* mesh);
266 void selectMeshFile();
269 void setMeshFile(
const QString& filename);
272 Ui_LoadMeshDialog* ui;
303 bool operator()(
Mesh* mesh,
QString filename,
QString type,
bool scale,
bool transform,
bool add);
309 <<
"Filename" <<
"Kind" <<
"Scale" <<
"Transform" <<
"Add" <<
"Stack number"; }
311 <<
"Filename" <<
"Kind" <<
"Scale" <<
"Transform" <<
"Add" <<
"Stack number"; }
313 <<
"" <<
"PLY" <<
"yes" <<
"no" <<
"no" <<
"0"; }
317 map[1] =
QStringList() <<
"VTK Mesh" <<
"Text" <<
"Cells" <<
"Keyence" <<
"MeshEdit";
318 map[2] = map[3] = map[4] = booleanChoice();
324 void selectMeshFile();
325 void selectMeshType(
const QString& type);
331 bool loadText(
Mesh* mesh,
const QString& filename,
bool scale,
bool transform,
bool add);
332 bool loadCells(
Mesh* mesh,
const QString& filename,
bool scale,
bool transform,
bool add);
333 bool loadKeyence(
Mesh* mesh,
const QString& filename,
bool scale,
bool transform,
bool add);
334 bool loadMeshEdit(
Mesh* mesh,
const QString& filename,
bool scale,
bool transform,
bool add);
335 bool loadMeshVTK(
Mesh* mesh,
const QString& filename,
bool& scale,
bool transform,
bool add);
336 bool loadMeshOBJ(
Mesh* mesh,
const QString& filename,
bool scale,
bool transform,
bool add);
337 bool loadMeshPLY(
Mesh* mesh,
const QString& filename,
bool scale,
bool transform,
bool add);
340 Ui_ImportMeshDialog* ui;
363 "Load the data for all existing objects, using the filename and properties set in them."; }
386 bool operator()(
QString filename);
393 "Load a view file and set all the fields and interface. Does not load the data though."; }
412 bool operator()(
Mesh* m);
430 class mgx_EXPORT SaveParents :
public MeshProcess {
432 SaveParents(
const MeshProcess& process) : Process(process), MeshProcess(process) {}
438 if(!checkState().mesh(MESH_ANY))
440 Mesh* m = currentMesh();
441 return (*
this)(m, parms[0]);
444 bool operator()(
Mesh* mesh,
const QString& filename);
462 class mgx_EXPORT LoadParents :
public MeshProcess {
464 LoadParents(
const MeshProcess& process) : Process(process), MeshProcess(process) {}
470 if(!checkState().mesh(MESH_ANY))
472 Mesh* m = currentMesh();
473 bool res = (*this)(m, parms[0]);
479 bool operator()(
Mesh* mesh,
const QString& filename);
497 class mgx_EXPORT ResetParents :
public MeshProcess {
499 ResetParents(
const MeshProcess& process) : Process(process), MeshProcess(process) {}
503 if(!checkState().mesh(MESH_ANY))
505 Mesh* m = currentMesh();
509 bool operator()(
Mesh* mesh);
QStringList parmNames() const
List of named parameters.
Definition: SystemProcessLoad.hpp:71
QString name() const
Returns the name of the process.
Definition: SystemProcessLoad.hpp:512
QString folder() const
Folder in which to place the process.
Definition: SystemProcessLoad.hpp:511
void show()
Ask the user interface to show this store.
Definition: Store.hpp:167
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: SystemProcessLoad.hpp:73
QStringList parmDescs() const
List of parameters descriptions.
Definition: SystemProcessLoad.hpp:72
QString description() const
Returns a description of the process for the GUI.
Definition: SystemProcessLoad.hpp:483
QStringList parmNames() const
List of named parameters.
Definition: SystemProcessLoad.hpp:514
QStringList parmDefaults() const
List of default parms.
Definition: SystemProcessLoad.hpp:419
Load a MGXM mesh file.
Definition: SystemProcessLoad.hpp:221
QString description() const
Returns a description of the process for the GUI.
Definition: SystemProcessLoad.hpp:513
ParmChoiceMap parmChoice() const
Purely for GUI purposes, provides for some of the parms parameter a choice.
Definition: SystemProcessLoad.hpp:134
QStringList parmDescs() const
List of parameters descriptions.
Definition: SystemProcessLoad.hpp:310
Import a mesh from a file of another format.
Definition: SystemProcessLoad.hpp:282
bool operator()(const QStringList &parms)
Implementation of the process with generic arguments.
Definition: SystemProcessLoad.hpp:90
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: SystemProcessLoad.hpp:321
QStringList parmDescs() const
List of parameters descriptions.
Definition: SystemProcessLoad.hpp:485
QString name() const
Returns the name of the process.
Definition: SystemProcessLoad.hpp:306
const Store * currentStore() const
Returns the current store.
Definition: Stack.hpp:112
QString description() const
Returns a description of the process for the GUI.
Definition: SystemProcessLoad.hpp:448
QStringList parmNames() const
List of named parameters.
Definition: SystemProcessLoad.hpp:364
QStringList parmDescs() const
List of parameters descriptions.
Definition: SystemProcessLoad.hpp:130
QString description() const
Returns a description of the process for the GUI.
Definition: SystemProcessLoad.hpp:362
QString name() const
Returns the name of the process.
Definition: SystemProcessLoad.hpp:482
QStringList parmDefaults() const
List of default parms.
Definition: SystemProcessLoad.hpp:196
QString name() const
Returns the name of the process.
Definition: SystemProcessLoad.hpp:192
QStringList parmNames() const
List of named parameters.
Definition: SystemProcessLoad.hpp:308
QString folder() const
Folder in which to place the process.
Definition: SystemProcessLoad.hpp:414
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: SystemProcessLoad.hpp:452
QStringList parmDescs() const
List of parameters descriptions.
Definition: SystemProcessLoad.hpp:450
QString description() const
Returns a description of the process for the GUI.
Definition: SystemProcessLoad.hpp:127
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: SystemProcessLoad.hpp:140
QString description() const
Returns a description of the process for the GUI.
Definition: SystemProcessLoad.hpp:193
QString name() const
Returns the name of the process.
Definition: SystemProcessLoad.hpp:361
mgx_EXPORT bool meshFromTriangles(vvgraph &S, std::vector< vertex > &vertices, std::vector< Point3i > &triangles)
This function creates a graph from a triangle soup.
Load a view file and all the associated files.
Definition: SystemProcessLoad.hpp:378
QString description() const
Returns a description of the process for the GUI.
Definition: SystemProcessLoad.hpp:241
QString folder() const
Folder in which to place the process.
Definition: SystemProcessLoad.hpp:446
bool operator()(const QStringList &parms)
Implementation of the process with generic arguments.
Definition: SystemProcessLoad.hpp:436
The Store class holds the actual 3D data and properties specific to it.
Definition: Store.hpp:25
QString name() const
Returns the name of the process.
Definition: SystemProcessLoad.hpp:447
Open a stack in either the MGXS or INRIA formats.
Definition: SystemProcessLoad.hpp:179
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: SystemProcessLoad.hpp:204
QString name() const
Returns the name of the process.
Definition: SystemProcessLoad.hpp:240
This class holds the actual mesh as a VV Graph and all sort of properties for it, including visualiza...
Definition: Mesh.hpp:167
QString name() const
Returns the name of the process.
Definition: SystemProcessLoad.hpp:68
QString folder() const
Folder in which to place the process.
Definition: SystemProcessLoad.hpp:239
graph::VVGraph< VertexData, EdgeData > vvgraph
Type of the VV graph holding the actual mesh.
Definition: Mesh.hpp:36
QStringList parmDefaults() const
List of default parms.
Definition: SystemProcessLoad.hpp:312
ParmChoiceMap parmChoice() const
Purely for GUI purposes, provides for some of the parms parameter a choice.
Definition: SystemProcessLoad.hpp:197
QStringList parmDescs() const
List of parameters descriptions.
Definition: SystemProcessLoad.hpp:244
QString description() const
Returns a description of the process for the GUI.
Definition: SystemProcessLoad.hpp:416
QString description() const
Returns a description of the process for the GUI.
Definition: SystemProcessLoad.hpp:69
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: SystemProcessLoad.hpp:487
Process that swap bytes.
Definition: SystemProcessLoad.hpp:48
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: SystemProcessLoad.hpp:366
QStringList parmDescs() const
List of parameters descriptions.
Definition: SystemProcessLoad.hpp:418
QString folder() const
Folder in which to place the process.
Definition: SystemProcessLoad.hpp:481
QStringList parmDefaults() const
List of default parms.
Definition: SystemProcessLoad.hpp:396
QString name() const
Returns the name of the process.
Definition: SystemProcessLoad.hpp:391
QStringList parmDescs() const
List of parameters descriptions.
Definition: SystemProcessLoad.hpp:195
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: SystemProcessLoad.hpp:420
ParmChoiceMap parmChoice() const
Purely for GUI purposes, provides for some of the parms parameter a choice.
Definition: SystemProcessLoad.hpp:248
QStringList parmNames() const
List of named parameters.
Definition: SystemProcessLoad.hpp:194
QStringList parmNames() const
List of named parameters.
Definition: SystemProcessLoad.hpp:242
QString description() const
Returns a description of the process for the GUI.
Definition: SystemProcessLoad.hpp:392
QStringList parmNames() const
List of named parameters.
Definition: SystemProcessLoad.hpp:484
File containing the definition of a Process.
QStringList parmDescs() const
List of parameters descriptions.
Definition: SystemProcessLoad.hpp:395
QStringList parmDefaults() const
List of default parms.
Definition: SystemProcessLoad.hpp:486
The Stack class represent the dimensions of the 3D data, and the frames transformations.
Definition: Stack.hpp:25
This is the main process class, the one all process inherit from.
Definition: Process.hpp:248
QStringList parmDefaults() const
List of default parms.
Definition: SystemProcessLoad.hpp:246
QStringList parmDescs() const
List of parameters descriptions.
Definition: SystemProcessLoad.hpp:365
QString folder() const
Folder in which to place the process.
Definition: SystemProcessLoad.hpp:360
void hide()
Ask the user interface to hide this store.
Definition: Store.hpp:173
Global processes have full mutable access to all properties of the process.
Definition: Process.hpp:894
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: SystemProcessLoad.hpp:516
Reset a mesh.
Definition: SystemProcessLoad.hpp:407
QString folder() const
Folder in which to place the process.
Definition: SystemProcessLoad.hpp:191
const Store * work() const
Access the work store.
Definition: Stack.hpp:93
QString name() const
Returns the name of the process.
Definition: SystemProcessLoad.hpp:126
bool operator()(const QStringList &)
Implementation of the process with generic arguments.
Definition: SystemProcessLoad.hpp:501
QString folder() const
Folder in which to place the process.
Definition: SystemProcessLoad.hpp:390
QStringList parmNames() const
List of named parameters.
Definition: SystemProcessLoad.hpp:449
QStringList parmNames() const
List of named parameters.
Definition: SystemProcessLoad.hpp:128
Import images forming a stack.
Definition: SystemProcessLoad.hpp:83
QString folder() const
Folder in which to place the process.
Definition: SystemProcessLoad.hpp:70
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: SystemProcessLoad.hpp:397
QString folder() const
Folder in which to place the process.
Definition: SystemProcessLoad.hpp:125
QStringList parmDefaults() const
List of default parms.
Definition: SystemProcessLoad.hpp:451
const Store * main() const
Access the main store.
Definition: Stack.hpp:74
Load all the files as specified in the various objects (filenames).
Definition: SystemProcessLoad.hpp:353
QString name() const
Returns the name of the process.
Definition: SystemProcessLoad.hpp:415
Stack processes have non-mutable access to meshes and mutable access to stacks.
Definition: Process.hpp:819
QStringList parmDefaults() const
List of default parms.
Definition: SystemProcessLoad.hpp:132
QStringList parmNames() const
List of named parameters.
Definition: SystemProcessLoad.hpp:417
bool operator()(const QStringList &parms)
Implementation of the process with generic arguments.
Definition: SystemProcessLoad.hpp:468
QString folder() const
Folder in which to place the process.
Definition: SystemProcessLoad.hpp:305
QStringList parmDescs() const
List of parameters descriptions.
Definition: SystemProcessLoad.hpp:515
ParmChoiceMap parmChoice() const
Purely for GUI purposes, provides for some of the parms parameter a choice.
Definition: SystemProcessLoad.hpp:314
QString description() const
Returns a description of the process for the GUI.
Definition: SystemProcessLoad.hpp:307
bool operator()(const QStringList &)
Implementation of the process with generic arguments.
Definition: SystemProcessLoad.hpp:52
Mesh processes have mutable access to meshes and non-mutable access to stacks.
Definition: Process.hpp:855
QStringList parmNames() const
List of named parameters.
Definition: SystemProcessLoad.hpp:394
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: SystemProcessLoad.hpp:255