MorphoGraphX  2.0-1-227
MeshProcessImport.hpp
Go to the documentation of this file.
1 //
2 // This file is part of MorphoGraphX - http://www.MorphoGraphX.org
3 //
4 // MorphoGraphX is developed by the group of Richard S. Smith at the John Innes Centre
5 //
6 // If you use MorphoGraphX in your work, please cite:
7 // http://dx.doi.org/10.7554/eLife.05864
8 //
9 // MorphoGraphX is free software, and is licensed under under the terms of the
10 // GNU General (GPL) Public License version 2.0, http://www.gnu.org/licenses.
11 //
12 #ifndef MESH_PROCESS_IMPORT_HPP
13 #define MESH_PROCESS_IMPORT_HPP
14 #include <Process.hpp>
15 #include <Misc.hpp>
16 
17 namespace mgx
18 {
19  class Load3DFrom2View : public Process
20  {
21  public:
22  Load3DFrom2View(const Process& process) : Process(process)
23  {
24  setName("Mesh/Import/Load 3D From 2View");
25  setDesc("Load a mesh from the 3D from 2View software\n\n"
26  "The input height map is generated by the 3D stereo reconstruction software\n"
27  "of Routier-Kierzkowska A-L and Kwiatkowska D, Functional Plant Biology, 2008\n"
28  "https://doi.org/10.1071/FP08047.\n\n"
29  "The greyscale image used for the color is typically the left input image for the reconstruction");
30  setIcon(QIcon(":/images/open.png"));
31 
32  addParm("Height File", "File name that holds height map", "Height.csv");
33  addParm("Color File", "File name that holds color", "Color.tif");
34  addParm("Scale", "Scaling for the image in xyz", "1.0 1.0 1.0");
35  }
36 
37  bool run()
38  {
39  return run(currentMesh(), parm("Height File"), parm("Color File"), stringToPoint3d(parm("Scale")));
40  }
41 
42  bool run(Mesh *mesh, const QString &heightFile, const QString &colorFile, Point3d scale);
43  };
44 }
45 #endif
mgx::Load3DFrom2View
Definition: MeshProcessImport.hpp:19
mgx::ProcessParms::addParm
bool addParm(const QString &parmName, const QString &desc, const QString &def, const QStringList &choices=QStringList())
Add a parameter to the list.
Process.hpp
mgx
Distributed matrix library.
Definition: Assert.hpp:26
mgx::ProcessParms::setIcon
bool setIcon(const QIcon &icon)
Set the icon.
mgx::Process
Definition: Process.hpp:219
mgx::ProcessParms::setDesc
bool setDesc(const QString &description)
Set the description.
mgx::Mesh
Definition: Mesh.hpp:54
mgx::Load3DFrom2View::run
bool run()
Runs the process.
Definition: MeshProcessImport.hpp:37
Misc.hpp
mgx::Vector< 3, double >
mgx::stringToPoint3d
Point3d stringToPoint3d(const QString &s)
Convert a string to Point3d.
Definition: Misc.hpp:136
mgx::Load3DFrom2View::Load3DFrom2View
Load3DFrom2View(const Process &process)
Definition: MeshProcessImport.hpp:22
mgx::Process::mesh
Mesh * mesh(int i)
Returns the ith mesh.
mgx::ProcessParms::setName
bool setName(const QString &name)
Set the name.
mgx::ProcessParms::parm
QString parm(const QString &name) const
Get a single parameter value by name.
mgx::Process::currentMesh
Mesh * currentMesh()
Returns the current mesh (i.e.