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

Method RequestData

Filters/General/vtkReflectionFilter.cxx:85–130  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

83
84//------------------------------------------------------------------------------
85int vtkReflectionFilter::RequestData(vtkInformation* vtkNotUsed(request),
86 vtkInformationVector** inputVector, vtkInformationVector* outputVector)
87{
88 // get the input and output
89 vtkDataSet* inputDS = vtkDataSet::GetData(inputVector[0], 0);
90 vtkUnstructuredGrid* outputUG = vtkUnstructuredGrid::GetData(outputVector, 0);
91
92 vtkCompositeDataSet* inputCD = vtkCompositeDataSet::GetData(inputVector[0], 0);
93 vtkCompositeDataSet* outputCD = vtkCompositeDataSet::GetData(outputVector, 0);
94
95 if (inputDS && outputUG)
96 {
97 double bounds[6];
98 this->ComputeBounds(inputDS, bounds);
99 return this->RequestDataInternal(inputDS, outputUG, bounds);
100 }
101
102 if (inputCD && outputCD)
103 {
104 outputCD->CopyStructure(inputCD);
105 double bounds[6];
106 if (this->ComputeBounds(inputCD, bounds))
107 {
108 vtkSmartPointer<vtkCompositeDataIterator> iter;
109 iter.TakeReference(inputCD->NewIterator());
110 for (iter->InitTraversal(); !iter->IsDoneWithTraversal(); iter->GoToNextItem())
111 {
112 if (this->CheckAbort())
113 {
114 break;
115 }
116 vtkDataSet* ds = vtkDataSet::SafeDownCast(iter->GetCurrentDataObject());
117 vtkSmartPointer<vtkUnstructuredGrid> ug = vtkSmartPointer<vtkUnstructuredGrid>::New();
118 if (!this->RequestDataInternal(ds, ug, bounds))
119 {
120 return 0;
121 }
122
123 outputCD->SetDataSet(iter, ug);
124 }
125 }
126 return 1;
127 }
128
129 return 0;
130}
131
132//------------------------------------------------------------------------------
133int vtkReflectionFilter::RequestDataInternal(

Callers

nothing calls this directly

Calls 13

ComputeBoundsMethod · 0.95
RequestDataInternalMethod · 0.95
CheckAbortMethod · 0.80
GetDataFunction · 0.50
NewFunction · 0.50
CopyStructureMethod · 0.45
TakeReferenceMethod · 0.45
NewIteratorMethod · 0.45
InitTraversalMethod · 0.45
IsDoneWithTraversalMethod · 0.45
GoToNextItemMethod · 0.45
GetCurrentDataObjectMethod · 0.45

Tested by

no test coverage detected