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

Method ProcessRequest

Filters/Python/vtkPythonAlgorithm.cxx:151–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149}
150
151vtkTypeBool vtkPythonAlgorithm::ProcessRequest(
152 vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* outInfo)
153{
154 vtkPythonScopeGilEnsurer gilEnsurer;
155 char mname[] = "ProcessRequest";
156 VTK_GET_METHOD(method, this->Object, mname, 0)
157
158 PyObject* vtkself = VTKToPython(this);
159 PyObject* pyrequest = VTKToPython(request);
160 int nports = this->GetNumberOfInputPorts();
161 PyObject* pyininfos = PyTuple_New(nports);
162 for (int i = 0; i < nports; ++i)
163 {
164 PyObject* pyininfo = VTKToPython(inInfo[i]);
165 PyTuple_SetItem(pyininfos, i, pyininfo);
166 }
167 PyObject* pyoutinfo = VTKToPython(outInfo);
168 vtkSmartPyObject args(PyTuple_Pack(4, vtkself, pyrequest, pyininfos, pyoutinfo));
169 Py_DECREF(vtkself);
170 Py_DECREF(pyrequest);
171 Py_DECREF(pyininfos);
172 Py_DECREF(pyoutinfo);
173
174 vtkSmartPyObject result(PyObject_Call(method, args, nullptr));
175
176 return CheckResult(mname, result);
177}
178
179int vtkPythonAlgorithm::FillInputPortInformation(int port, vtkInformation* info)
180{

Callers

nothing calls this directly

Calls 3

VTKToPythonFunction · 0.70
CheckResultFunction · 0.50
GetNumberOfInputPortsMethod · 0.45

Tested by

no test coverage detected