------------------------------------------------------------------------------
| 374 | |
| 375 | //------------------------------------------------------------------------------ |
| 376 | int vtkParallelCoordinatesRepresentation::RequestData(vtkInformation* vtkNotUsed(request), |
| 377 | vtkInformationVector** inputVector, vtkInformationVector* vtkNotUsed(outputVector)) |
| 378 | { |
| 379 | vtkDebugMacro(<< "begin request data.\n"); |
| 380 | |
| 381 | // get the info objects and input |
| 382 | vtkInformation* inDataInfo = inputVector[INPUT_DATA]->GetInformationObject(0); |
| 383 | vtkInformation* inTitleInfo = inputVector[INPUT_TITLES]->GetInformationObject(0); |
| 384 | |
| 385 | if (!inDataInfo) |
| 386 | return 0; |
| 387 | |
| 388 | vtkDataObject* inputData = inDataInfo->Get(vtkDataObject::DATA_OBJECT()); |
| 389 | if (!inputData) |
| 390 | return 0; |
| 391 | |
| 392 | // pull out the title string array |
| 393 | vtkStringArray* titles = nullptr; |
| 394 | if (inTitleInfo) |
| 395 | { |
| 396 | vtkTable* inputTitles = vtkTable::SafeDownCast(inTitleInfo->Get(vtkDataObject::DATA_OBJECT())); |
| 397 | if (inputTitles && inputTitles->GetNumberOfColumns() > 0) |
| 398 | { |
| 399 | titles = vtkArrayDownCast<vtkStringArray>(inputTitles->GetColumn(0)); |
| 400 | } |
| 401 | } |
| 402 | // build the input array table. This is convenience table that gets used |
| 403 | // later when building the plots. |
| 404 | if (this->GetInput()->GetMTime() > this->BuildTime) |
| 405 | { |
| 406 | if (inputData->IsA("vtkArrayData")) |
| 407 | { |
| 408 | vtkSmartPointer<vtkArrayToTable> att = vtkSmartPointer<vtkArrayToTable>::New(); |
| 409 | att->SetInputData(inputData); |
| 410 | att->Update(); |
| 411 | |
| 412 | this->InputArrayTable->ShallowCopy(att->GetOutput()); |
| 413 | } |
| 414 | else |
| 415 | { |
| 416 | vtkInformationVector* inArrayVec = this->Information->Get(INPUT_ARRAYS_TO_PROCESS()); |
| 417 | |
| 418 | if (!inArrayVec) |
| 419 | { |
| 420 | vtkErrorMacro(<< "No input arrays specified. Use SetInputArrayToProcess(i,...)."); |
| 421 | return 0; |
| 422 | } |
| 423 | |
| 424 | int numberOfInputArrays = inArrayVec->GetNumberOfInformationObjects(); |
| 425 | |
| 426 | if (numberOfInputArrays <= 0) |
| 427 | { |
| 428 | vtkErrorMacro(<< "No input arrays specified. Use SetInputArrayToProcess(i,...)."); |
| 429 | return 0; |
| 430 | } |
| 431 | |
| 432 | this->InputArrayTable->Initialize(); |
| 433 |
nothing calls this directly
no test coverage detected