VTK  9.6.20260411
vtkDataSetAttributesFieldList.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
42
43#ifndef vtkDataSetAttributesFieldList_h
44#define vtkDataSetAttributesFieldList_h
45
46#include "vtkCommonDataModelModule.h" // For export macro
47#include "vtkSmartPointer.h" // for vtkSmartPointer
48#include "vtkSystemIncludes.h"
49
50#include <functional> // for std::function
51#include <memory> // for unique_ptr
52
53VTK_ABI_NAMESPACE_BEGIN
56class vtkFieldData;
57class vtkIdList;
58
59class VTKCOMMONDATAMODEL_EXPORT vtkDataSetAttributesFieldList
60{
61public:
66 vtkDataSetAttributesFieldList(int number_of_inputs = 0);
68 void PrintSelf(ostream& os, vtkIndent indent);
69
73 void Reset();
74
82
88
94
99 void GenerateCompositeArray(std::vector<vtkFieldData*> fields, vtkDataSetAttributes* outputData);
100
102
108 void CopyAllocate(vtkDataSetAttributes* output, int ctype, vtkIdType sz, vtkIdType ext) const;
109 void CopyData(int inputIndex, vtkDataSetAttributes* input, vtkIdType fromId,
110 vtkDataSetAttributes* output, vtkIdType toId) const;
111 void CopyData(int inputIndex, vtkDataSetAttributes* input, vtkIdType inputStart,
112 vtkIdType numValues, vtkDataSetAttributes* output, vtkIdType outStart) const;
113 void InterpolatePoint(int inputIndex, vtkDataSetAttributes* input, vtkIdList* inputIds,
114 double* weights, vtkDataSetAttributes* output, vtkIdType toId) const;
116
121 void TransformData(int inputIndex, vtkFieldData* input, vtkFieldData* output,
122 std::function<void(vtkAbstractArray*, vtkAbstractArray*)> op) const;
123
130
143 void BuildPrototype(vtkDataSetAttributes* protoDSA, vtkDataSetAttributes* ordering = nullptr);
144
145protected:
151
152private:
153 class vtkInternals;
154 std::unique_ptr<vtkInternals> Internals;
155
157 void operator=(vtkDataSetAttributesFieldList&) = delete;
158};
159
160VTK_ABI_NAMESPACE_END
161#endif
162// VTK-HeaderTest-Exclude: vtkDataSetAttributesFieldList.h
Abstract superclass for all arrays.
int GetNumberOfArrays()
This method can be used to determine the number of arrays remaining after intersection or union opera...
void PrintSelf(ostream &os, vtkIndent indent)
void Reset()
Initializes the field list to empty.
void InitializeFieldList(vtkDataSetAttributes *dsa)
Initialize the field list.
virtual vtkSmartPointer< vtkAbstractArray > CreateArray(int type) const
Called to create an output array for the given type.
void BuildPrototype(vtkDataSetAttributes *protoDSA, vtkDataSetAttributes *ordering=nullptr)
A convenience function that builds a prototype / template dataset attributes for initializing the pro...
void IntersectFieldList(vtkDataSetAttributes *dsa)
Update the field list for an intersection of arrays registered so far and those in dsa.
void InterpolatePoint(int inputIndex, vtkDataSetAttributes *input, vtkIdList *inputIds, double *weights, vtkDataSetAttributes *output, vtkIdType toId) const
These methods can called to generate and update the output vtkDataSetAttributes.
void CopyData(int inputIndex, vtkDataSetAttributes *input, vtkIdType inputStart, vtkIdType numValues, vtkDataSetAttributes *output, vtkIdType outStart) const
These methods can called to generate and update the output vtkDataSetAttributes.
void TransformData(int inputIndex, vtkFieldData *input, vtkFieldData *output, std::function< void(vtkAbstractArray *, vtkAbstractArray *)> op) const
Use this method to provide a custom callback function to invoke for each array in the input and corre...
void GenerateCompositeArray(std::vector< vtkFieldData * > fields, vtkDataSetAttributes *outputData)
Generate a composite array from the provided fields that are registered so far and add them in the ou...
void CopyAllocate(vtkDataSetAttributes *output, int ctype, vtkIdType sz, vtkIdType ext) const
These methods can called to generate and update the output vtkDataSetAttributes.
void UnionFieldList(vtkDataSetAttributes *dsa)
Update the field list for an union of arrays registered so far and those in dsa.
void CopyData(int inputIndex, vtkDataSetAttributes *input, vtkIdType fromId, vtkDataSetAttributes *output, vtkIdType toId) const
These methods can called to generate and update the output vtkDataSetAttributes.
vtkDataSetAttributesFieldList(int number_of_inputs=0)
number_of_inputs parameter is not required and only provided for backwards compatibility.
represent and manipulate attribute data in a dataset
Represents and manipulates a collection of data arrays.
list of point or cell ids
Definition vtkIdList.h:135
a simple class to control print indentation
Definition vtkIndent.h:108
Hold a reference to a vtkObjectBase instance.
int vtkIdType
Definition vtkType.h:363