------------------------------------------------------------------------------
| 1014 | |
| 1015 | //------------------------------------------------------------------------------ |
| 1016 | int 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 | //------------------------------------------------------------------------------ |
| 1052 | void vtkConvertSelection::SetDataObjectConnection(vtkAlgorithmOutput* in) |
nothing calls this directly
no test coverage detected