VTK  9.7.20260709
vtkTableToRectilinearGrid.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
49
50#ifndef vtkTableToRectilinearGrid_h
51#define vtkTableToRectilinearGrid_h
52
53#include "vtkFiltersGeneralModule.h" // For export macro
55#include "vtkSmartPointer.h" // for smart pointer
56
57#include <string>
58
59VTK_ABI_NAMESPACE_BEGIN
60class vtkDataArray;
61class vtkDoubleArray;
62class vtkIdTypeArray;
64class vtkTable;
65
66class VTKFILTERSGENERAL_EXPORT vtkTableToRectilinearGrid : public vtkRectilinearGridAlgorithm
67{
68public:
71 void PrintSelf(ostream& os, vtkIndent indent) override;
72
74
77 void SetXColumn(const std::string& name);
78 std::string GetXColumn();
80
82
85 void SetYColumn(const std::string& name);
86 std::string GetYColumn();
88
90
93 void SetZColumn(const std::string& name);
94 std::string GetZColumn();
96
100 void SetXYZColumns(const std::string& xname, const std::string& yname, const std::string& zname);
101
102protected:
104 ~vtkTableToRectilinearGrid() override = default;
105
107 vtkInformationVector* outputVector) override;
108
112 int FillInputPortInformation(int port, vtkInformation* info) override;
113
114private:
116 void operator=(const vtkTableToRectilinearGrid&) = delete;
117
122 void SetCoordinateArrays(vtkInformationVector** inputInfo, vtkRectilinearGrid* output);
123
128 bool ComputeCoordinateArray(vtkDataArray* column, vtkDoubleArray* coords);
129
137 void ColumnsToPointData(vtkTable* table, vtkRectilinearGrid* grid, vtkIdTypeArray* pointToRow);
138
142 vtkSmartPointer<vtkIdTypeArray> ComputePointToRowMap(
143 vtkInformationVector** inputInfo, vtkTable* inputTable, vtkRectilinearGrid* grid);
144
151 void MarkBlanks(vtkRectilinearGrid* grid, vtkIdTypeArray* map);
152};
153
154VTK_ABI_NAMESPACE_END
155#endif
dynamic, self-adjusting array of double
dynamic, self-adjusting array of vtkIdType
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
a dataset that is topologically regular with variable spacing in the three coordinate directions
Hold a reference to a vtkObjectBase instance.
int FillInputPortInformation(int port, vtkInformation *info) override
Overriden to accept only vtkTable as input.
~vtkTableToRectilinearGrid() override=default
void SetXColumn(const std::string &name)
Set/Get the name of the column to use as X coordinates.
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called by the superclass.
static vtkTableToRectilinearGrid * New()
std::string GetYColumn()
Set/Get the name of the column to use as Y coordinates.
void SetZColumn(const std::string &name)
Set/Get the name of the column to use as Z coordinates.
void SetXYZColumns(const std::string &xname, const std::string &yname, const std::string &zname)
Convenience method to set the three column names, in X, Y and Z order.
std::string GetXColumn()
Set/Get the name of the column to use as X coordinates.
std::string GetZColumn()
Set/Get the name of the column to use as Z coordinates.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetYColumn(const std::string &name)
Set/Get the name of the column to use as Y coordinates.
A table, which contains similar-typed columns of data.
Definition vtkTable.h:169
#define vtkDataArray