VTK
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 "vtkSetGet.h" // for VTK_LEGACY
60 #include "vtkSmartPointer.h" // for vtkSmartPointer
61 #include "vtkSystemIncludes.h"
62 
63 #include <functional> // for std::function
64 #include <memory> // for unique_ptr
65 
66 class vtkAbstractArray;
68 class vtkIdList;
69 
70 class VTKCOMMONDATAMODEL_EXPORT vtkDataSetAttributesFieldList
71 {
72 public:
77  vtkDataSetAttributesFieldList(int number_of_inputs = 0);
79  void PrintSelf(ostream& os, vtkIndent indent);
80 
84  void Reset();
85 
93 
99 
105 
107 
113  void CopyAllocate(vtkDataSetAttributes* output, int ctype, vtkIdType sz, vtkIdType ext) const;
114  void CopyData(int inputIndex, vtkDataSetAttributes* input, vtkIdType fromId,
115  vtkDataSetAttributes* output, vtkIdType toId) const;
116  void CopyData(int inputIdx, vtkDataSetAttributes* input, vtkIdType inputStart,
117  vtkIdType numValues, vtkDataSetAttributes* output, vtkIdType outStart) const;
118  void InterpolatePoint(int inputIdx, vtkDataSetAttributes* input, vtkIdList* inputIds,
119  double* weights, vtkDataSetAttributes* output, vtkIdType toId) const;
121 
126  void TransformData(int inputIndex, vtkDataSetAttributes* input, vtkDataSetAttributes* output,
127  std::function<void(vtkAbstractArray*, vtkAbstractArray*)> op) const;
128 
130 
139  VTK_LEGACY(int IsAttributePresent(int attrType) const);
140  VTK_LEGACY(int GetNumberOfFields() const);
141  VTK_LEGACY(int GetFieldIndex(int i) const);
142  VTK_LEGACY(const char* GetFieldName(int i) const);
143  VTK_LEGACY(int GetFieldComponents(int i) const);
144  VTK_LEGACY(int GetDSAIndex(int index, int i) const);
146 
147 protected:
153 
154 private:
155  class vtkInternals;
156  std::unique_ptr<vtkInternals> Internals;
157 
159  void operator=(vtkDataSetAttributesFieldList&) = delete;
160 };
161 
162 #endif
163 // VTK-HeaderTest-Exclude: vtkDataSetAttributesFieldList.h
vtkDataSetAttributesFieldList::CopyData
void CopyData(int inputIndex, vtkDataSetAttributes *input, vtkIdType fromId, vtkDataSetAttributes *output, vtkIdType toId) const
vtkX3D::function
@ function
Definition: vtkX3D.h:249
vtkX3D::type
@ type
Definition: vtkX3D.h:516
vtkIdType
int vtkIdType
Definition: vtkType.h:347
vtkDataSetAttributesFieldList::~vtkDataSetAttributesFieldList
virtual ~vtkDataSetAttributesFieldList()
vtkDataSetAttributes
represent and manipulate attribute data in a dataset
Definition: vtkDataSetAttributes.h:60
vtkDataSetAttributesFieldList::GetDSAIndex
int GetDSAIndex(int index, int i) const
vtkDataSetAttributesFieldList::UnionFieldList
void UnionFieldList(vtkDataSetAttributes *dsa)
Update the field list for an union of arrays registered so far and those in dsa.
vtkDataSetAttributesFieldList::GetFieldComponents
int GetFieldComponents(int i) const
vtkSmartPointer< vtkAbstractArray >
vtkDataSetAttributesFieldList::IsAttributePresent
int IsAttributePresent(int attrType) const
vtkDataSetAttributes::FieldList used a different internal data structure in older versions of VTK.
vtkDataSetAttributesFieldList::InterpolatePoint
void InterpolatePoint(int inputIdx, vtkDataSetAttributes *input, vtkIdList *inputIds, double *weights, vtkDataSetAttributes *output, vtkIdType toId) const
vtkDataSetAttributesFieldList::vtkDataSetAttributesFieldList
vtkDataSetAttributesFieldList(int number_of_inputs=0)
number_of_inputs parameter is not required and only provided for backwards compatibility.
vtkDataSetAttributesFieldList::GetFieldIndex
int GetFieldIndex(int i) const
vtkDataSetAttributesFieldList::Reset
void Reset()
Initializes the field list to empty.
vtkDataSetAttributesFieldList::GetFieldName
const char * GetFieldName(int i) const
vtkDataSetAttributesFieldList
helps manage arrays from multiple vtkDataSetAttributes.
Definition: vtkDataSetAttributesFieldList.h:71
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkDataSetAttributesFieldList::CopyAllocate
void CopyAllocate(vtkDataSetAttributes *output, int ctype, vtkIdType sz, vtkIdType ext) const
These methods can called to generate and update the output vtkDataSetAttributes.
vtkSmartPointer.h
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:37
vtkDataSetAttributesFieldList::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
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...
vtkAbstractArray
Abstract superclass for all arrays.
Definition: vtkAbstractArray.h:79
vtkDataSetAttributesFieldList::IntersectFieldList
void IntersectFieldList(vtkDataSetAttributes *dsa)
Update the field list for an intersection of arrays registered so far and those in dsa.
vtkDataSetAttributesFieldList::CopyData
void CopyData(int inputIdx, vtkDataSetAttributes *input, vtkIdType inputStart, vtkIdType numValues, vtkDataSetAttributes *output, vtkIdType outStart) const
vtkX3D::index
@ index
Definition: vtkX3D.h:246
vtkSystemIncludes.h
vtkDataSetAttributesFieldList::GetNumberOfFields
int GetNumberOfFields() const
vtkDataSetAttributesFieldList::CreateArray
virtual vtkSmartPointer< vtkAbstractArray > CreateArray(int type) const
Called to create an output array for the given type.
vtkDataSetAttributesFieldList::InitializeFieldList
void InitializeFieldList(vtkDataSetAttributes *dsa)
Initialize the field list.