1 #ifndef SYSTEMPROCESSSAVE_HPP
2 #define SYSTEMPROCESSSAVE_HPP
16 class Ui_SaveMeshDialog;
17 class Ui_ExportMeshDialog;
18 class Ui_ExportStackDialog;
20 namespace mgx {
namespace process {
90 bool operator()(
Stack* stack,
Store* store,
const QString& filename,
int compressionLevel = 0);
95 <<
"Filename" <<
"Store" <<
"Stack number" <<
"Compression Level (0-9)"; }
97 <<
"Filename" <<
"Store" <<
"Stack number" <<
"Compression Level (0-9)"; }
102 map[1] = storeChoice();
137 unsigned int nb_digit,
bool generate_voxel_spacing);
142 <<
"Filename" <<
"Store" <<
"Format" <<
"Generate Voxel Spacing" <<
"Stack number" <<
"NbDigits"; }
144 <<
"Filename" <<
"Store" <<
"Format" <<
"Generate Voxel Spacing" <<
"Stack number" <<
"NbDigits"; }
146 <<
"" <<
"Main" <<
"CImg Auto" <<
"No" <<
"0" <<
"0"; }
150 map[1] = storeChoice();
151 map[3] = booleanChoice();
157 void selectImageFile();
158 void setImageType(
const QString& type);
161 Ui_ExportStackDialog* ui;
246 bool operator()(
Mesh* mesh,
const QString& filename,
bool transform);
257 map[1] = map[2] = booleanChoice();
263 void selectMeshFile();
267 void setMeshFile(
const QString& filename);
270 bool saveMesh(
Mesh* mesh,
const QString& filename,
bool transform);
273 Ui_SaveMeshDialog* ui;
442 bool operator()(
Mesh* mesh,
const QString& filename,
const QString& type,
bool transform);
453 map[1] =
QStringList() <<
"PLY Binary" <<
"PLY Ascii" <<
"VTK Mesh Binary" <<
"VTK Mesh Ascii"
454 <<
"Text" <<
"Cells" <<
"MeshEdit" <<
"STL" <<
"OBJ";
455 map[2] = map[3] = booleanChoice();
461 void selectMeshFile();
462 void selectMeshType(
const QString& type);
466 void setMeshFile(
const QString& filename);
469 bool saveText(
Mesh* mesh,
const QString& filename,
bool transform);
470 bool saveCells(
Mesh* mesh,
const QString& filename,
bool transform);
471 bool saveMeshEdit(
Mesh* mesh,
const QString& filename,
bool transform);
472 bool saveMeshSTL(
Mesh* mesh,
const QString& filename,
bool transform);
473 bool saveVTU(
Mesh* mesh,
const QString& filename,
bool transform,
bool binary =
false);
474 bool saveOBJ(
Mesh* mesh,
const QString& filename,
bool transform);
475 bool savePLY(
Mesh* mesh,
const QString& filename,
bool transform,
bool binary =
false);
478 Ui_ExportMeshDialog* ui;
497 bool operator()(
const QString& filename);
540 return setErrorMessage(
"Error, no file name specified.");
541 int width = parms[2].toInt();
542 int height = parms[3].toInt();
543 float overSampling = parms[4].toFloat();
544 int quality = parms[5].toInt();
546 return (*
this)(filename, overSampling, width, height, quality, expand_frustum);
549 bool operator()(
QString filename,
float overSampling,
int width,
int height,
int quality,
bool expand_frustum);
555 <<
"Filename" <<
"Expand Frustum" <<
"Width" <<
"Height" <<
"Oversampling" <<
"Quality"; }
557 <<
"Filename" <<
"Expand Frustum" <<
"Width" <<
"Height" <<
"Oversampling" <<
"Quality"; }
559 <<
"" <<
"false" <<
"0" <<
"0" <<
"1.0" <<
"95"; }
Export the stack data into a stack of images.
Definition: SystemProcessSave.hpp:115
QString folder() const
Folder in which to place the process.
Definition: SystemProcessSave.hpp:91
QStringList parmNames() const
List of named parameters.
Definition: SystemProcessSave.hpp:504
This process allows scripts and other processes to take snapshots of the current result.
Definition: SystemProcessSave.hpp:532
QStringList parmDefaults() const
List of default parms.
Definition: SystemProcessSave.hpp:449
QStringList parmNames() const
List of named parameters.
Definition: SystemProcessSave.hpp:250
ParmChoiceMap parmChoice() const
Purely for GUI purposes, provides for some of the parms parameter a choice.
Definition: SystemProcessSave.hpp:147
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: SystemProcessSave.hpp:154
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: SystemProcessSave.hpp:560
QStringList parmDefaults() const
List of default parms.
Definition: SystemProcessSave.hpp:253
QStringList parmDescs() const
List of parameters descriptions.
Definition: SystemProcessSave.hpp:143
QStringList parmDefaults() const
List of default parms.
Definition: SystemProcessSave.hpp:506
QString description() const
Returns a description of the process for the GUI.
Definition: SystemProcessSave.hpp:93
Export a mesh on various formats: PLY format, VTK format, "text" format, "cells" format, MeshEdit format, STL format or OBJ format.
Definition: SystemProcessSave.hpp:429
QString folder() const
Folder in which to place the process.
Definition: SystemProcessSave.hpp:138
QString folder() const
Folder in which to place the process.
Definition: SystemProcessSave.hpp:443
QString name() const
Returns the name of the process.
Definition: SystemProcessSave.hpp:92
bool operator()(const QStringList &parms)
Implementation of the process with generic arguments.
Definition: SystemProcessSave.hpp:536
QString description() const
Returns a description of the process for the GUI.
Definition: SystemProcessSave.hpp:503
QString description() const
Returns a description of the process for the GUI.
Definition: SystemProcessSave.hpp:553
The Store class holds the actual 3D data and properties specific to it.
Definition: Store.hpp:25
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: SystemProcessSave.hpp:507
This class holds the actual mesh as a VV Graph and all sort of properties for it, including visualiza...
Definition: Mesh.hpp:167
ParmChoiceMap parmChoice() const
Purely for GUI purposes, provides for some of the parms parameter a choice.
Definition: SystemProcessSave.hpp:99
QString name() const
Returns the name of the process.
Definition: SystemProcessSave.hpp:444
QStringList parmNames() const
List of named parameters.
Definition: SystemProcessSave.hpp:141
QString description() const
Returns a description of the process for the GUI.
Definition: SystemProcessSave.hpp:140
Save the view file.
Definition: SystemProcessSave.hpp:488
QStringList parmDescs() const
List of parameters descriptions.
Definition: SystemProcessSave.hpp:447
QString folder() const
Folder in which to place the process.
Definition: SystemProcessSave.hpp:247
File containing the definition of a Process.
QStringList parmDefaults() const
List of default parms.
Definition: SystemProcessSave.hpp:145
QString name() const
Returns the name of the process.
Definition: SystemProcessSave.hpp:139
Save the data into a MGXS or INRIA format.
Definition: SystemProcessSave.hpp:76
The Stack class represent the dimensions of the 3D data, and the frames transformations.
Definition: Stack.hpp:25
QStringList parmDescs() const
List of parameters descriptions.
Definition: SystemProcessSave.hpp:556
This is the main process class, the one all process inherit from.
Definition: Process.hpp:248
QStringList parmNames() const
List of named parameters.
Definition: SystemProcessSave.hpp:446
QStringList parmDescs() const
List of parameters descriptions.
Definition: SystemProcessSave.hpp:251
QString folder() const
Folder in which to place the process.
Definition: SystemProcessSave.hpp:501
Global processes have full mutable access to all properties of the process.
Definition: Process.hpp:894
mgx_EXPORT bool stringToBool(const QString &string)
Helper function converting a string into a boolean.
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: SystemProcessSave.hpp:105
QStringList parmDefaults() const
List of default parms.
Definition: SystemProcessSave.hpp:558
ParmChoiceMap parmChoice() const
Purely for GUI purposes, provides for some of the parms parameter a choice.
Definition: SystemProcessSave.hpp:254
QStringList parmNames() const
List of named parameters.
Definition: SystemProcessSave.hpp:554
QString description() const
Returns a description of the process for the GUI.
Definition: SystemProcessSave.hpp:249
QStringList parmDefaults() const
List of default parms.
Definition: SystemProcessSave.hpp:98
QStringList parmDescs() const
List of parameters descriptions.
Definition: SystemProcessSave.hpp:96
QString name() const
Returns the name of the process.
Definition: SystemProcessSave.hpp:502
QString name() const
Returns the name of the process.
Definition: SystemProcessSave.hpp:552
QStringList parmNames() const
List of named parameters.
Definition: SystemProcessSave.hpp:94
Stack processes have non-mutable access to meshes and mutable access to stacks.
Definition: Process.hpp:819
QStringList parmDescs() const
List of parameters descriptions.
Definition: SystemProcessSave.hpp:505
QString description() const
Returns a description of the process for the GUI.
Definition: SystemProcessSave.hpp:445
QString folder() const
Folder in which to place the process.
Definition: SystemProcessSave.hpp:551
ParmChoiceMap parmChoice() const
Purely for GUI purposes, provides for some of the parms parameter a choice.
Definition: SystemProcessSave.hpp:450
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: SystemProcessSave.hpp:252
Save a mesh into a INRIA or MGXM file.
Definition: SystemProcessSave.hpp:234
Mesh processes have mutable access to meshes and non-mutable access to stacks.
Definition: Process.hpp:855
QString name() const
Returns the name of the process.
Definition: SystemProcessSave.hpp:248
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: SystemProcessSave.hpp:448