11 #ifndef SYSTEMPROCESSSAVE_HPP 12 #define SYSTEMPROCESSSAVE_HPP 18 #include <Version.hpp> 26 class Ui_SaveMeshDialog;
27 class Ui_ExportMeshDialog;
28 class Ui_ExportStackDialog;
100 bool operator()(
Stack* stack,
Store* store,
const QString& filename,
int compressionLevel = 0);
105 <<
"Filename" <<
"Store" <<
"Stack number" <<
"Compression Level (0-9)"; }
107 <<
"Filename" <<
"Store" <<
"Stack number" <<
"Compression Level (0-9)"; }
112 map[1] = storeChoice();
147 unsigned int nb_digit,
bool generate_voxel_spacing);
152 <<
"Filename" <<
"Store" <<
"Format" <<
"Generate Voxel Spacing" <<
"Stack number" <<
"NbDigits"; }
154 <<
"Filename" <<
"Store" <<
"Format" <<
"Generate Voxel Spacing" <<
"Stack number" <<
"NbDigits"; }
156 <<
"" <<
"Main" <<
"CImg Auto" <<
"No" <<
"0" <<
"0"; }
160 map[1] = storeChoice();
161 map[3] = booleanChoice();
167 void selectImageFile();
168 void setImageType(
const QString& type);
171 Ui_ExportStackDialog* ui;
256 bool operator()(
Mesh* mesh,
const QString& filename,
bool transform);
267 map[1] = map[2] = booleanChoice();
273 void selectMeshFile();
277 void setMeshFile(
const QString& filename);
280 bool saveMesh(
Mesh* mesh,
const QString& filename,
bool transform);
283 Ui_SaveMeshDialog* ui;
452 bool operator()(
Mesh* mesh,
const QString& filename,
const QString& type,
bool transform);
463 map[1] =
QStringList() <<
"PLY Binary" <<
"PLY Ascii" <<
"VTK Mesh Binary" <<
"VTK Mesh Ascii" 464 <<
"Text" <<
"Cells" <<
"MeshEdit" <<
"STL" <<
"OBJ";
465 map[2] = map[3] = booleanChoice();
471 void selectMeshFile();
472 void selectMeshType(
const QString& type);
476 void setMeshFile(
const QString& filename);
479 bool saveText(
Mesh* mesh,
const QString& filename,
bool transform);
480 bool saveCells(
Mesh* mesh,
const QString& filename,
bool transform);
481 bool saveMeshEdit(
Mesh* mesh,
const QString& filename,
bool transform);
482 bool saveMeshSTL(
Mesh* mesh,
const QString& filename,
bool transform);
483 bool saveVTU(
Mesh* mesh,
const QString& filename,
bool transform,
bool binary =
false);
484 bool saveOBJ(
Mesh* mesh,
const QString& filename,
bool transform);
485 bool savePLY(
Mesh* mesh,
const QString& filename,
bool transform,
bool binary =
false);
488 Ui_ExportMeshDialog* ui;
507 bool operator()(
const QString& filename);
550 return setErrorMessage(
"Error, no file name specified.");
551 int width = parms[2].toInt();
552 int height = parms[3].toInt();
553 float overSampling = parms[4].toFloat();
554 int quality = parms[5].toInt();
556 return (*
this)(filename, overSampling, width, height, quality, expand_frustum);
559 bool operator()(
QString filename,
float overSampling,
int width,
int height,
int quality,
bool expand_frustum);
565 <<
"Filename" <<
"Expand Frustum" <<
"Width" <<
"Height" <<
"Oversampling" <<
"Quality"; }
567 <<
"Filename" <<
"Expand Frustum" <<
"Width" <<
"Height" <<
"Oversampling" <<
"Quality"; }
569 <<
"" <<
"false" <<
"0" <<
"0" <<
"1.0" <<
"95"; }
Export the stack data into a stack of images.
Definition: SystemProcessSave.hpp:125
QString folder() const
Folder in which to place the process.
Definition: SystemProcessSave.hpp:101
QStringList parmNames() const
List of named parameters.
Definition: SystemProcessSave.hpp:514
This process allows scripts and other processes to take snapshots of the current result.
Definition: SystemProcessSave.hpp:542
QStringList parmDefaults() const
List of default parms.
Definition: SystemProcessSave.hpp:459
QStringList parmNames() const
List of named parameters.
Definition: SystemProcessSave.hpp:260
ParmChoiceMap parmChoice() const
Purely for GUI purposes, provides for some of the parms parameter a choice.
Definition: SystemProcessSave.hpp:157
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: SystemProcessSave.hpp:164
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: SystemProcessSave.hpp:570
QStringList parmDefaults() const
List of default parms.
Definition: SystemProcessSave.hpp:263
QStringList parmDescs() const
List of parameters descriptions.
Definition: SystemProcessSave.hpp:153
QStringList parmDefaults() const
List of default parms.
Definition: SystemProcessSave.hpp:516
QString description() const
Returns a description of the process for the GUI.
Definition: SystemProcessSave.hpp:103
Export a mesh on various formats: PLY format, VTK format, "text" format, "cells" format, MeshEdit format, STL format or OBJ format.
Definition: SystemProcessSave.hpp:439
QString folder() const
Folder in which to place the process.
Definition: SystemProcessSave.hpp:148
QString folder() const
Folder in which to place the process.
Definition: SystemProcessSave.hpp:453
QString name() const
Returns the name of the process.
Definition: SystemProcessSave.hpp:102
bool operator()(const QStringList &parms)
Implementation of the process with generic arguments.
Definition: SystemProcessSave.hpp:546
QString description() const
Returns a description of the process for the GUI.
Definition: SystemProcessSave.hpp:513
QString description() const
Returns a description of the process for the GUI.
Definition: SystemProcessSave.hpp:563
The Store class holds the actual 3D data and properties specific to it.
Definition: Store.hpp:35
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: SystemProcessSave.hpp:517
This class holds the actual mesh as a VV Graph and all sort of properties for it, including visualiza...
Definition: Mesh.hpp:177
ParmChoiceMap parmChoice() const
Purely for GUI purposes, provides for some of the parms parameter a choice.
Definition: SystemProcessSave.hpp:109
QString name() const
Returns the name of the process.
Definition: SystemProcessSave.hpp:454
This namespace contains all the API of MorphoGraphX.
Definition: Assert.hpp:26
QStringList parmNames() const
List of named parameters.
Definition: SystemProcessSave.hpp:151
QString description() const
Returns a description of the process for the GUI.
Definition: SystemProcessSave.hpp:150
Save the view file.
Definition: SystemProcessSave.hpp:498
QStringList parmDescs() const
List of parameters descriptions.
Definition: SystemProcessSave.hpp:457
QString folder() const
Folder in which to place the process.
Definition: SystemProcessSave.hpp:257
File containing the definition of a Process.
QStringList parmDefaults() const
List of default parms.
Definition: SystemProcessSave.hpp:155
QString name() const
Returns the name of the process.
Definition: SystemProcessSave.hpp:149
Save the data into a MGXS or INRIA format.
Definition: SystemProcessSave.hpp:86
The Stack class represent the dimensions of the 3D data, and the frames transformations.
Definition: Stack.hpp:35
QStringList parmDescs() const
List of parameters descriptions.
Definition: SystemProcessSave.hpp:566
This is the main process class, the one all process inherit from.
Definition: Process.hpp:258
QStringList parmNames() const
List of named parameters.
Definition: SystemProcessSave.hpp:456
QStringList parmDescs() const
List of parameters descriptions.
Definition: SystemProcessSave.hpp:261
QString folder() const
Folder in which to place the process.
Definition: SystemProcessSave.hpp:511
Global processes have full mutable access to all properties of the process.
Definition: Process.hpp:904
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.
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: SystemProcessSave.hpp:115
QStringList parmDefaults() const
List of default parms.
Definition: SystemProcessSave.hpp:568
ParmChoiceMap parmChoice() const
Purely for GUI purposes, provides for some of the parms parameter a choice.
Definition: SystemProcessSave.hpp:264
QStringList parmNames() const
List of named parameters.
Definition: SystemProcessSave.hpp:564
QString description() const
Returns a description of the process for the GUI.
Definition: SystemProcessSave.hpp:259
QStringList parmDefaults() const
List of default parms.
Definition: SystemProcessSave.hpp:108
QStringList parmDescs() const
List of parameters descriptions.
Definition: SystemProcessSave.hpp:106
QString name() const
Returns the name of the process.
Definition: SystemProcessSave.hpp:512
QString name() const
Returns the name of the process.
Definition: SystemProcessSave.hpp:562
QStringList parmNames() const
List of named parameters.
Definition: SystemProcessSave.hpp:104
Stack processes have non-mutable access to meshes and mutable access to stacks.
Definition: Process.hpp:829
QStringList parmDescs() const
List of parameters descriptions.
Definition: SystemProcessSave.hpp:515
QString description() const
Returns a description of the process for the GUI.
Definition: SystemProcessSave.hpp:455
QString folder() const
Folder in which to place the process.
Definition: SystemProcessSave.hpp:561
ParmChoiceMap parmChoice() const
Purely for GUI purposes, provides for some of the parms parameter a choice.
Definition: SystemProcessSave.hpp:460
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: SystemProcessSave.hpp:262
Save a mesh into a INRIA or MGXM file.
Definition: SystemProcessSave.hpp:244
Mesh processes have mutable access to meshes and non-mutable access to stacks.
Definition: Process.hpp:865
QString name() const
Returns the name of the process.
Definition: SystemProcessSave.hpp:258
QIcon icon() const
Icon to use to represent the process in the GUI.
Definition: SystemProcessSave.hpp:458