------------------------------------------------------------------------------
| 333 | |
| 334 | //------------------------------------------------------------------------------ |
| 335 | void vtkXMLCompositeDataReader::ReadXMLData() |
| 336 | { |
| 337 | vtkLogF(TRACE, "vtkXMLCompositeDataReader::ReadXMLData"); |
| 338 | vtkInformation* info = this->GetCurrentOutputInformation(); |
| 339 | |
| 340 | this->Internal->UpdatePiece = info->Get(vtkStreamingDemandDrivenPipeline::UPDATE_PIECE_NUMBER()); |
| 341 | this->Internal->UpdateNumberOfPieces = |
| 342 | info->Get(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_PIECES()); |
| 343 | this->Internal->NumDataSets = this->CountNestedElements(this->GetPrimaryElement(), "DataSet"); |
| 344 | |
| 345 | vtkDataObject* doOutput = info->Get(vtkDataObject::DATA_OBJECT()); |
| 346 | vtkCompositeDataSet* composite = vtkCompositeDataSet::SafeDownCast(doOutput); |
| 347 | if (!composite) |
| 348 | { |
| 349 | return; |
| 350 | } |
| 351 | |
| 352 | this->ReadFieldData(); |
| 353 | |
| 354 | // Find the path to this file in case the internal files are |
| 355 | // specified as relative paths. |
| 356 | std::string filePath = this->GetFilePath(); |
| 357 | |
| 358 | vtkInformation* outInfo = this->GetCurrentOutputInformation(); |
| 359 | if (outInfo->Has(vtkCompositeDataPipeline::UPDATE_COMPOSITE_INDICES())) |
| 360 | { |
| 361 | this->Internal->HasUpdateRestriction = true; |
| 362 | this->Internal->UpdateIndices = std::set<int>(); |
| 363 | int length = outInfo->Length(vtkCompositeDataPipeline::UPDATE_COMPOSITE_INDICES()); |
| 364 | if (length > 0) |
| 365 | { |
| 366 | int* idx = outInfo->Get(vtkCompositeDataPipeline::UPDATE_COMPOSITE_INDICES()); |
| 367 | this->Internal->UpdateIndices = std::set<int>(idx, idx + length); |
| 368 | |
| 369 | // Change the total number of datasets so that we'll properly load |
| 370 | // balance across the valid datasets. |
| 371 | this->Internal->NumDataSets = length; |
| 372 | } |
| 373 | } |
| 374 | else |
| 375 | { |
| 376 | this->Internal->HasUpdateRestriction = false; |
| 377 | } |
| 378 | |
| 379 | // All processes create the entire tree structure however, but each one only |
| 380 | // reads the datasets assigned to it. |
| 381 | unsigned int dataSetIndex = 0; |
| 382 | this->ReadComposite(this->GetPrimaryElement(), composite, filePath.c_str(), dataSetIndex); |
| 383 | } |
| 384 | |
| 385 | //------------------------------------------------------------------------------ |
| 386 | int vtkXMLCompositeDataReader::ShouldReadDataSet( |
nothing calls this directly
no test coverage detected