1 #ifndef MEAN_VALUE_COORDINATES_MODEL_HPP
2 #define MEAN_VALUE_COORDINATES_MODEL_HPP
16 void loadMeshes(std::string surfaceMeshFilename, std::string controlMeshFilename);
19 MatrixXf getStateTransitionMatrix1();
20 MatrixXf getStateTransitionMatrix2();
21 MatrixXf getStateTransitionMatrix3();
22 MatrixXf getProcessErrorMatrix();
23 VectorXf getInitialState(std::shared_ptr<Image> image);
24 std::vector<MatrixXf> getMeasurementVectors(VectorXf state,
Shape::pointer shape);
25 void initializeShapeToImageCenter();
26 void setInitialScaling(
float x,
float y,
float z);
27 void setInitialTranslation(
float x,
float y,
float z);
28 void setLocalProcessError(
float error);
29 void setGlobalProcessError(
float error);
32 VectorXf getState(Vector3f translation, Vector3f scale, Vector3f rotation);
33 void assertLoadedMeshes();
34 void setNormalizedWeight(
37 const int triangleVertexNr,
40 float getNormalizedWeight(
const int vertexNr,
const int triangleNr,
const int triangleVertexNr);
41 float getNormalizedWeight(
const uint vertexNr,
const uint i);
42 void setNormalizedWeightPerNode(
44 const uint controlNodeNr
46 std::vector<MeshVertex> getDeformedVertices(
const std::vector<Vector3f>& displacements);
47 std::vector<MeshVertex> getOriginalVertices();
51 std::unordered_map<uint, std::vector<uint>> mModelVertexTrianglesMap;
52 std::unordered_map<uint, std::vector<uint>> mControlVertexTrianglesMap;
55 std::unique_ptr<float[]> mNormalizedWeights;
56 std::unique_ptr<float[]> mNormalizedWeightsPerNode;
62 MatrixXf mProcessErrorMatrix;
64 bool mInitializeShapeToImageCenter;
65 Vector3f mInitialScaling;
66 Vector3f mInitialTranslation;
67 float mLocalProcessError;
68 float mGlobalProcessError;