MCPcopy Create free account
hub / github.com/Kitware/VTK / RequestData

Method RequestData

Views/Infovis/vtkParallelCoordinatesRepresentation.cxx:376–501  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

374
375//------------------------------------------------------------------------------
376int 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

Callers

nothing calls this directly

Calls 15

ComputeDataPropertiesMethod · 0.95
PlaceAxesMethod · 0.95
UpdateSelectionActorsMethod · 0.95
PlaceCurvesMethod · 0.95
PlaceLinesMethod · 0.95
PlaceSelectionMethod · 0.95
UpdatePlotPropertiesMethod · 0.95
GetInformationObjectMethod · 0.80
IsAMethod · 0.80
GetSelectionListMethod · 0.80
GetAnnotationLinkMethod · 0.80

Tested by

no test coverage detected