VTK  9.3.0
vtkFitToHeightMapFilter.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
54#ifndef vtkFitToHeightMapFilter_h
55#define vtkFitToHeightMapFilter_h
56
57#include "vtkFiltersModelingModule.h" // For export macro
59
60VTK_ABI_NAMESPACE_BEGIN
61class vtkImageData;
62
63class VTKFILTERSMODELING_EXPORT vtkFitToHeightMapFilter : public vtkPolyDataAlgorithm
64{
65public:
67
72 void PrintSelf(ostream& os, vtkIndent indent) override;
74
82
84
89
91
97
98 // Strategies to fit the polydata.
100 {
101 POINT_PROJECTION = 0,
102 POINT_MINIMUM_HEIGHT = 1,
103 POINT_MAXIMUM_HEIGHT = 2,
104 POINT_AVERAGE_HEIGHT = 3,
105 CELL_MINIMUM_HEIGHT = 4,
106 CELL_MAXIMUM_HEIGHT = 5,
107 CELL_AVERAGE_HEIGHT = 6,
108 };
109
111
123 vtkSetMacro(FittingStrategy, int);
124 vtkGetMacro(FittingStrategy, int);
125 void SetFittingStrategyToPointProjection() { this->SetFittingStrategy(POINT_PROJECTION); }
126 void SetFittingStrategyToPointMinimumHeight() { this->SetFittingStrategy(POINT_MINIMUM_HEIGHT); }
127 void SetFittingStrategyToPointMaximumHeight() { this->SetFittingStrategy(POINT_MAXIMUM_HEIGHT); }
128 void SetFittingStrategyToAverageHeight() { this->SetFittingStrategy(POINT_AVERAGE_HEIGHT); }
129 void SetFittingStrategyToCellMinimumHeight() { this->SetFittingStrategy(CELL_MINIMUM_HEIGHT); }
130 void SetFittingStrategyToCellMaximumHeight() { this->SetFittingStrategy(CELL_MAXIMUM_HEIGHT); }
131 void SetFittingStrategyToCellAverageHeight() { this->SetFittingStrategy(CELL_AVERAGE_HEIGHT); }
133
135
141 vtkSetMacro(UseHeightMapOffset, vtkTypeBool);
142 vtkGetMacro(UseHeightMapOffset, vtkTypeBool);
143 vtkBooleanMacro(UseHeightMapOffset, vtkTypeBool);
145
146protected:
149
152
155 double Offset;
156
157 void AdjustPoints(vtkPolyData* output, vtkIdType numCells, vtkPoints* newPts);
159 vtkPolyData* output, vtkIdType numCells, double* cellHts, vtkPoints* inPts, vtkPoints* newPts);
160
161private:
163 void operator=(const vtkFitToHeightMapFilter&) = delete;
164};
165
166VTK_ABI_NAMESPACE_END
167#endif
Proxy object to connect input/output ports.
adjust polydata to fit image height map
void SetFittingStrategyToPointProjection()
Specify a strategy for fitting, or projecting, the polydata to the height field.
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
void SetFittingStrategyToCellMinimumHeight()
Specify a strategy for fitting, or projecting, the polydata to the height field.
~vtkFitToHeightMapFilter() override
void SetFittingStrategyToCellAverageHeight()
Specify a strategy for fitting, or projecting, the polydata to the height field.
void AdjustPoints(vtkPolyData *output, vtkIdType numCells, vtkPoints *newPts)
void SetFittingStrategyToCellMaximumHeight()
Specify a strategy for fitting, or projecting, the polydata to the height field.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for construction, type and printing.
void SetHeightMapConnection(vtkAlgorithmOutput *algOutput)
Specify the pipeline connection to the height map.
void SetFittingStrategyToPointMinimumHeight()
Specify a strategy for fitting, or projecting, the polydata to the height field.
vtkImageData * GetHeightMap()
Get a pointer to the height map.
void AdjustCells(vtkPolyData *output, vtkIdType numCells, double *cellHts, vtkPoints *inPts, vtkPoints *newPts)
vtkImageData * GetHeightMap(vtkInformationVector *sourceInfo)
Get a pointer to the height map.
void SetHeightMapData(vtkImageData *idata)
Set the height map for the filter.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
static vtkFitToHeightMapFilter * New()
Standard methods for construction, type and printing.
void SetFittingStrategyToPointMaximumHeight()
Specify a strategy for fitting, or projecting, the polydata to the height field.
void SetFittingStrategyToAverageHeight()
Specify a strategy for fitting, or projecting, the polydata to the height field.
topologically and geometrically regular array of data
a simple class to control print indentation
Definition vtkIndent.h:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition vtkPoints.h:29
Superclass for algorithms that produce only polydata as output.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition vtkPolyData.h:80
int vtkTypeBool
Definition vtkABI.h:64
int vtkIdType
Definition vtkType.h:315