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

Method RequestData

Filters/Extraction/vtkConvertSelection.cxx:1016–1049  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1014
1015//------------------------------------------------------------------------------
1016int vtkConvertSelection::RequestData(vtkInformation* vtkNotUsed(request),
1017 vtkInformationVector** inputVector, vtkInformationVector* outputVector)
1018{
1019 vtkInformation* inInfo = inputVector[0]->GetInformationObject(0);
1020 vtkSelection* origInput = vtkSelection::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT()));
1021
1022 if (!this->SelectionExtractor)
1023 {
1024 vtkNew<vtkExtractSelection> se;
1025 this->SetSelectionExtractor(se);
1026 }
1027
1028 vtkNew<vtkSelection> input;
1029 input->ShallowCopy(origInput);
1030 if (this->InputFieldType != -1)
1031 {
1032 for (unsigned int i = 0; i < input->GetNumberOfNodes(); ++i)
1033 {
1034 input->GetNode(i)->SetFieldType(this->InputFieldType);
1035 }
1036 }
1037
1038 vtkInformation* dataInfo = inputVector[1]->GetInformationObject(0);
1039 vtkDataObject* data = dataInfo->Get(vtkDataObject::DATA_OBJECT());
1040
1041 vtkInformation* outInfo = outputVector->GetInformationObject(0);
1042 vtkSelection* output = vtkSelection::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT()));
1043 if (data && data->IsA("vtkCompositeDataSet"))
1044 {
1045 return this->ConvertCompositeDataSet(input, vtkCompositeDataSet::SafeDownCast(data), output);
1046 }
1047
1048 return this->Convert(input, data, output);
1049}
1050
1051//------------------------------------------------------------------------------
1052void vtkConvertSelection::SetDataObjectConnection(vtkAlgorithmOutput* in)

Callers

nothing calls this directly

Calls 10

ConvertMethod · 0.95
GetInformationObjectMethod · 0.80
SetSelectionExtractorMethod · 0.80
IsAMethod · 0.80
GetMethod · 0.45
ShallowCopyMethod · 0.45
GetNumberOfNodesMethod · 0.45
SetFieldTypeMethod · 0.45
GetNodeMethod · 0.45

Tested by

no test coverage detected