// python wrapper for vtkPolyDataToImageStencil // #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 "vtkPolyDataToImageStencil.h" extern "C" { VTK_ABI_EXPORT void PyVTKAddFile_vtkPolyDataToImageStencil(PyObject *); } extern "C" { VTK_ABI_EXPORT PyObject *PyvtkPolyDataToImageStencil_ClassNew(); } #ifndef DECLARED_PyvtkImageStencilSource_ClassNew extern "C" { PyObject *PyvtkImageStencilSource_ClassNew(); } #define DECLARED_PyvtkImageStencilSource_ClassNew #endif static const char *PyvtkPolyDataToImageStencil_Doc = "vtkPolyDataToImageStencil - use polydata to mask an image\n\n" "Superclass: vtkImageStencilSource\n\n" "The vtkPolyDataToImageStencil class will convert polydata into an\n" "image stencil. The polydata can either be a closed surface mesh or a\n" "series of polyline contours (one contour per slice).\n" "@warning\n" "If contours are provided, the contours must be aligned with the Z\n" "planes. Other contour orientations are not supported.\n" "@sa\n" "vtkImageStencil vtkImageAccumulate vtkImageBlend vtkImageReslice\n\n"; static PyObject * PyvtkPolyDataToImageStencil_IsTypeOf(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "IsTypeOf"); char *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetValue(temp0)) { int tempr = vtkPolyDataToImageStencil::IsTypeOf(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkPolyDataToImageStencil_IsA(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "IsA"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPolyDataToImageStencil *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->vtkPolyDataToImageStencil::IsA(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkPolyDataToImageStencil_SafeDownCast(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "SafeDownCast"); vtkObjectBase *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkObjectBase")) { vtkPolyDataToImageStencil *tempr = vtkPolyDataToImageStencil::SafeDownCast(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkPolyDataToImageStencil_NewInstance(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "NewInstance"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPolyDataToImageStencil *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkPolyDataToImageStencil *tempr = (ap.IsBound() ? op->NewInstance() : op->vtkPolyDataToImageStencil::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 * PyvtkPolyDataToImageStencil_SetInputData(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetInputData"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPolyDataToImageStencil *op = static_cast(vp); vtkPolyData *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkPolyData")) { if (ap.IsBound()) { op->SetInputData(temp0); } else { op->vtkPolyDataToImageStencil::SetInputData(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkPolyDataToImageStencil_GetInput(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetInput"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPolyDataToImageStencil *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkPolyData *tempr = (ap.IsBound() ? op->GetInput() : op->vtkPolyDataToImageStencil::GetInput()); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkPolyDataToImageStencil_SetTolerance(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetTolerance"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPolyDataToImageStencil *op = static_cast(vp); double temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetTolerance(temp0); } else { op->vtkPolyDataToImageStencil::SetTolerance(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkPolyDataToImageStencil_GetToleranceMinValue(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetToleranceMinValue"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPolyDataToImageStencil *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { double tempr = (ap.IsBound() ? op->GetToleranceMinValue() : op->vtkPolyDataToImageStencil::GetToleranceMinValue()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkPolyDataToImageStencil_GetToleranceMaxValue(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetToleranceMaxValue"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPolyDataToImageStencil *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { double tempr = (ap.IsBound() ? op->GetToleranceMaxValue() : op->vtkPolyDataToImageStencil::GetToleranceMaxValue()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkPolyDataToImageStencil_GetTolerance(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetTolerance"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPolyDataToImageStencil *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { double tempr = (ap.IsBound() ? op->GetTolerance() : op->vtkPolyDataToImageStencil::GetTolerance()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyMethodDef PyvtkPolyDataToImageStencil_Methods[] = { {"IsTypeOf", PyvtkPolyDataToImageStencil_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", PyvtkPolyDataToImageStencil_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", PyvtkPolyDataToImageStencil_SafeDownCast, METH_VARARGS, "V.SafeDownCast(vtkObjectBase) -> vtkPolyDataToImageStencil\nC++: static vtkPolyDataToImageStencil *SafeDownCast(\n vtkObjectBase *o)\n\n"}, {"NewInstance", PyvtkPolyDataToImageStencil_NewInstance, METH_VARARGS, "V.NewInstance() -> vtkPolyDataToImageStencil\nC++: vtkPolyDataToImageStencil *NewInstance()\n\n"}, {"SetInputData", PyvtkPolyDataToImageStencil_SetInputData, METH_VARARGS, "V.SetInputData(vtkPolyData)\nC++: virtual void SetInputData(vtkPolyData *)\n\nSpecify the implicit function to convert into a stencil.\n"}, {"GetInput", PyvtkPolyDataToImageStencil_GetInput, METH_VARARGS, "V.GetInput() -> vtkPolyData\nC++: vtkPolyData *GetInput()\n\nSpecify the implicit function to convert into a stencil.\n"}, {"SetTolerance", PyvtkPolyDataToImageStencil_SetTolerance, METH_VARARGS, "V.SetTolerance(float)\nC++: virtual void SetTolerance(double _arg)\n\nThe tolerance for including a voxel inside the stencil. This is\nin fractions of a voxel, and must be between 0 and 1. Tolerance\nis only applied in the x and y directions, not in z. Setting the\ntolerance to zero disables all tolerance checks and might result\nin faster performance.\n"}, {"GetToleranceMinValue", PyvtkPolyDataToImageStencil_GetToleranceMinValue, METH_VARARGS, "V.GetToleranceMinValue() -> float\nC++: virtual double GetToleranceMinValue()\n\nThe tolerance for including a voxel inside the stencil. This is\nin fractions of a voxel, and must be between 0 and 1. Tolerance\nis only applied in the x and y directions, not in z. Setting the\ntolerance to zero disables all tolerance checks and might result\nin faster performance.\n"}, {"GetToleranceMaxValue", PyvtkPolyDataToImageStencil_GetToleranceMaxValue, METH_VARARGS, "V.GetToleranceMaxValue() -> float\nC++: virtual double GetToleranceMaxValue()\n\nThe tolerance for including a voxel inside the stencil. This is\nin fractions of a voxel, and must be between 0 and 1. Tolerance\nis only applied in the x and y directions, not in z. Setting the\ntolerance to zero disables all tolerance checks and might result\nin faster performance.\n"}, {"GetTolerance", PyvtkPolyDataToImageStencil_GetTolerance, METH_VARARGS, "V.GetTolerance() -> float\nC++: virtual double GetTolerance()\n\nThe tolerance for including a voxel inside the stencil. This is\nin fractions of a voxel, and must be between 0 and 1. Tolerance\nis only applied in the x and y directions, not in z. Setting the\ntolerance to zero disables all tolerance checks and might result\nin faster performance.\n"}, {nullptr, nullptr, 0, nullptr} }; static PyTypeObject PyvtkPolyDataToImageStencil_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "vtkImagingStencilPython.vtkPolyDataToImageStencil", // 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 PyvtkPolyDataToImageStencil_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 *PyvtkPolyDataToImageStencil_StaticNew() { return vtkPolyDataToImageStencil::New(); } PyObject *PyvtkPolyDataToImageStencil_ClassNew() { PyVTKClass_Add( &PyvtkPolyDataToImageStencil_Type, PyvtkPolyDataToImageStencil_Methods, "vtkPolyDataToImageStencil", &PyvtkPolyDataToImageStencil_StaticNew); PyTypeObject *pytype = &PyvtkPolyDataToImageStencil_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 *)PyvtkImageStencilSource_ClassNew(); PyType_Ready(pytype); return (PyObject *)pytype; } void PyVTKAddFile_vtkPolyDataToImageStencil( PyObject *dict) { PyObject *o; o = PyvtkPolyDataToImageStencil_ClassNew(); if (o && PyDict_SetItemString(dict, "vtkPolyDataToImageStencil", o) != 0) { Py_DECREF(o); } }