// python wrapper for vtkLassoStencilSource // #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 "vtkLassoStencilSource.h" extern "C" { VTK_ABI_EXPORT void PyVTKAddFile_vtkLassoStencilSource(PyObject *); } extern "C" { VTK_ABI_EXPORT PyObject *PyvtkLassoStencilSource_ClassNew(); } #ifndef DECLARED_PyvtkImageStencilSource_ClassNew extern "C" { PyObject *PyvtkImageStencilSource_ClassNew(); } #define DECLARED_PyvtkImageStencilSource_ClassNew #endif static const char *PyvtkLassoStencilSource_Doc = "vtkLassoStencilSource - Create a stencil from a contour\n\n" "Superclass: vtkImageStencilSource\n\n" "vtkLassoStencilSource will create an image stencil from a set of\n" "points that define a contour. Its output can be used with\n" "vtkImageStecil or other vtk classes that apply a stencil to an image.\n" "@sa\n" "vtkROIStencilSource vtkPolyDataToImageStencil@par Thanks: Thanks to\n" "David Gobbi for contributing this class to VTK.\n\n"; static PyObject * PyvtkLassoStencilSource_IsTypeOf(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "IsTypeOf"); char *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetValue(temp0)) { int tempr = vtkLassoStencilSource::IsTypeOf(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkLassoStencilSource_IsA(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "IsA"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkLassoStencilSource *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->vtkLassoStencilSource::IsA(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkLassoStencilSource_SafeDownCast(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "SafeDownCast"); vtkObjectBase *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkObjectBase")) { vtkLassoStencilSource *tempr = vtkLassoStencilSource::SafeDownCast(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkLassoStencilSource_NewInstance(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "NewInstance"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkLassoStencilSource *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkLassoStencilSource *tempr = (ap.IsBound() ? op->NewInstance() : op->vtkLassoStencilSource::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 * PyvtkLassoStencilSource_GetShape(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetShape"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkLassoStencilSource *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->GetShape() : op->vtkLassoStencilSource::GetShape()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkLassoStencilSource_SetShape(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetShape"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkLassoStencilSource *op = static_cast(vp); int temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetShape(temp0); } else { op->vtkLassoStencilSource::SetShape(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkLassoStencilSource_GetShapeMinValue(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetShapeMinValue"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkLassoStencilSource *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->GetShapeMinValue() : op->vtkLassoStencilSource::GetShapeMinValue()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkLassoStencilSource_GetShapeMaxValue(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetShapeMaxValue"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkLassoStencilSource *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->GetShapeMaxValue() : op->vtkLassoStencilSource::GetShapeMaxValue()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkLassoStencilSource_SetShapeToPolygon(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetShapeToPolygon"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkLassoStencilSource *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->SetShapeToPolygon(); } else { op->vtkLassoStencilSource::SetShapeToPolygon(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkLassoStencilSource_SetShapeToSpline(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetShapeToSpline"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkLassoStencilSource *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->SetShapeToSpline(); } else { op->vtkLassoStencilSource::SetShapeToSpline(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkLassoStencilSource_GetShapeAsString(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetShapeAsString"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkLassoStencilSource *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { const char *tempr = (ap.IsBound() ? op->GetShapeAsString() : op->vtkLassoStencilSource::GetShapeAsString()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkLassoStencilSource_SetPoints(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetPoints"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkLassoStencilSource *op = static_cast(vp); vtkPoints *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkPoints")) { if (ap.IsBound()) { op->SetPoints(temp0); } else { op->vtkLassoStencilSource::SetPoints(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkLassoStencilSource_GetPoints(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetPoints"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkLassoStencilSource *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkPoints *tempr = (ap.IsBound() ? op->GetPoints() : op->vtkLassoStencilSource::GetPoints()); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkLassoStencilSource_GetSliceOrientation(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetSliceOrientation"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkLassoStencilSource *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->GetSliceOrientation() : op->vtkLassoStencilSource::GetSliceOrientation()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkLassoStencilSource_SetSliceOrientation(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetSliceOrientation"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkLassoStencilSource *op = static_cast(vp); int temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetSliceOrientation(temp0); } else { op->vtkLassoStencilSource::SetSliceOrientation(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkLassoStencilSource_GetSliceOrientationMinValue(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetSliceOrientationMinValue"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkLassoStencilSource *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->GetSliceOrientationMinValue() : op->vtkLassoStencilSource::GetSliceOrientationMinValue()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkLassoStencilSource_GetSliceOrientationMaxValue(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetSliceOrientationMaxValue"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkLassoStencilSource *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->GetSliceOrientationMaxValue() : op->vtkLassoStencilSource::GetSliceOrientationMaxValue()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkLassoStencilSource_SetSlicePoints(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetSlicePoints"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkLassoStencilSource *op = static_cast(vp); int temp0; vtkPoints *temp1 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(2) && ap.GetValue(temp0) && ap.GetVTKObject(temp1, "vtkPoints")) { if (ap.IsBound()) { op->SetSlicePoints(temp0, temp1); } else { op->vtkLassoStencilSource::SetSlicePoints(temp0, temp1); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkLassoStencilSource_GetSlicePoints(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetSlicePoints"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkLassoStencilSource *op = static_cast(vp); int temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { vtkPoints *tempr = (ap.IsBound() ? op->GetSlicePoints(temp0) : op->vtkLassoStencilSource::GetSlicePoints(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkLassoStencilSource_RemoveAllSlicePoints(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "RemoveAllSlicePoints"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkLassoStencilSource *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->RemoveAllSlicePoints(); } else { op->vtkLassoStencilSource::RemoveAllSlicePoints(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkLassoStencilSource_GetMTime(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetMTime"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkLassoStencilSource *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { unsigned long tempr = (ap.IsBound() ? op->GetMTime() : op->vtkLassoStencilSource::GetMTime()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyMethodDef PyvtkLassoStencilSource_Methods[] = { {"IsTypeOf", PyvtkLassoStencilSource_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", PyvtkLassoStencilSource_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", PyvtkLassoStencilSource_SafeDownCast, METH_VARARGS, "V.SafeDownCast(vtkObjectBase) -> vtkLassoStencilSource\nC++: static vtkLassoStencilSource *SafeDownCast(vtkObjectBase *o)\n\n"}, {"NewInstance", PyvtkLassoStencilSource_NewInstance, METH_VARARGS, "V.NewInstance() -> vtkLassoStencilSource\nC++: vtkLassoStencilSource *NewInstance()\n\n"}, {"GetShape", PyvtkLassoStencilSource_GetShape, METH_VARARGS, "V.GetShape() -> int\nC++: virtual int GetShape()\n\nThe shape to use, default is \"Polygon\". The spline is a cardinal\nspline. Bezier splines are not yet supported.\n"}, {"SetShape", PyvtkLassoStencilSource_SetShape, METH_VARARGS, "V.SetShape(int)\nC++: virtual void SetShape(int _arg)\n\nThe shape to use, default is \"Polygon\". The spline is a cardinal\nspline. Bezier splines are not yet supported.\n"}, {"GetShapeMinValue", PyvtkLassoStencilSource_GetShapeMinValue, METH_VARARGS, "V.GetShapeMinValue() -> int\nC++: virtual int GetShapeMinValue()\n\nThe shape to use, default is \"Polygon\". The spline is a cardinal\nspline. Bezier splines are not yet supported.\n"}, {"GetShapeMaxValue", PyvtkLassoStencilSource_GetShapeMaxValue, METH_VARARGS, "V.GetShapeMaxValue() -> int\nC++: virtual int GetShapeMaxValue()\n\nThe shape to use, default is \"Polygon\". The spline is a cardinal\nspline. Bezier splines are not yet supported.\n"}, {"SetShapeToPolygon", PyvtkLassoStencilSource_SetShapeToPolygon, METH_VARARGS, "V.SetShapeToPolygon()\nC++: void SetShapeToPolygon()\n\nThe shape to use, default is \"Polygon\". The spline is a cardinal\nspline. Bezier splines are not yet supported.\n"}, {"SetShapeToSpline", PyvtkLassoStencilSource_SetShapeToSpline, METH_VARARGS, "V.SetShapeToSpline()\nC++: void SetShapeToSpline()\n\nThe shape to use, default is \"Polygon\". The spline is a cardinal\nspline. Bezier splines are not yet supported.\n"}, {"GetShapeAsString", PyvtkLassoStencilSource_GetShapeAsString, METH_VARARGS, "V.GetShapeAsString() -> string\nC++: virtual const char *GetShapeAsString()\n\nThe shape to use, default is \"Polygon\". The spline is a cardinal\nspline. Bezier splines are not yet supported.\n"}, {"SetPoints", PyvtkLassoStencilSource_SetPoints, METH_VARARGS, "V.SetPoints(vtkPoints)\nC++: virtual void SetPoints(vtkPoints *points)\n\nThe points that make up the lassoo. The loop does not have to be\nclosed, the last point will automatically be connected to the\nfirst point by a straight line segment.\n"}, {"GetPoints", PyvtkLassoStencilSource_GetPoints, METH_VARARGS, "V.GetPoints() -> vtkPoints\nC++: virtual vtkPoints *GetPoints()\n\nThe points that make up the lassoo. The loop does not have to be\nclosed, the last point will automatically be connected to the\nfirst point by a straight line segment.\n"}, {"GetSliceOrientation", PyvtkLassoStencilSource_GetSliceOrientation, METH_VARARGS, "V.GetSliceOrientation() -> int\nC++: virtual int GetSliceOrientation()\n\nThe slice orientation. The default is 2, which is XY. Other\nvalues are 0, which is YZ, and 1, which is XZ.\n"}, {"SetSliceOrientation", PyvtkLassoStencilSource_SetSliceOrientation, METH_VARARGS, "V.SetSliceOrientation(int)\nC++: virtual void SetSliceOrientation(int _arg)\n\nThe slice orientation. The default is 2, which is XY. Other\nvalues are 0, which is YZ, and 1, which is XZ.\n"}, {"GetSliceOrientationMinValue", PyvtkLassoStencilSource_GetSliceOrientationMinValue, METH_VARARGS, "V.GetSliceOrientationMinValue() -> int\nC++: virtual int GetSliceOrientationMinValue()\n\nThe slice orientation. The default is 2, which is XY. Other\nvalues are 0, which is YZ, and 1, which is XZ.\n"}, {"GetSliceOrientationMaxValue", PyvtkLassoStencilSource_GetSliceOrientationMaxValue, METH_VARARGS, "V.GetSliceOrientationMaxValue() -> int\nC++: virtual int GetSliceOrientationMaxValue()\n\nThe slice orientation. The default is 2, which is XY. Other\nvalues are 0, which is YZ, and 1, which is XZ.\n"}, {"SetSlicePoints", PyvtkLassoStencilSource_SetSlicePoints, METH_VARARGS, "V.SetSlicePoints(int, vtkPoints)\nC++: virtual void SetSlicePoints(int i, vtkPoints *points)\n\nThe points for a particular slice. This will override the points\nthat were set by calling SetPoints() for the slice. To clear the\nsetting, call SetSlicePoints(slice, nullptr).\n"}, {"GetSlicePoints", PyvtkLassoStencilSource_GetSlicePoints, METH_VARARGS, "V.GetSlicePoints(int) -> vtkPoints\nC++: virtual vtkPoints *GetSlicePoints(int i)\n\nThe points for a particular slice. This will override the points\nthat were set by calling SetPoints() for the slice. To clear the\nsetting, call SetSlicePoints(slice, nullptr).\n"}, {"RemoveAllSlicePoints", PyvtkLassoStencilSource_RemoveAllSlicePoints, METH_VARARGS, "V.RemoveAllSlicePoints()\nC++: virtual void RemoveAllSlicePoints()\n\nRemove points from all slices.\n"}, {"GetMTime", PyvtkLassoStencilSource_GetMTime, METH_VARARGS, "V.GetMTime() -> int\nC++: vtkMTimeType GetMTime() override;\n\nOverload GetMTime() to include the timestamp on the points.\n"}, {nullptr, nullptr, 0, nullptr} }; static PyTypeObject PyvtkLassoStencilSource_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "vtkImagingStencilPython.vtkLassoStencilSource", // 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 PyvtkLassoStencilSource_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 *PyvtkLassoStencilSource_StaticNew() { return vtkLassoStencilSource::New(); } PyObject *PyvtkLassoStencilSource_ClassNew() { PyVTKClass_Add( &PyvtkLassoStencilSource_Type, PyvtkLassoStencilSource_Methods, "vtkLassoStencilSource", &PyvtkLassoStencilSource_StaticNew); PyTypeObject *pytype = &PyvtkLassoStencilSource_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(); PyObject *d = pytype->tp_dict; PyObject *o; for (int c = 0; c < 2; c++) { static const struct { const char *name; int value; } constants[2] = { { "POLYGON", vtkLassoStencilSource::POLYGON }, { "SPLINE", vtkLassoStencilSource::SPLINE }, }; o = PyInt_FromLong(constants[c].value); if (o) { PyDict_SetItemString(d, constants[c].name, o); Py_DECREF(o); } } PyType_Ready(pytype); return (PyObject *)pytype; } void PyVTKAddFile_vtkLassoStencilSource( PyObject *dict) { PyObject *o; o = PyvtkLassoStencilSource_ClassNew(); if (o && PyDict_SetItemString(dict, "vtkLassoStencilSource", o) != 0) { Py_DECREF(o); } }