=============================================================================
| 39 | |
| 40 | //============================================================================= |
| 41 | int vtkExtractPiece::RequestDataObject( |
| 42 | vtkInformation*, vtkInformationVector** inputVector, vtkInformationVector* outputVector) |
| 43 | { |
| 44 | vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); |
| 45 | if (!inInfo) |
| 46 | { |
| 47 | return 0; |
| 48 | } |
| 49 | vtkDataObject* input = inInfo->Get(vtkDataObject::DATA_OBJECT()); |
| 50 | |
| 51 | vtkInformation* outInfo = outputVector->GetInformationObject(0); |
| 52 | vtkDataObject* output = outInfo->Get(vtkDataObject::DATA_OBJECT()); |
| 53 | |
| 54 | if (input) |
| 55 | { |
| 56 | if (!output || !output->IsA(input->GetClassName())) |
| 57 | { |
| 58 | vtkDataObject* outData = input->NewInstance(); |
| 59 | outInfo->Set(vtkDataObject::DATA_OBJECT(), outData); |
| 60 | outData->Delete(); |
| 61 | } |
| 62 | return 1; |
| 63 | } |
| 64 | return 0; |
| 65 | } |
| 66 | |
| 67 | //============================================================================= |
| 68 | int vtkExtractPiece::RequestData(vtkInformation* vtkNotUsed(request), |
nothing calls this directly
no test coverage detected