69 #ifndef __vtkGreedyTerrainDecimation_h
70 #define __vtkGreedyTerrainDecimation_h
72 #include "vtkFiltersHybridModule.h"
75 class vtkPriorityQueue;
83 class vtkGreedyTerrainDecimationTerrainInfoType;
84 class vtkGreedyTerrainDecimationPointInfoType;
86 #define VTK_ERROR_NUMBER_OF_TRIANGLES 0
87 #define VTK_ERROR_SPECIFIED_REDUCTION 1
88 #define VTK_ERROR_ABSOLUTE 2
89 #define VTK_ERROR_RELATIVE 3
95 void PrintSelf(ostream& os, vtkIndent indent);
107 vtkGetMacro(ErrorMeasure,
int);
123 vtkSetClampMacro(NumberOfTriangles,vtkIdType,2,VTK_ID_MAX);
124 vtkGetMacro(NumberOfTriangles,vtkIdType);
131 vtkSetClampMacro(Reduction,
double,0.0,1.0);
132 vtkGetMacro(Reduction,
double);
140 vtkSetClampMacro(AbsoluteError,
double,0.0,VTK_DOUBLE_MAX);
141 vtkGetMacro(AbsoluteError,
double);
149 vtkSetClampMacro(RelativeError,
double,0.0,VTK_DOUBLE_MAX);
150 vtkGetMacro(RelativeError,
double);
156 vtkSetMacro(BoundaryVertexDeletion,
int);
157 vtkGetMacro(BoundaryVertexDeletion,
int);
158 vtkBooleanMacro(BoundaryVertexDeletion,
int);
163 vtkSetMacro(ComputeNormals,
int);
164 vtkGetMacro(ComputeNormals,
int);
165 vtkBooleanMacro(ComputeNormals,
int);
172 virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
177 void ComputePointNormal(
int i,
int j,
float n[3]);
208 void EstimateOutputSize(
const vtkIdType numInputPts, vtkIdType &numPts, vtkIdType &numTris);
211 virtual int SatisfiesErrorMeasure(
double error);
214 void InsertBoundaryVertices();
217 vtkIdType AddPointToTriangulation(vtkIdType inputPtId);
218 vtkIdType InsertNextPoint(vtkIdType inputPtId,
double x[3]);
219 double *GetPoint(vtkIdType
id);
220 void GetPoint(vtkIdType
id,
double x[3]);
223 void GetTerrainPoint(
int i,
int j,
double x[3]);
224 void ComputeImageCoordinates(vtkIdType inputPtId,
int ij[2]);
225 int InCircle (
double x[3],
double x1[3],
double x2[3],
double x3[3]);
226 vtkIdType FindTriangle(
double x[3], vtkIdType ptIds[3], vtkIdType tri,
227 double tol, vtkIdType nei[3], vtkIdList *neighbors,
int& status);
228 void CheckEdge(vtkIdType ptId,
double x[3], vtkIdType p1, vtkIdType p2,
229 vtkIdType tri,
int depth);
231 void UpdateTriangles(vtkIdType meshPtId);
232 void UpdateTriangle(vtkIdType triId, vtkIdType p1, vtkIdType p2, vtkIdType p3);
233 void UpdateTriangle(vtkIdType triId,
int ij1[2],
int ij2[2],
int ij3[2],
double h[4]);
235 int CharacterizeTriangle(
int ij1[2],
int ij2[2],
int ij[3],
236 int* &min,
int* &max,
int* &midL,
int* &midR,
237 int* &mid,
int mid2[2],
double h[3],
double &hMin,
double &hMax,
238 double &hL,
double &hR);
#define VTK_ERROR_SPECIFIED_REDUCTION
virtual int FillInputPortInformation(int port, vtkInformation *info)
vtkIdType NumberOfTriangles
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
vtkPriorityQueue * TerrainError
vtkGreedyTerrainDecimationPointInfoType * PointInfo
void SetErrorMeasureToAbsoluteError()
concrete dataset represents vertices, lines, polygons, and triangle strips
static vtkPolyDataAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent)
Superclass for algorithms that produce only polydata as output.
#define VTK_ERROR_ABSOLUTE
void SetErrorMeasureToRelativeError()
vtkGreedyTerrainDecimationTerrainInfoType * TerrainInfo
void SetErrorMeasureToNumberOfTriangles()
#define VTK_ERROR_NUMBER_OF_TRIANGLES
void SetErrorMeasureToSpecifiedReduction()
#define VTK_ERROR_RELATIVE
vtkIdType MaximumNumberOfTriangles
int BoundaryVertexDeletion
reduce height field (represented as image) to reduced TIN