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

Method RequestDataObject

Filters/ParallelImaging/vtkExtractPiece.cxx:41–65  ·  view source on GitHub ↗

=============================================================================

Source from the content-addressed store, hash-verified

39
40//=============================================================================
41int 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//=============================================================================
68int vtkExtractPiece::RequestData(vtkInformation* vtkNotUsed(request),

Callers

nothing calls this directly

Calls 7

GetInformationObjectMethod · 0.80
IsAMethod · 0.80
DeleteMethod · 0.65
GetMethod · 0.45
GetClassNameMethod · 0.45
NewInstanceMethod · 0.45
SetMethod · 0.45

Tested by

no test coverage detected