VTK: Common/DataModel/vtkDataSetAttributesFieldList.h Source File

| VTK 9.3.1

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
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
53 VTK_ABI_NAMESPACE_BEGIN
54 class vtkAbstractArray;
55 class vtkDataSetAttributes;
56 class vtkIdList;
57
58 class VTKCOMMONDATAMODEL_EXPORT vtkDataSetAttributesFieldList
59 {
60 public:
65 vtkDataSetAttributesFieldList(int number_of_inputs = 0);
66 virtual ~vtkDataSetAttributesFieldList();
67 void PrintSelf(ostream& os, vtkIndent indent);
68
72 void Reset();
73
80 void InitializeFieldList(vtkDataSetAttributes* dsa);
81
86 void IntersectFieldList(vtkDataSetAttributes* dsa);
87
92 void UnionFieldList(vtkDataSetAttributes* dsa);
93
95
101 void CopyAllocate(vtkDataSetAttributes* output, int ctype, vtkIdType sz, vtkIdType ext) const;
102 void CopyData(int inputIndex, vtkDataSetAttributes* input, vtkIdType fromId,
103 vtkDataSetAttributes* output, vtkIdType toId) const;
104 void CopyData(int inputIndex, vtkDataSetAttributes* input, vtkIdType inputStart,
105 vtkIdType numValues, vtkDataSetAttributes* output, vtkIdType outStart) const;
106 void InterpolatePoint(int inputIndex, vtkDataSetAttributes* input, vtkIdList* inputIds,
107 double* weights, vtkDataSetAttributes* output, vtkIdType toId) const;
109
114 void TransformData(int inputIndex, vtkDataSetAttributes* input, vtkDataSetAttributes* output,
115 std::function<void(vtkAbstractArray*, vtkAbstractArray*)> op) const;
116
122 int GetNumberOfArrays();
123
136 void BuildPrototype(vtkDataSetAttributes* protoDSA, vtkDataSetAttributes* ordering = nullptr);
137
138 protected:
143 virtual vtkSmartPointer<vtkAbstractArray> CreateArray(int type) const;
144
145 private:
146 class vtkInternals;
147 std::unique_ptr<vtkInternals> Internals;
148
149 vtkDataSetAttributesFieldList(const vtkDataSetAttributesFieldList&) = delete;
150 void operator=(vtkDataSetAttributesFieldList&) = delete;
151 };
152
153 VTK_ABI_NAMESPACE_END
154 #endif
155 // VTK-HeaderTest-Exclude: vtkDataSetAttributesFieldList.h
vtkAbstractArray
Abstract superclass for all arrays.
Definition: vtkAbstractArray.h:76
vtkDataSetAttributesFieldList
helps manage arrays from multiple vtkDataSetAttributes.
Definition: vtkDataSetAttributesFieldList.h:59
vtkDataSetAttributesFieldList::GetNumberOfArrays
int GetNumberOfArrays()
This method can be used to determine the number of arrays remaining after intersection or union opera...
vtkDataSetAttributesFieldList::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkDataSetAttributesFieldList::Reset
void Reset()
Initializes the field list to empty.
vtkDataSetAttributesFieldList::InitializeFieldList
void InitializeFieldList(vtkDataSetAttributes *dsa)
Initialize the field list.
vtkDataSetAttributesFieldList::~vtkDataSetAttributesFieldList
virtual ~vtkDataSetAttributesFieldList()
vtkDataSetAttributesFieldList::BuildPrototype
void BuildPrototype(vtkDataSetAttributes *protoDSA, vtkDataSetAttributes *ordering=nullptr)
A convenience function that builds a prototype / template dataset attributes for initializing the pro...
vtkDataSetAttributesFieldList::IntersectFieldList
void IntersectFieldList(vtkDataSetAttributes *dsa)
Update the field list for an intersection of arrays registered so far and those in dsa.
vtkDataSetAttributesFieldList::InterpolatePoint
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.
vtkDataSetAttributesFieldList::TransformData
void TransformData(int inputIndex, vtkDataSetAttributes *input, vtkDataSetAttributes *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...
vtkDataSetAttributesFieldList::CopyData
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.
vtkDataSetAttributesFieldList::CreateArray
virtual vtkSmartPointer< vtkAbstractArray > CreateArray(int type) const
Called to create an output array for the given type.
vtkDataSetAttributesFieldList::CopyAllocate
void CopyAllocate(vtkDataSetAttributes *output, int ctype, vtkIdType sz, vtkIdType ext) const
These methods can called to generate and update the output vtkDataSetAttributes.
vtkDataSetAttributesFieldList::UnionFieldList
void UnionFieldList(vtkDataSetAttributes *dsa)
Update the field list for an union of arrays registered so far and those in dsa.
vtkDataSetAttributesFieldList::CopyData
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::vtkDataSetAttributesFieldList
vtkDataSetAttributesFieldList(int number_of_inputs=0)
number_of_inputs parameter is not required and only provided for backwards compatibility.
vtkDataSetAttributes
represent and manipulate attribute data in a dataset
Definition: vtkDataSetAttributes.h:65
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:32
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkSmartPointer< vtkAbstractArray >
vtkX3D::function
@ function
Definition: vtkX3D.h:249
vtkX3D::type
@ type
Definition: vtkX3D.h:516
vtkSmartPointer.h
vtkSystemIncludes.h
vtkIdType
int vtkIdType
Definition: vtkType.h:315