| 101 | bool IsEmpty() const { return this->Type == VTK_VOID; } |
| 102 | |
| 103 | static FieldInfo Create(vtkAbstractArray* array, int loc) |
| 104 | { |
| 105 | FieldInfo info; |
| 106 | if (array) |
| 107 | { |
| 108 | info.Name = array->GetName() ? std::string(array->GetName()) : std::string(); |
| 109 | info.Type = array->GetDataType(); |
| 110 | info.NumberOfComponents = array->GetNumberOfComponents(); |
| 111 | if (auto da = vtkDataArray::SafeDownCast(array)) |
| 112 | { |
| 113 | info.LUT = da->GetLookupTable(); |
| 114 | } |
| 115 | info.Information = array->GetInformation(); |
| 116 | |
| 117 | info.ComponentNames.resize(info.NumberOfComponents); |
| 118 | for (int cc = 0; cc < info.NumberOfComponents; ++cc) |
| 119 | { |
| 120 | if (auto name = array->GetComponentName(cc)) |
| 121 | { |
| 122 | info.ComponentNames[cc] = name; |
| 123 | } |
| 124 | } |
| 125 | info.Location.push_back(loc); |
| 126 | } |
| 127 | return info; |
| 128 | } |
| 129 | |
| 130 | void InitializeArray(vtkAbstractArray* array, vtkIdType sz, vtkIdType ext) const |
| 131 | { |
no test coverage detected