11 #ifndef SYSTEMPROCESSLOAD_HPP 12 #define SYSTEMPROCESSLOAD_HPP 24 class Ui_LoadStackDialog;
25 class Ui_LoadMeshDialog;
26 class Ui_ImportMeshDialog;
47 std::vector<Point3i>& triangles);
64 if(!checkState().store(STORE_NON_EMPTY))
66 Store* input = currentStack()->currentStore();
67 Store* output = currentStack()->work();
68 bool res = (*this)(input, output);
76 bool operator()(
const Store* input,
Store* output);
102 int stackId = parms[0].toInt();
104 Point3f step(parms[2].toFloat(), parms[3].toFloat(), parms[4].toFloat());
105 float brightness(parms[5].toFloat());
109 Stack* stk = currentStack();
111 stk = stack(parms[0].toInt());
112 if(!checkState().stack(STACK_ANY, stackId))
116 if(storeName ==
"Main")
118 else if(storeName ==
"Work")
121 return (*
this)(stk, store, step, brightness, filename);
139 <<
"Stack" <<
"Store" <<
"X Step" <<
"Y Step" <<
"Z Step" <<
"Brightness" <<
"Profile File"; }
141 <<
"Stack" <<
"Store" <<
"X Step" <<
"Y Step" <<
"Z Step" <<
"Brightness" <<
"Profile File"; }
143 <<
"-1" <<
"Current" <<
"1.0" <<
"1.0" <<
"1.0" <<
"1.0" <<
""; }
147 map[1] <<
"Main" <<
"Work" <<
"Current";
157 void RemoveFilesSlot();
158 void FilterFilesSlot();
159 void SortAscendingSlot(
bool val =
true);
160 void SortDescendingSlot();
164 void setImageSize(
Point3u size);
165 void setImageSize(uint x, uint y, uint z) {
166 setImageSize(
Point3u(x, y, z));
168 void setImageResolution(
Point3f step);
169 void setImageResolution(
float x,
float y,
float z) {
170 setImageResolution(
Point3f(x, y, z));
176 Ui_LoadStackDialog* ui;
210 map[1] = storeChoice();
248 bool operator()(
Mesh* mesh,
QString filename,
bool transform,
bool add);
253 <<
"Filename" <<
"Transform" <<
"Add" <<
"Stack number"; }
255 <<
"Filename" <<
"Transform" <<
"Add" <<
"Stack number"; }
257 <<
"" <<
"no" <<
"no" <<
"0"; }
261 map[1] = map[2] = booleanChoice();
267 bool loadMGXM_0(
QIODevice& file,
Mesh* mesh,
bool scale,
bool transform,
bool add,
bool has_color =
true);
268 bool loadMGXM_1_0(
QIODevice& file,
Mesh* mesh,
bool& scale,
bool& transform,
bool add,
bool has_color =
true);
269 bool loadMGXM_1_1(
QIODevice& file,
Mesh* mesh,
bool& scale,
bool& transform,
bool add,
bool has_color =
true);
270 bool loadMGXM_1_2(
QIODevice& file,
Mesh* mesh,
bool& scale,
bool& transform,
bool add,
bool has_color =
true);
271 bool loadMGXM_1_3(
QIODevice& file,
Mesh* mesh,
bool& scale,
bool& transform,
bool add);
273 void findSignalBounds(
Mesh* mesh);
276 void selectMeshFile();
279 void setMeshFile(
const QString& filename);
282 Ui_LoadMeshDialog* ui;
313 bool operator()(
Mesh* mesh,
QString filename,
QString type,
bool scale,
bool transform,
bool add);
319 <<
"Filename" <<
"Kind" <<
"Scale" <<
"Transform" <<
"Add" <<
"Stack number"; }
321 <<
"Filename" <<
"Kind" <<
"Scale" <<
"Transform" <<
"Add" <<
"Stack number"; }
323 <<
"" <<
"PLY" <<
"yes" <<
"no" <<
"no" <<
"0"; }
327 map[1] =
QStringList() <<
"VTK Mesh" <<
"Text" <<
"Cells" <<
"Keyence" <<
"MeshEdit";
328 map[2] = map[3] = map[4] = booleanChoice();
334 void selectMeshFile();
335 void selectMeshType(
const QString& type);
341 bool loadText(
Mesh* mesh,
const QString& filename,
bool scale,
bool transform,
bool add);
342 bool loadCells(
Mesh* mesh,
const QString& filename,
bool scale,
bool transform,
bool add);
343 bool loadKeyence(
Mesh* mesh,
const QString& filename,
bool scale,
bool transform,
bool add);
344 bool loadMeshEdit(
Mesh* mesh,
const QString& filename,
bool scale,
bool transform,
bool add);
345 bool loadMeshVTK(
Mesh* mesh,
const QString& filename,
bool& scale,
bool transform,
bool add);
346 bool loadMeshOBJ(
Mesh* mesh,
const QString& filename,
bool scale,
bool transform,
bool add);
347 bool loadMeshPLY(
Mesh* mesh,
const QString& filename,
bool scale,
bool transform,
bool add);
350 Ui_ImportMeshDialog* ui;
373 "Load the data for all existing objects, using the filename and properties set in them."; }
396 bool operator()(
QString filename);
403 "Load a view file and set all the fields and interface. Does not load the data though."; }
422 bool operator()(
Mesh* m);
440 class mgx_EXPORT SaveParents :
public MeshProcess {
448 if(!checkState().mesh(MESH_ANY))
450 Mesh* m = currentMesh();
451 return (*
this)(m, parms[0]);
454 bool operator()(
Mesh* mesh,
const QString& filename);
472 class mgx_EXPORT LoadParents :
public MeshProcess {
480 if(!checkState().mesh(MESH_ANY))
482 Mesh* m = currentMesh();
483 bool res = (*this)(m, parms[0]);
489 bool operator()(
Mesh* mesh,
const QString& filename);
507 class mgx_EXPORT ResetParents :
public MeshProcess {
513 if(!checkState().mesh(MESH_ANY))
515 Mesh* m = currentMesh();
519 bool operator()(
Mesh* mesh);
QStringList parmNames() const
List of named parameters.
Definition: SystemProcessLoad.hpp:81
QString name() const
Returns the name of the process.
Definition: SystemProcessLoad.hpp:522
QString folder() const
Folder in which to place the process.
Definition: SystemProcessLoad.hpp:521
void show()
Ask the user interface to show this store.
Definition: Store.hpp:177
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: SystemProcessLoad.hpp:83
QStringList parmDescs() const
List of parameters descriptions.
Definition: SystemProcessLoad.hpp:82
QString description() const
Returns a description of the process for the GUI.
Definition: SystemProcessLoad.hpp:493
QStringList parmNames() const
List of named parameters.
Definition: SystemProcessLoad.hpp:524
QStringList parmDefaults() const
List of default parms.
Definition: SystemProcessLoad.hpp:429
Load a MGXM mesh file.
Definition: SystemProcessLoad.hpp:231
QString description() const
Returns a description of the process for the GUI.
Definition: SystemProcessLoad.hpp:523
ParmChoiceMap parmChoice() const
Purely for GUI purposes, provides for some of the parms parameter a choice.
Definition: SystemProcessLoad.hpp:144
QStringList parmDescs() const
List of parameters descriptions.
Definition: SystemProcessLoad.hpp:320
Import a mesh from a file of another format.
Definition: SystemProcessLoad.hpp:292
bool operator()(const QStringList &parms)
Implementation of the process with generic arguments.
Definition: SystemProcessLoad.hpp:100
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: SystemProcessLoad.hpp:331
QStringList parmDescs() const
List of parameters descriptions.
Definition: SystemProcessLoad.hpp:495
QString name() const
Returns the name of the process.
Definition: SystemProcessLoad.hpp:316
const Store * currentStore() const
Returns the current store.
Definition: Stack.hpp:122
QString description() const
Returns a description of the process for the GUI.
Definition: SystemProcessLoad.hpp:458
QStringList parmNames() const
List of named parameters.
Definition: SystemProcessLoad.hpp:374
QStringList parmDescs() const
List of parameters descriptions.
Definition: SystemProcessLoad.hpp:140
QString description() const
Returns a description of the process for the GUI.
Definition: SystemProcessLoad.hpp:372
QString name() const
Returns the name of the process.
Definition: SystemProcessLoad.hpp:492
QStringList parmDefaults() const
List of default parms.
Definition: SystemProcessLoad.hpp:206
QString name() const
Returns the name of the process.
Definition: SystemProcessLoad.hpp:202
QStringList parmNames() const
List of named parameters.
Definition: SystemProcessLoad.hpp:318
QString folder() const
Folder in which to place the process.
Definition: SystemProcessLoad.hpp:424
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: SystemProcessLoad.hpp:462
QStringList parmDescs() const
List of parameters descriptions.
Definition: SystemProcessLoad.hpp:460
QString description() const
Returns a description of the process for the GUI.
Definition: SystemProcessLoad.hpp:137
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: SystemProcessLoad.hpp:150
QString description() const
Returns a description of the process for the GUI.
Definition: SystemProcessLoad.hpp:203
QString name() const
Returns the name of the process.
Definition: SystemProcessLoad.hpp:371
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:388
QString description() const
Returns a description of the process for the GUI.
Definition: SystemProcessLoad.hpp:251
QString folder() const
Folder in which to place the process.
Definition: SystemProcessLoad.hpp:456
bool operator()(const QStringList &parms)
Implementation of the process with generic arguments.
Definition: SystemProcessLoad.hpp:446
The Store class holds the actual 3D data and properties specific to it.
Definition: Store.hpp:35
QString name() const
Returns the name of the process.
Definition: SystemProcessLoad.hpp:457
Open a stack in either the MGXS or INRIA formats.
Definition: SystemProcessLoad.hpp:189
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: SystemProcessLoad.hpp:214
QString name() const
Returns the name of the process.
Definition: SystemProcessLoad.hpp:250
This class holds the actual mesh as a VV Graph and all sort of properties for it, including visualiza...
Definition: Mesh.hpp:177
QString name() const
Returns the name of the process.
Definition: SystemProcessLoad.hpp:78
QString folder() const
Folder in which to place the process.
Definition: SystemProcessLoad.hpp:249
graph::VVGraph< VertexData, EdgeData > vvgraph
Type of the VV graph holding the actual mesh.
Definition: Mesh.hpp:46
QStringList parmDefaults() const
List of default parms.
Definition: SystemProcessLoad.hpp:322
ParmChoiceMap parmChoice() const
Purely for GUI purposes, provides for some of the parms parameter a choice.
Definition: SystemProcessLoad.hpp:207
QStringList parmDescs() const
List of parameters descriptions.
Definition: SystemProcessLoad.hpp:254
QString description() const
Returns a description of the process for the GUI.
Definition: SystemProcessLoad.hpp:426
QString description() const
Returns a description of the process for the GUI.
Definition: SystemProcessLoad.hpp:79
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: SystemProcessLoad.hpp:497
Process that swap bytes.
Definition: SystemProcessLoad.hpp:58
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: SystemProcessLoad.hpp:376
QStringList parmDescs() const
List of parameters descriptions.
Definition: SystemProcessLoad.hpp:428
QString folder() const
Folder in which to place the process.
Definition: SystemProcessLoad.hpp:491
This namespace contains all the API of MorphoGraphX.
Definition: Assert.hpp:26
QStringList parmDefaults() const
List of default parms.
Definition: SystemProcessLoad.hpp:406
QString name() const
Returns the name of the process.
Definition: SystemProcessLoad.hpp:401
QStringList parmDescs() const
List of parameters descriptions.
Definition: SystemProcessLoad.hpp:205
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: SystemProcessLoad.hpp:430
ParmChoiceMap parmChoice() const
Purely for GUI purposes, provides for some of the parms parameter a choice.
Definition: SystemProcessLoad.hpp:258
QStringList parmNames() const
List of named parameters.
Definition: SystemProcessLoad.hpp:204
QStringList parmNames() const
List of named parameters.
Definition: SystemProcessLoad.hpp:252
QString description() const
Returns a description of the process for the GUI.
Definition: SystemProcessLoad.hpp:402
QStringList parmNames() const
List of named parameters.
Definition: SystemProcessLoad.hpp:494
File containing the definition of a Process.
QStringList parmDescs() const
List of parameters descriptions.
Definition: SystemProcessLoad.hpp:405
QStringList parmDefaults() const
List of default parms.
Definition: SystemProcessLoad.hpp:496
The Stack class represent the dimensions of the 3D data, and the frames transformations.
Definition: Stack.hpp:35
This is the main process class, the one all process inherit from.
Definition: Process.hpp:258
QStringList parmDefaults() const
List of default parms.
Definition: SystemProcessLoad.hpp:256
QStringList parmDescs() const
List of parameters descriptions.
Definition: SystemProcessLoad.hpp:375
QString folder() const
Folder in which to place the process.
Definition: SystemProcessLoad.hpp:370
void hide()
Ask the user interface to hide this store.
Definition: Store.hpp:183
Global processes have full mutable access to all properties of the process.
Definition: Process.hpp:904
This namespace contains all the classes needed to define processes.
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: SystemProcessLoad.hpp:526
Reset a mesh.
Definition: SystemProcessLoad.hpp:417
QString folder() const
Folder in which to place the process.
Definition: SystemProcessLoad.hpp:201
const Store * work() const
Access the work store.
Definition: Stack.hpp:103
QString name() const
Returns the name of the process.
Definition: SystemProcessLoad.hpp:136
bool operator()(const QStringList &)
Implementation of the process with generic arguments.
Definition: SystemProcessLoad.hpp:511
QString folder() const
Folder in which to place the process.
Definition: SystemProcessLoad.hpp:400
QStringList parmNames() const
List of named parameters.
Definition: SystemProcessLoad.hpp:459
QStringList parmNames() const
List of named parameters.
Definition: SystemProcessLoad.hpp:138
Import images forming a stack.
Definition: SystemProcessLoad.hpp:93
QString folder() const
Folder in which to place the process.
Definition: SystemProcessLoad.hpp:80
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: SystemProcessLoad.hpp:407
QString folder() const
Folder in which to place the process.
Definition: SystemProcessLoad.hpp:135
QStringList parmDefaults() const
List of default parms.
Definition: SystemProcessLoad.hpp:461
const Store * main() const
Access the main store.
Definition: Stack.hpp:84
Load all the files as specified in the various objects (filenames).
Definition: SystemProcessLoad.hpp:363
QString name() const
Returns the name of the process.
Definition: SystemProcessLoad.hpp:425
Stack processes have non-mutable access to meshes and mutable access to stacks.
Definition: Process.hpp:829
QStringList parmDefaults() const
List of default parms.
Definition: SystemProcessLoad.hpp:142
QStringList parmNames() const
List of named parameters.
Definition: SystemProcessLoad.hpp:427
bool operator()(const QStringList &parms)
Implementation of the process with generic arguments.
Definition: SystemProcessLoad.hpp:478
QString folder() const
Folder in which to place the process.
Definition: SystemProcessLoad.hpp:315
QStringList parmDescs() const
List of parameters descriptions.
Definition: SystemProcessLoad.hpp:525
ParmChoiceMap parmChoice() const
Purely for GUI purposes, provides for some of the parms parameter a choice.
Definition: SystemProcessLoad.hpp:324
QString description() const
Returns a description of the process for the GUI.
Definition: SystemProcessLoad.hpp:317
bool operator()(const QStringList &)
Implementation of the process with generic arguments.
Definition: SystemProcessLoad.hpp:62
Mesh processes have mutable access to meshes and non-mutable access to stacks.
Definition: Process.hpp:865
QStringList parmNames() const
List of named parameters.
Definition: SystemProcessLoad.hpp:404
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: SystemProcessLoad.hpp:265