VTK  9.1.0
vtkProjectedTerrainPath.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkProjectedTerrainPath.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
68#ifndef vtkProjectedTerrainPath_h
69#define vtkProjectedTerrainPath_h
70
71#include "vtkFiltersHybridModule.h" // For export macro
73
75class vtkImageData;
76class vtkEdgeList;
77class vtkPoints;
78
79class VTKFILTERSHYBRID_EXPORT vtkProjectedTerrainPath : public vtkPolyDataAlgorithm
80{
81public:
83
87 void PrintSelf(ostream& os, vtkIndent indent) override;
89
94
96
105
111
112 enum
113 {
114 SIMPLE_PROJECTION = 0,
116 HUG_PROJECTION
117 };
118
120
128 vtkSetClampMacro(ProjectionMode, int, SIMPLE_PROJECTION, HUG_PROJECTION);
129 vtkGetMacro(ProjectionMode, int);
130 void SetProjectionModeToSimple() { this->SetProjectionMode(SIMPLE_PROJECTION); }
131 void SetProjectionModeToNonOccluded() { this->SetProjectionMode(NONOCCLUDED_PROJECTION); }
132 void SetProjectionModeToHug() { this->SetProjectionMode(HUG_PROJECTION); }
134
136
141 vtkSetMacro(HeightOffset, double);
142 vtkGetMacro(HeightOffset, double);
144
146
151 vtkSetClampMacro(HeightTolerance, double, 0.0, VTK_FLOAT_MAX);
152 vtkGetMacro(HeightTolerance, double);
154
156
161 vtkSetClampMacro(MaximumNumberOfLines, vtkIdType, 1, VTK_ID_MAX);
162 vtkGetMacro(MaximumNumberOfLines, vtkIdType);
164
165protected:
168
170 int FillInputPortInformation(int port, vtkInformation* info) override;
171
172 // Supporting methods
173 void GetImageIndex(double x[3], double loc[2], int ij[2]);
174 double GetHeight(double loc[2], int ij[2]);
178 void SplitEdge(vtkIdType eId, double t);
179
180 // ivars that the API addresses
185
186 // Bookkeeping arrays
187 int Dimensions[3];
188 int Extent[6];
189 double Origin[3];
190 double Spacing[3];
194
195 // Errors above/below terrain. In both instances, negative values are
196 // inserted because the priority queue puts smallest values on top.
197 vtkPriorityQueue* PositiveLineError; // errors above terrain
198 vtkPriorityQueue* NegativeLineError; // errors below terrain
199
200 // This is a PIMPL'd vector representing edges
201 vtkEdgeList* EdgeList;
202
203private:
205 void operator=(const vtkProjectedTerrainPath&) = delete;
206};
207
208#endif
Proxy object to connect input/output ports.
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:159
topologically and geometrically regular array of data
Definition: vtkImageData.h:157
a simple class to control print indentation
Definition: vtkIndent.h:113
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition: vtkPoints.h:143
Superclass for algorithms that produce only polydata as output.
a list of ids arranged in priority order
project a polyline onto a terrain
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
~vtkProjectedTerrainPath() override
void SetSourceData(vtkImageData *source)
Specify the second input (the terrain) onto which the polyline(s) should be projected.
void SetProjectionModeToNonOccluded()
Determine how to control the projection process.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
double GetHeight(double loc[2], int ij[2])
void ComputeError(vtkIdType edgeId)
vtkPriorityQueue * PositiveLineError
void SetProjectionModeToHug()
Determine how to control the projection process.
void SplitEdge(vtkIdType eId, double t)
static vtkProjectedTerrainPath * New()
Instantiate the class.
void SetSourceConnection(vtkAlgorithmOutput *algOutput)
Specify the second input (the terrain) onto which the polyline(s) should be projected.
void GetImageIndex(double x[3], double loc[2], int ij[2])
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for printing and determining type information.
void SetProjectionModeToSimple()
Determine how to control the projection process.
vtkImageData * GetSource()
Specify the second input (the terrain) onto which the polyline(s) should be projected.
vtkPriorityQueue * NegativeLineError
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
int vtkIdType
Definition: vtkType.h:332
#define VTK_ID_MAX
Definition: vtkType.h:336
#define VTK_FLOAT_MAX
Definition: vtkType.h:163