MorphoGraphX
2.0-1-227
src
MeshProcessMulti.hpp
Go to the documentation of this file.
1
//
2
// This file is part of MorphoGraphX - http://www.MorphoGraphX.org
3
// Copyright (C) 2012-2015 Richard S. Smith and collaborators.
4
//
5
// If you use MorphoGraphX in your work, please cite:
6
// http://dx.doi.org/10.7554/eLife.05864
7
//
8
// MorphoGraphX is free software, and is licensed under under the terms of the
9
// GNU General (GPL) Public License version 2.0, http://www.gnu.org/licenses.
10
//
11
#ifndef MESH_PROCESS_MULTI_HPP
12
#define MESH_PROCESS_MULTI_HPP
13
14
#include <
Process.hpp
>
15
16
namespace
mgx
17
{
20
25
class
mgxBase_EXPORT
CopySwapMeshes
:
public
Process
26
{
27
public
:
28
CopySwapMeshes
(
const
Process
& process) :
Process
(process)
29
{
30
setName(
"Mesh/MultiMesh/Swap or Copy Mesh 1 and 2"
);
31
setDesc(
"Copy or Swap Mesh 1 and 2"
);
32
setIcon(QIcon(
":/images/CopySwapStacks.png"
));
33
34
addParm(
"Action"
,
"Action"
,
"1 -> 2"
, QStringList() <<
"1 -> 2"
<<
"1 <- 2"
<<
"1 <-> 2"
);
35
}
36
37
bool
run
()
38
{
39
bool
res = run(parm(
"Action"
));
40
return
res;
41
}
42
43
bool
run(
const
QString& actionStr);
44
45
};
46
52
class
mgxBase_EXPORT
MeshAddOtherMesh
:
public
Process
53
{
54
public
:
55
MeshAddOtherMesh
(
const
Process
& process) :
Process
(process)
56
{
57
setName(
"Mesh/MultiMesh/Add Other Mesh"
);
58
setDesc(
"Adds all vertices and edges from the other mesh to the active mesh. Relabel if vertices have identical labels."
);
59
setIcon(QIcon(
":/images/CopySwapStacks.png"
));
60
61
addParm(
"Relabel cells"
,
"Relabel cells"
,
"Yes"
,booleanChoice());
62
}
63
64
bool
run
()
65
{
66
67
const
Stack
*s1 = currentStack();
68
const
Stack
*s2 = otherStack();
69
Mesh
* m = currentMesh();
70
Mesh
* m2 = otherMesh();
71
bool
res = run(s1, s2, m, m2,
stringToBool
(parm(
"Relabel cells"
)));
72
return
res;
73
}
74
75
bool
run(
const
Stack
*s1,
const
Stack
*s2,
Mesh
* m,
Mesh
* m2,
bool
relabel);
76
77
78
};
79
81
}
82
83
#endif
mgx::CopySwapMeshes::CopySwapMeshes
CopySwapMeshes(const Process &process)
Definition:
MeshProcessMulti.hpp:28
Process.hpp
mgx::Stack
Definition:
Stack.hpp:33
mgx
Distributed matrix library.
Definition:
Assert.hpp:26
mgx::Process
Definition:
Process.hpp:219
mgx::MeshAddOtherMesh::run
bool run()
Runs the process.
Definition:
MeshProcessMulti.hpp:64
mgx::stringToBool
mgx_EXPORT bool stringToBool(const QString &string)
Helper function converting a string into a boolean.
mgx::CopySwapMeshes
Definition:
MeshProcessMulti.hpp:25
mgx::Mesh
Definition:
Mesh.hpp:54
mgx::MeshAddOtherMesh
Definition:
MeshProcessMulti.hpp:52
mgx::MeshAddOtherMesh::MeshAddOtherMesh
MeshAddOtherMesh(const Process &process)
Definition:
MeshProcessMulti.hpp:55
mgx::CopySwapMeshes::run
bool run()
Runs the process.
Definition:
MeshProcessMulti.hpp:37
Generated on Fri Jul 9 2021 18:34:54 for MorphoGraphX by
1.8.17