VTK
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=========================================================================*/
71#ifndef vtkProjectedTerrainPath_h
72#define vtkProjectedTerrainPath_h
73
74#include "vtkFiltersHybridModule.h" // For export macro
76
78class vtkImageData;
79class vtkEdgeList;
80class vtkPoints;
81
82class VTKFILTERSHYBRID_EXPORT vtkProjectedTerrainPath : public vtkPolyDataAlgorithm
83{
84public:
86
90 void PrintSelf(ostream& os, vtkIndent indent);
92
97
99
108
114
115 enum {SIMPLE_PROJECTION=0,NONOCCLUDED_PROJECTION,HUG_PROJECTION};
116
118
126 vtkSetClampMacro(ProjectionMode,int,SIMPLE_PROJECTION,HUG_PROJECTION);
127 vtkGetMacro(ProjectionMode,int);
129 {this->SetProjectionMode(SIMPLE_PROJECTION);}
131 {this->SetProjectionMode(NONOCCLUDED_PROJECTION);}
133 {this->SetProjectionMode(HUG_PROJECTION);}
135
137
142 vtkSetMacro(HeightOffset,double);
143 vtkGetMacro(HeightOffset,double);
145
147
152 vtkSetClampMacro(HeightTolerance,double,0.0,VTK_FLOAT_MAX);
153 vtkGetMacro(HeightTolerance,double);
155
157
162 vtkSetClampMacro(MaximumNumberOfLines,vtkIdType,1,VTK_ID_MAX);
163 vtkGetMacro(MaximumNumberOfLines,vtkIdType);
165
166protected:
169
173
174 // Supporting methods
175 void GetImageIndex(double x[3], double loc[2], int ij[2]);
176 double GetHeight(double loc[2], int ij[2]);
180 void SplitEdge(vtkIdType eId, double t);
181
182 //ivars that the API addresses
187
188 //Bookeeping arrays
189 int Dimensions[3];
190 int Extent[6];
191 double Origin[3];
192 double Spacing[3];
196
197 //Errors above/below terrain. In both instances, negative values are
198 //inserted because the priority queue puts smallest values on top.
199 vtkPriorityQueue *PositiveLineError; //errors above terrain
200 vtkPriorityQueue *NegativeLineError; //errors below terrain
201
202 //This is a PIMPL'd vector representing edges
203 vtkEdgeList *EdgeList;
204
205private:
206 vtkProjectedTerrainPath(const vtkProjectedTerrainPath&) VTK_DELETE_FUNCTION;
207 void operator=(const vtkProjectedTerrainPath&) VTK_DELETE_FUNCTION;
208
209};
210
211#endif
Proxy object to connect input/output ports.
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
topologically and geometrically regular array of data
Definition: vtkImageData.h:46
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition: vtkPoints.h:40
Superclass for algorithms that produce only polydata as output.
a list of ids arranged in priority order
project a polyline onto a terrain
void SetSourceData(vtkImageData *source)
Specify the second input (the terrain) onto which the polyline(s) should be projected.
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
double GetHeight(double loc[2], int ij[2])
void ComputeError(vtkIdType edgeId)
vtkPriorityQueue * PositiveLineError
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])
vtkImageData * GetSource()
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkPriorityQueue * NegativeLineError
@ info
Definition: vtkX3D.h:376
@ port
Definition: vtkX3D.h:447
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
int vtkIdType
Definition: vtkType.h:287
#define VTK_ID_MAX
Definition: vtkType.h:291
#define VTK_FLOAT_MAX
Definition: vtkType.h:161