39 #ifndef vtkUnstructuredGridREPRESENTER_H_
40 #define vtkUnstructuredGridREPRESENTER_H_
44 #include <vtkLandmarkTransform.h>
45 #include <vtkSmartPointer.h>
46 #include <vtkTransform.h>
47 #include <vtkTransformPolyDataFilter.h>
48 #include <vtkUnstructuredGrid.h>
50 #include "CommonTypes.h"
52 #include "vtkHelper.h"
73 typedef const vtkUnstructuredGrid* DatasetConstPointerType;
80 struct DatasetInfo {};
86 RIGID=VTK_LANDMARK_RIGIDBODY,
87 SIMILARITY=VTK_LANDMARK_SIMILARITY,
88 AFFINE=VTK_LANDMARK_AFFINE
105 static std::string GetName() {
106 return "vtkUnstructuredGridRepresenter";
108 static unsigned GetDimensions() {
116 AlignmentType GetAlignment()
const {
120 DatasetConstPointerType GetReference()
const {
124 statismo::VectorType PointToVector(
const PointType& pt)
const;
125 DatasetPointerType DatasetToSample(DatasetConstPointerType ds, DatasetInfo* notUsed)
const;
126 statismo::VectorType SampleToSampleVector(DatasetConstPointerType sample)
const;
129 ValueType PointSampleFromSample(DatasetConstPointerType sample,
unsigned ptid)
const;
130 statismo::VectorType PointSampleToPointSampleVector(
const ValueType& v)
const;
131 ValueType PointSampleVectorToPointSample(
const statismo::VectorType& pointSample)
const;
134 void Save(
const H5::CommonFG& fg)
const;
135 unsigned GetNumberOfPoints()
const;
136 unsigned GetPointIdForPoint(
const PointType& point)
const;
147 static unsigned MapPointIdToInternalIdx(
unsigned ptId,
unsigned componentInd) {
148 return ptId * GetDimensions() + componentInd;
161 static void WriteDataset(
const std::string& filename, DatasetConstPointerType pd) ;
166 vtkTransformPolyDataFilter* m_pdTransform;
167 AlignmentType m_alignment;
vtkUnstructuredGrid * DatasetPointerType
The type of the data set to be used.
Definition: vtkUnstructuredGridRepresenter.h:72
A representer for vtkUnstructuredGrid using Procrustes alignment to align the datasets.
Definition: vtkUnstructuredGridRepresenter.h:68
Helper class that represents a vtkPoint. In vtk a point is just of type T*. The statismo library reli...
Definition: vtkHelper.h:119