VTK  9.2.6
vtkDataSetAttributesFieldList.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkDataSetAttributesFieldList.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 =========================================================================*/
55 #ifndef vtkDataSetAttributesFieldList_h
56 #define vtkDataSetAttributesFieldList_h
57 
58 #include "vtkCommonDataModelModule.h" // For export macro
59 #include "vtkSmartPointer.h" // for vtkSmartPointer
60 #include "vtkSystemIncludes.h"
61 
62 #include <functional> // for std::function
63 #include <memory> // for unique_ptr
64 
65 class vtkAbstractArray;
67 class vtkIdList;
68 
69 class VTKCOMMONDATAMODEL_EXPORT vtkDataSetAttributesFieldList
70 {
71 public:
76  vtkDataSetAttributesFieldList(int number_of_inputs = 0);
78  void PrintSelf(ostream& os, vtkIndent indent);
79 
83  void Reset();
84 
91  void InitializeFieldList(vtkDataSetAttributes* dsa);
92 
97  void IntersectFieldList(vtkDataSetAttributes* dsa);
98 
103  void UnionFieldList(vtkDataSetAttributes* dsa);
104 
106 
112  void CopyAllocate(vtkDataSetAttributes* output, int ctype, vtkIdType sz, vtkIdType ext) const;
113  void CopyData(int inputIndex, vtkDataSetAttributes* input, vtkIdType fromId,
114  vtkDataSetAttributes* output, vtkIdType toId) const;
115  void CopyData(int inputIndex, vtkDataSetAttributes* input, vtkIdType inputStart,
116  vtkIdType numValues, vtkDataSetAttributes* output, vtkIdType outStart) const;
117  void InterpolatePoint(int inputIndex, vtkDataSetAttributes* input, vtkIdList* inputIds,
118  double* weights, vtkDataSetAttributes* output, vtkIdType toId) const;
120 
125  void TransformData(int inputIndex, vtkDataSetAttributes* input, vtkDataSetAttributes* output,
126  std::function<void(vtkAbstractArray*, vtkAbstractArray*)> op) const;
127 
133  int GetNumberOfArrays();
134 
147  void BuildPrototype(vtkDataSetAttributes* protoDSA, vtkDataSetAttributes* ordering = nullptr);
148 
149 protected:
155 
156 private:
157  class vtkInternals;
158  std::unique_ptr<vtkInternals> Internals;
159 
161  void operator=(vtkDataSetAttributesFieldList&) = delete;
162 };
163 
164 #endif
165 // VTK-HeaderTest-Exclude: vtkDataSetAttributesFieldList.h
Abstract superclass for all arrays.
helps manage arrays from multiple vtkDataSetAttributes.
int vtkIdType
Definition: vtkType.h:332
a simple class to control print indentation
Definition: vtkIndent.h:39
list of point or cell ids
Definition: vtkIdList.h:33
represent and manipulate attribute data in a dataset
vtkSmartPointer< vtkDataArray > CreateArray(const Ioss::Field &field)
Create an array for the given field.