39 #ifndef VTK_STANDARD_MESH_REPRESENTER_H_
40 #define VTK_STANDARD_MESH_REPRESENTER_H_
44 #include <vtkPolyData.h>
45 #include <vtkSmartPointer.h>
47 #include "CommonTypes.h"
49 #include "Representer.h"
50 #include "vtkHelper.h"
56 struct RepresenterTraits<vtkPolyData> {
57 typedef vtkPolyData* DatasetPointerType;
58 typedef const vtkPolyData* DatasetConstPointerType;
60 typedef vtkPoint PointType;
61 typedef vtkPoint ValueType;
90 void Load(
const H5::Group& fg);
100 std::string GetName()
const {
101 return "vtkStandardMeshRepresenter";
103 unsigned GetDimensions()
const {
106 std::string GetVersion()
const {
109 RepresenterDataType GetType()
const {
116 void DeleteDataset(DatasetPointerType d)
const {
120 DatasetPointerType CloneDataset(DatasetConstPointerType d)
const {
121 vtkPolyData* clone = vtkPolyData::New();
122 clone->DeepCopy(const_cast<vtkPolyData*>(d));
126 DatasetConstPointerType GetReference()
const {
129 statismo::VectorType PointToVector(
const PointType& pt)
const;
130 statismo::VectorType SampleToSampleVector(DatasetConstPointerType sample)
const;
131 DatasetPointerType SampleVectorToSample(
const statismo::VectorType& sample)
const;
133 ValueType PointSampleFromSample(DatasetConstPointerType sample,
unsigned ptid)
const;
134 statismo::VectorType PointSampleToPointSampleVector(
const ValueType& v)
const;
135 ValueType PointSampleVectorToPointSample(
const statismo::VectorType& pointSample)
const;
138 void Save(
const H5::Group& fg)
const;
139 unsigned GetNumberOfPoints()
const;
140 unsigned GetPointIdForPoint(
const PointType& point)
const;
151 void SetReference(
const vtkPolyData* reference);
153 vtkPolyData* LoadRefLegacy(
const H5::Group& fg)
const;
154 vtkPolyData* LoadRef(
const H5::Group& fg)
const;
156 void WriteDataArray(
const H5::CommonFG& group,
const std::string& name,
const vtkDataArray* ds)
const;
157 static vtkDataArray* GetAsDataArray(
const H5::Group& group,
const std::string& name);
158 static void FillDataArray(
const statismo::GenericEigenType<double>::MatrixType& m, vtkDataArray* dataArray);
159 DatasetPointerType m_reference;
A representer for vtkPolyData, which stores the represnter data in the standard mesh format defined f...
Definition: vtkStandardMeshRepresenter.h:77