------------------------------------------------------------------------------
| 298 | |
| 299 | //------------------------------------------------------------------------------ |
| 300 | bool vtkHyperTreeGridPProbeFilter::Initialize( |
| 301 | vtkDataSet* input, vtkHyperTreeGrid* source, vtkDataSet* output) |
| 302 | { |
| 303 | output->Initialize(); |
| 304 | |
| 305 | output->CopyStructure(input); |
| 306 | |
| 307 | if (!(this->PassAttributeData(input, output))) |
| 308 | { |
| 309 | vtkErrorMacro("Failed to pass attribute data from input to output"); |
| 310 | return false; |
| 311 | } |
| 312 | |
| 313 | unsigned int numSourceCellArrays = source->GetCellData()->GetNumberOfArrays(); |
| 314 | for (unsigned int iA = 0; iA < numSourceCellArrays; iA++) |
| 315 | { |
| 316 | vtkDataArray* da = source->GetCellData()->GetArray(iA); |
| 317 | if (!(output->GetPointData()->HasArray(da->GetName()))) |
| 318 | { |
| 319 | auto localInstance = vtk::TakeSmartPointer(da->NewInstance()); |
| 320 | localInstance->SetName(da->GetName()); |
| 321 | localInstance->SetNumberOfComponents(da->GetNumberOfComponents()); |
| 322 | output->GetPointData()->AddArray(localInstance); |
| 323 | localInstance->Initialize(); |
| 324 | } |
| 325 | } |
| 326 | |
| 327 | this->Locator->SetHTG(source); |
| 328 | return true; |
| 329 | } |
| 330 | |
| 331 | //------------------------------------------------------------------------------ |
| 332 | bool vtkHyperTreeGridPProbeFilter::Reduce( |
no test coverage detected