// python wrapper for vtkCellDistanceSelector // #define VTK_WRAPPING_CXX #define VTK_STREAMS_FWD_ONLY #include "vtkPythonArgs.h" #include "vtkPythonOverload.h" #include "vtkConfigure.h" #include #include #include "vtkVariant.h" #include "vtkIndent.h" #include "vtkCellDistanceSelector.h" extern "C" { VTK_ABI_EXPORT void PyVTKAddFile_vtkCellDistanceSelector(PyObject *); } extern "C" { VTK_ABI_EXPORT PyObject *PyvtkCellDistanceSelector_ClassNew(); } #ifndef DECLARED_PyvtkSelectionAlgorithm_ClassNew extern "C" { PyObject *PyvtkSelectionAlgorithm_ClassNew(); } #define DECLARED_PyvtkSelectionAlgorithm_ClassNew #endif static const char *PyvtkCellDistanceSelector_Doc = "vtkCellDistanceSelector - select neighbor cells up to a distance\n\n" "Superclass: vtkSelectionAlgorithm\n\n" "This filter grows an input selection by iteratively selecting\n" "neighbor cells (a neighbor cell is a cell that shares a\n" "vertex/edge/face), up to a given topological distance to the selected\n" "neighborhood (number of times we add neighbor cells). This filter\n" "takes a vtkSelection and a vtkCompositeDataSet as inputs. It outputs\n" "a vtkSelection identifying all the selected cells.\n\n" "@par Thanks: This file has been initially developed in the frame of\n" "CEA's Love visualization software development\n\n" "CEA/DIF - Commissariat a l'Energie Atomique, Centre DAM Ile-De-France\n\n" "BP12, F-91297 Arpajon, France.\n\n" "Modified and integrated into VTK, Kitware SAS 2012 Implementation by\n" "Thierry Carrard and Philippe Pebay\n\n"; static PyTypeObject PyvtkCellDistanceSelector_InputPorts_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "vtkFiltersSelectionPython.vtkCellDistanceSelector.InputPorts", // tp_name sizeof(PyIntObject), // tp_basicsize 0, // tp_itemsize nullptr, // tp_dealloc 0, // tp_print nullptr, // tp_getattr nullptr, // tp_setattr nullptr, // tp_compare nullptr, // tp_repr nullptr, // tp_as_number nullptr, // tp_as_sequence nullptr, // tp_as_mapping nullptr, // tp_hash nullptr, // tp_call nullptr, // tp_str nullptr, // tp_getattro nullptr, // tp_setattro nullptr, // tp_as_buffer Py_TPFLAGS_DEFAULT, // tp_flags nullptr, // tp_doc nullptr, // tp_traverse nullptr, // tp_clear nullptr, // tp_richcompare 0, // tp_weaklistoffset nullptr, // tp_iter nullptr, // tp_iternext nullptr, // tp_methods nullptr, // tp_members nullptr, // tp_getset &PyInt_Type, // tp_base nullptr, // tp_dict nullptr, // tp_descr_get nullptr, // tp_descr_set 0, // tp_dictoffset nullptr, // tp_init nullptr, // tp_alloc nullptr, // tp_new PyObject_Del, // tp_free nullptr, // tp_is_gc nullptr, // tp_bases nullptr, // tp_mro nullptr, // tp_cache nullptr, // tp_subclasses nullptr, // tp_weaklist VTK_WRAP_PYTHON_SUPPRESS_UNINITIALIZED }; PyObject *PyvtkCellDistanceSelector_InputPorts_FromEnum(int val) { #ifdef VTK_PY3K PyObject *args = Py_BuildValue("(i)", val); PyObject *obj = PyLong_Type.tp_new(&PyvtkCellDistanceSelector_InputPorts_Type, args, nullptr); Py_DECREF(args); return obj; #else PyIntObject *self = PyObject_New(PyIntObject, &PyvtkCellDistanceSelector_InputPorts_Type); self->ob_ival = val; return (PyObject *)self; #endif } static PyObject * PyvtkCellDistanceSelector_IsTypeOf(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "IsTypeOf"); char *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetValue(temp0)) { int tempr = vtkCellDistanceSelector::IsTypeOf(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCellDistanceSelector_IsA(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "IsA"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCellDistanceSelector *op = static_cast(vp); char *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { int tempr = (ap.IsBound() ? op->IsA(temp0) : op->vtkCellDistanceSelector::IsA(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCellDistanceSelector_SafeDownCast(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "SafeDownCast"); vtkObjectBase *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkObjectBase")) { vtkCellDistanceSelector *tempr = vtkCellDistanceSelector::SafeDownCast(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkCellDistanceSelector_NewInstance(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "NewInstance"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCellDistanceSelector *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkCellDistanceSelector *tempr = (ap.IsBound() ? op->NewInstance() : op->vtkCellDistanceSelector::NewInstance()); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); if (result && PyVTKObject_Check(result)) { PyVTKObject_GetObject(result)->UnRegister(0); PyVTKObject_SetFlag(result, VTK_PYTHON_IGNORE_UNREGISTER, 1); } } } return result; } static PyObject * PyvtkCellDistanceSelector_SetInputMeshConnection(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetInputMeshConnection"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCellDistanceSelector *op = static_cast(vp); vtkAlgorithmOutput *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkAlgorithmOutput")) { if (ap.IsBound()) { op->SetInputMeshConnection(temp0); } else { op->vtkCellDistanceSelector::SetInputMeshConnection(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCellDistanceSelector_SetInputMesh(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetInputMesh"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCellDistanceSelector *op = static_cast(vp); vtkDataObject *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkDataObject")) { if (ap.IsBound()) { op->SetInputMesh(temp0); } else { op->vtkCellDistanceSelector::SetInputMesh(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCellDistanceSelector_SetInputSelectionConnection(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetInputSelectionConnection"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCellDistanceSelector *op = static_cast(vp); vtkAlgorithmOutput *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkAlgorithmOutput")) { if (ap.IsBound()) { op->SetInputSelectionConnection(temp0); } else { op->vtkCellDistanceSelector::SetInputSelectionConnection(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCellDistanceSelector_SetInputSelection(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetInputSelection"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCellDistanceSelector *op = static_cast(vp); vtkSelection *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkSelection")) { if (ap.IsBound()) { op->SetInputSelection(temp0); } else { op->vtkCellDistanceSelector::SetInputSelection(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCellDistanceSelector_SetDistance(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetDistance"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCellDistanceSelector *op = static_cast(vp); int temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetDistance(temp0); } else { op->vtkCellDistanceSelector::SetDistance(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCellDistanceSelector_GetDistance(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetDistance"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCellDistanceSelector *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->GetDistance() : op->vtkCellDistanceSelector::GetDistance()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCellDistanceSelector_SetIncludeSeed(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetIncludeSeed"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCellDistanceSelector *op = static_cast(vp); int temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetIncludeSeed(temp0); } else { op->vtkCellDistanceSelector::SetIncludeSeed(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCellDistanceSelector_GetIncludeSeed(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetIncludeSeed"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCellDistanceSelector *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->GetIncludeSeed() : op->vtkCellDistanceSelector::GetIncludeSeed()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCellDistanceSelector_IncludeSeedOn(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "IncludeSeedOn"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCellDistanceSelector *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->IncludeSeedOn(); } else { op->vtkCellDistanceSelector::IncludeSeedOn(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCellDistanceSelector_IncludeSeedOff(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "IncludeSeedOff"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCellDistanceSelector *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->IncludeSeedOff(); } else { op->vtkCellDistanceSelector::IncludeSeedOff(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCellDistanceSelector_SetAddIntermediate(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetAddIntermediate"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCellDistanceSelector *op = static_cast(vp); int temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetAddIntermediate(temp0); } else { op->vtkCellDistanceSelector::SetAddIntermediate(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCellDistanceSelector_GetAddIntermediate(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetAddIntermediate"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCellDistanceSelector *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->GetAddIntermediate() : op->vtkCellDistanceSelector::GetAddIntermediate()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCellDistanceSelector_AddIntermediateOn(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "AddIntermediateOn"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCellDistanceSelector *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->AddIntermediateOn(); } else { op->vtkCellDistanceSelector::AddIntermediateOn(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCellDistanceSelector_AddIntermediateOff(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "AddIntermediateOff"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCellDistanceSelector *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->AddIntermediateOff(); } else { op->vtkCellDistanceSelector::AddIntermediateOff(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyMethodDef PyvtkCellDistanceSelector_Methods[] = { {"IsTypeOf", PyvtkCellDistanceSelector_IsTypeOf, METH_VARARGS, "V.IsTypeOf(string) -> int\nC++: static vtkTypeBool IsTypeOf(const char *type)\n\nReturn 1 if this class type is the same type of (or a subclass\nof) the named class. Returns 0 otherwise. This method works in\ncombination with vtkTypeMacro found in vtkSetGet.h.\n"}, {"IsA", PyvtkCellDistanceSelector_IsA, METH_VARARGS, "V.IsA(string) -> int\nC++: vtkTypeBool IsA(const char *type) override;\n\nReturn 1 if this class is the same type of (or a subclass of) the\nnamed class. Returns 0 otherwise. This method works in\ncombination with vtkTypeMacro found in vtkSetGet.h.\n"}, {"SafeDownCast", PyvtkCellDistanceSelector_SafeDownCast, METH_VARARGS, "V.SafeDownCast(vtkObjectBase) -> vtkCellDistanceSelector\nC++: static vtkCellDistanceSelector *SafeDownCast(\n vtkObjectBase *o)\n\n"}, {"NewInstance", PyvtkCellDistanceSelector_NewInstance, METH_VARARGS, "V.NewInstance() -> vtkCellDistanceSelector\nC++: vtkCellDistanceSelector *NewInstance()\n\n"}, {"SetInputMeshConnection", PyvtkCellDistanceSelector_SetInputMeshConnection, METH_VARARGS, "V.SetInputMeshConnection(vtkAlgorithmOutput)\nC++: void SetInputMeshConnection(vtkAlgorithmOutput *in)\n\nA convenience method to set the data object input connection to\nthe producer output\n"}, {"SetInputMesh", PyvtkCellDistanceSelector_SetInputMesh, METH_VARARGS, "V.SetInputMesh(vtkDataObject)\nC++: void SetInputMesh(vtkDataObject *obj)\n\nA convenience method to set the input data object\n"}, {"SetInputSelectionConnection", PyvtkCellDistanceSelector_SetInputSelectionConnection, METH_VARARGS, "V.SetInputSelectionConnection(vtkAlgorithmOutput)\nC++: void SetInputSelectionConnection(vtkAlgorithmOutput *in)\n\nA convenience method to set the selection input connection to the\nproducer output\n"}, {"SetInputSelection", PyvtkCellDistanceSelector_SetInputSelection, METH_VARARGS, "V.SetInputSelection(vtkSelection)\nC++: void SetInputSelection(vtkSelection *obj)\n\nA convenience method to set the input selection\n"}, {"SetDistance", PyvtkCellDistanceSelector_SetDistance, METH_VARARGS, "V.SetDistance(int)\nC++: virtual void SetDistance(int _arg)\n\nTells how far (in term of topological distance) away from seed\ncells to expand the selection\n"}, {"GetDistance", PyvtkCellDistanceSelector_GetDistance, METH_VARARGS, "V.GetDistance() -> int\nC++: virtual int GetDistance()\n\nTells how far (in term of topological distance) away from seed\ncells to expand the selection\n"}, {"SetIncludeSeed", PyvtkCellDistanceSelector_SetIncludeSeed, METH_VARARGS, "V.SetIncludeSeed(int)\nC++: virtual void SetIncludeSeed(int _arg)\n\nIf set, seed cells passed with SetSeedCells will be included in\nthe final selection\n"}, {"GetIncludeSeed", PyvtkCellDistanceSelector_GetIncludeSeed, METH_VARARGS, "V.GetIncludeSeed() -> int\nC++: virtual int GetIncludeSeed()\n\nIf set, seed cells passed with SetSeedCells will be included in\nthe final selection\n"}, {"IncludeSeedOn", PyvtkCellDistanceSelector_IncludeSeedOn, METH_VARARGS, "V.IncludeSeedOn()\nC++: virtual void IncludeSeedOn()\n\nIf set, seed cells passed with SetSeedCells will be included in\nthe final selection\n"}, {"IncludeSeedOff", PyvtkCellDistanceSelector_IncludeSeedOff, METH_VARARGS, "V.IncludeSeedOff()\nC++: virtual void IncludeSeedOff()\n\nIf set, seed cells passed with SetSeedCells will be included in\nthe final selection\n"}, {"SetAddIntermediate", PyvtkCellDistanceSelector_SetAddIntermediate, METH_VARARGS, "V.SetAddIntermediate(int)\nC++: virtual void SetAddIntermediate(int _arg)\n\nIf set, intermediate cells (between seed cells and the selection\nboundary) will be included in the final selection\n"}, {"GetAddIntermediate", PyvtkCellDistanceSelector_GetAddIntermediate, METH_VARARGS, "V.GetAddIntermediate() -> int\nC++: virtual int GetAddIntermediate()\n\nIf set, intermediate cells (between seed cells and the selection\nboundary) will be included in the final selection\n"}, {"AddIntermediateOn", PyvtkCellDistanceSelector_AddIntermediateOn, METH_VARARGS, "V.AddIntermediateOn()\nC++: virtual void AddIntermediateOn()\n\nIf set, intermediate cells (between seed cells and the selection\nboundary) will be included in the final selection\n"}, {"AddIntermediateOff", PyvtkCellDistanceSelector_AddIntermediateOff, METH_VARARGS, "V.AddIntermediateOff()\nC++: virtual void AddIntermediateOff()\n\nIf set, intermediate cells (between seed cells and the selection\nboundary) will be included in the final selection\n"}, {nullptr, nullptr, 0, nullptr} }; static PyTypeObject PyvtkCellDistanceSelector_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "vtkFiltersSelectionPython.vtkCellDistanceSelector", // tp_name sizeof(PyVTKObject), // tp_basicsize 0, // tp_itemsize PyVTKObject_Delete, // tp_dealloc 0, // tp_print nullptr, // tp_getattr nullptr, // tp_setattr nullptr, // tp_compare PyVTKObject_Repr, // tp_repr nullptr, // tp_as_number nullptr, // tp_as_sequence nullptr, // tp_as_mapping nullptr, // tp_hash nullptr, // tp_call PyVTKObject_String, // tp_str PyObject_GenericGetAttr, // tp_getattro PyObject_GenericSetAttr, // tp_setattro &PyVTKObject_AsBuffer, // tp_as_buffer Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_BASETYPE, // tp_flags PyvtkCellDistanceSelector_Doc, // tp_doc PyVTKObject_Traverse, // tp_traverse nullptr, // tp_clear nullptr, // tp_richcompare offsetof(PyVTKObject, vtk_weakreflist), // tp_weaklistoffset nullptr, // tp_iter nullptr, // tp_iternext nullptr, // tp_methods nullptr, // tp_members PyVTKObject_GetSet, // tp_getset nullptr, // tp_base nullptr, // tp_dict nullptr, // tp_descr_get nullptr, // tp_descr_set offsetof(PyVTKObject, vtk_dict), // tp_dictoffset nullptr, // tp_init nullptr, // tp_alloc PyVTKObject_New, // tp_new PyObject_GC_Del, // tp_free nullptr, // tp_is_gc nullptr, // tp_bases nullptr, // tp_mro nullptr, // tp_cache nullptr, // tp_subclasses nullptr, // tp_weaklist VTK_WRAP_PYTHON_SUPPRESS_UNINITIALIZED }; static vtkObjectBase *PyvtkCellDistanceSelector_StaticNew() { return vtkCellDistanceSelector::New(); } PyObject *PyvtkCellDistanceSelector_ClassNew() { PyVTKClass_Add( &PyvtkCellDistanceSelector_Type, PyvtkCellDistanceSelector_Methods, "vtkCellDistanceSelector", &PyvtkCellDistanceSelector_StaticNew); PyTypeObject *pytype = &PyvtkCellDistanceSelector_Type; if ((pytype->tp_flags & Py_TPFLAGS_READY) != 0) { return (PyObject *)pytype; } #if !defined(VTK_PY3K) && PY_VERSION_HEX >= 0x02060000 pytype->tp_flags |= Py_TPFLAGS_HAVE_NEWBUFFER; #endif pytype->tp_base = (PyTypeObject *)PyvtkSelectionAlgorithm_ClassNew(); PyObject *d = pytype->tp_dict; PyObject *o; PyType_Ready(&PyvtkCellDistanceSelector_InputPorts_Type); PyvtkCellDistanceSelector_InputPorts_Type.tp_new = nullptr; vtkPythonUtil::AddEnumToMap(&PyvtkCellDistanceSelector_InputPorts_Type); o = (PyObject *)&PyvtkCellDistanceSelector_InputPorts_Type; if (PyDict_SetItemString(d, "InputPorts", o) != 0) { Py_DECREF(o); } for (int c = 0; c < 2; c++) { typedef vtkCellDistanceSelector::InputPorts cxx_enum_type; static const struct { const char *name; cxx_enum_type value; } constants[2] = { { "INPUT_MESH", vtkCellDistanceSelector::INPUT_MESH }, { "INPUT_SELECTION", vtkCellDistanceSelector::INPUT_SELECTION }, }; o = PyvtkCellDistanceSelector_InputPorts_FromEnum(constants[c].value); if (o) { PyDict_SetItemString(d, constants[c].name, o); Py_DECREF(o); } } PyType_Ready(pytype); return (PyObject *)pytype; } void PyVTKAddFile_vtkCellDistanceSelector( PyObject *dict) { PyObject *o; o = PyvtkCellDistanceSelector_ClassNew(); if (o && PyDict_SetItemString(dict, "vtkCellDistanceSelector", o) != 0) { Py_DECREF(o); } }