// python wrapper for vtkImageStencilToImage // #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 "vtkImageStencilToImage.h" extern "C" { VTK_ABI_EXPORT void PyVTKAddFile_vtkImageStencilToImage(PyObject *); } extern "C" { VTK_ABI_EXPORT PyObject *PyvtkImageStencilToImage_ClassNew(); } #ifndef DECLARED_PyvtkImageAlgorithm_ClassNew extern "C" { PyObject *PyvtkImageAlgorithm_ClassNew(); } #define DECLARED_PyvtkImageAlgorithm_ClassNew #endif static const char *PyvtkImageStencilToImage_Doc = "vtkImageStencilToImage - Convert an image stencil into an image\n\n" "Superclass: vtkImageAlgorithm\n\n" "vtkImageStencilToImage will convert an image stencil into a binary\n" "image. The default output will be an 8-bit image with a value of 1\n" "inside the stencil and 0 outside. When used in combination with\n" "vtkPolyDataToImageStencil or vtkImplicitFunctionToImageStencil, this\n" "can be used to create a binary image from a mesh or a function.\n" "@sa\n" "vtkImplicitModeller\n\n"; static PyObject * PyvtkImageStencilToImage_IsTypeOf(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "IsTypeOf"); char *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetValue(temp0)) { int tempr = vtkImageStencilToImage::IsTypeOf(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkImageStencilToImage_IsA(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "IsA"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkImageStencilToImage *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->vtkImageStencilToImage::IsA(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkImageStencilToImage_SafeDownCast(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "SafeDownCast"); vtkObjectBase *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkObjectBase")) { vtkImageStencilToImage *tempr = vtkImageStencilToImage::SafeDownCast(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkImageStencilToImage_NewInstance(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "NewInstance"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkImageStencilToImage *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkImageStencilToImage *tempr = (ap.IsBound() ? op->NewInstance() : op->vtkImageStencilToImage::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 * PyvtkImageStencilToImage_SetOutsideValue(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetOutsideValue"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkImageStencilToImage *op = static_cast(vp); double temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetOutsideValue(temp0); } else { op->vtkImageStencilToImage::SetOutsideValue(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkImageStencilToImage_GetOutsideValue(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetOutsideValue"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkImageStencilToImage *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { double tempr = (ap.IsBound() ? op->GetOutsideValue() : op->vtkImageStencilToImage::GetOutsideValue()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkImageStencilToImage_SetInsideValue(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetInsideValue"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkImageStencilToImage *op = static_cast(vp); double temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetInsideValue(temp0); } else { op->vtkImageStencilToImage::SetInsideValue(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkImageStencilToImage_GetInsideValue(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetInsideValue"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkImageStencilToImage *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { double tempr = (ap.IsBound() ? op->GetInsideValue() : op->vtkImageStencilToImage::GetInsideValue()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkImageStencilToImage_SetOutputScalarType(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetOutputScalarType"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkImageStencilToImage *op = static_cast(vp); int temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetOutputScalarType(temp0); } else { op->vtkImageStencilToImage::SetOutputScalarType(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkImageStencilToImage_GetOutputScalarType(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetOutputScalarType"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkImageStencilToImage *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->GetOutputScalarType() : op->vtkImageStencilToImage::GetOutputScalarType()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkImageStencilToImage_SetOutputScalarTypeToFloat(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetOutputScalarTypeToFloat"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkImageStencilToImage *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->SetOutputScalarTypeToFloat(); } else { op->vtkImageStencilToImage::SetOutputScalarTypeToFloat(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkImageStencilToImage_SetOutputScalarTypeToDouble(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetOutputScalarTypeToDouble"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkImageStencilToImage *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->SetOutputScalarTypeToDouble(); } else { op->vtkImageStencilToImage::SetOutputScalarTypeToDouble(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkImageStencilToImage_SetOutputScalarTypeToInt(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetOutputScalarTypeToInt"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkImageStencilToImage *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->SetOutputScalarTypeToInt(); } else { op->vtkImageStencilToImage::SetOutputScalarTypeToInt(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkImageStencilToImage_SetOutputScalarTypeToUnsignedInt(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetOutputScalarTypeToUnsignedInt"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkImageStencilToImage *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->SetOutputScalarTypeToUnsignedInt(); } else { op->vtkImageStencilToImage::SetOutputScalarTypeToUnsignedInt(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkImageStencilToImage_SetOutputScalarTypeToLong(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetOutputScalarTypeToLong"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkImageStencilToImage *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->SetOutputScalarTypeToLong(); } else { op->vtkImageStencilToImage::SetOutputScalarTypeToLong(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkImageStencilToImage_SetOutputScalarTypeToUnsignedLong(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetOutputScalarTypeToUnsignedLong"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkImageStencilToImage *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->SetOutputScalarTypeToUnsignedLong(); } else { op->vtkImageStencilToImage::SetOutputScalarTypeToUnsignedLong(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkImageStencilToImage_SetOutputScalarTypeToShort(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetOutputScalarTypeToShort"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkImageStencilToImage *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->SetOutputScalarTypeToShort(); } else { op->vtkImageStencilToImage::SetOutputScalarTypeToShort(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkImageStencilToImage_SetOutputScalarTypeToUnsignedShort(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetOutputScalarTypeToUnsignedShort"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkImageStencilToImage *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->SetOutputScalarTypeToUnsignedShort(); } else { op->vtkImageStencilToImage::SetOutputScalarTypeToUnsignedShort(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkImageStencilToImage_SetOutputScalarTypeToUnsignedChar(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetOutputScalarTypeToUnsignedChar"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkImageStencilToImage *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->SetOutputScalarTypeToUnsignedChar(); } else { op->vtkImageStencilToImage::SetOutputScalarTypeToUnsignedChar(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkImageStencilToImage_SetOutputScalarTypeToChar(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetOutputScalarTypeToChar"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkImageStencilToImage *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->SetOutputScalarTypeToChar(); } else { op->vtkImageStencilToImage::SetOutputScalarTypeToChar(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyMethodDef PyvtkImageStencilToImage_Methods[] = { {"IsTypeOf", PyvtkImageStencilToImage_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", PyvtkImageStencilToImage_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", PyvtkImageStencilToImage_SafeDownCast, METH_VARARGS, "V.SafeDownCast(vtkObjectBase) -> vtkImageStencilToImage\nC++: static vtkImageStencilToImage *SafeDownCast(vtkObjectBase *o)\n\n"}, {"NewInstance", PyvtkImageStencilToImage_NewInstance, METH_VARARGS, "V.NewInstance() -> vtkImageStencilToImage\nC++: vtkImageStencilToImage *NewInstance()\n\n"}, {"SetOutsideValue", PyvtkImageStencilToImage_SetOutsideValue, METH_VARARGS, "V.SetOutsideValue(float)\nC++: virtual void SetOutsideValue(double _arg)\n\nThe value to use outside the stencil. The default is 0.\n"}, {"GetOutsideValue", PyvtkImageStencilToImage_GetOutsideValue, METH_VARARGS, "V.GetOutsideValue() -> float\nC++: virtual double GetOutsideValue()\n\nThe value to use outside the stencil. The default is 0.\n"}, {"SetInsideValue", PyvtkImageStencilToImage_SetInsideValue, METH_VARARGS, "V.SetInsideValue(float)\nC++: virtual void SetInsideValue(double _arg)\n\nThe value to use inside the stencil. The default is 1.\n"}, {"GetInsideValue", PyvtkImageStencilToImage_GetInsideValue, METH_VARARGS, "V.GetInsideValue() -> float\nC++: virtual double GetInsideValue()\n\nThe value to use inside the stencil. The default is 1.\n"}, {"SetOutputScalarType", PyvtkImageStencilToImage_SetOutputScalarType, METH_VARARGS, "V.SetOutputScalarType(int)\nC++: virtual void SetOutputScalarType(int _arg)\n\nThe desired output scalar type. The default is unsigned char.\n"}, {"GetOutputScalarType", PyvtkImageStencilToImage_GetOutputScalarType, METH_VARARGS, "V.GetOutputScalarType() -> int\nC++: virtual int GetOutputScalarType()\n\nThe desired output scalar type. The default is unsigned char.\n"}, {"SetOutputScalarTypeToFloat", PyvtkImageStencilToImage_SetOutputScalarTypeToFloat, METH_VARARGS, "V.SetOutputScalarTypeToFloat()\nC++: void SetOutputScalarTypeToFloat()\n\nThe desired output scalar type. The default is unsigned char.\n"}, {"SetOutputScalarTypeToDouble", PyvtkImageStencilToImage_SetOutputScalarTypeToDouble, METH_VARARGS, "V.SetOutputScalarTypeToDouble()\nC++: void SetOutputScalarTypeToDouble()\n\nThe desired output scalar type. The default is unsigned char.\n"}, {"SetOutputScalarTypeToInt", PyvtkImageStencilToImage_SetOutputScalarTypeToInt, METH_VARARGS, "V.SetOutputScalarTypeToInt()\nC++: void SetOutputScalarTypeToInt()\n\nThe desired output scalar type. The default is unsigned char.\n"}, {"SetOutputScalarTypeToUnsignedInt", PyvtkImageStencilToImage_SetOutputScalarTypeToUnsignedInt, METH_VARARGS, "V.SetOutputScalarTypeToUnsignedInt()\nC++: void SetOutputScalarTypeToUnsignedInt()\n\nThe desired output scalar type. The default is unsigned char.\n"}, {"SetOutputScalarTypeToLong", PyvtkImageStencilToImage_SetOutputScalarTypeToLong, METH_VARARGS, "V.SetOutputScalarTypeToLong()\nC++: void SetOutputScalarTypeToLong()\n\nThe desired output scalar type. The default is unsigned char.\n"}, {"SetOutputScalarTypeToUnsignedLong", PyvtkImageStencilToImage_SetOutputScalarTypeToUnsignedLong, METH_VARARGS, "V.SetOutputScalarTypeToUnsignedLong()\nC++: void SetOutputScalarTypeToUnsignedLong()\n\nThe desired output scalar type. The default is unsigned char.\n"}, {"SetOutputScalarTypeToShort", PyvtkImageStencilToImage_SetOutputScalarTypeToShort, METH_VARARGS, "V.SetOutputScalarTypeToShort()\nC++: void SetOutputScalarTypeToShort()\n\nThe desired output scalar type. The default is unsigned char.\n"}, {"SetOutputScalarTypeToUnsignedShort", PyvtkImageStencilToImage_SetOutputScalarTypeToUnsignedShort, METH_VARARGS, "V.SetOutputScalarTypeToUnsignedShort()\nC++: void SetOutputScalarTypeToUnsignedShort()\n\nThe desired output scalar type. The default is unsigned char.\n"}, {"SetOutputScalarTypeToUnsignedChar", PyvtkImageStencilToImage_SetOutputScalarTypeToUnsignedChar, METH_VARARGS, "V.SetOutputScalarTypeToUnsignedChar()\nC++: void SetOutputScalarTypeToUnsignedChar()\n\nThe desired output scalar type. The default is unsigned char.\n"}, {"SetOutputScalarTypeToChar", PyvtkImageStencilToImage_SetOutputScalarTypeToChar, METH_VARARGS, "V.SetOutputScalarTypeToChar()\nC++: void SetOutputScalarTypeToChar()\n\nThe desired output scalar type. The default is unsigned char.\n"}, {nullptr, nullptr, 0, nullptr} }; static PyTypeObject PyvtkImageStencilToImage_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "vtkImagingStencilPython.vtkImageStencilToImage", // 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 PyvtkImageStencilToImage_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 *PyvtkImageStencilToImage_StaticNew() { return vtkImageStencilToImage::New(); } PyObject *PyvtkImageStencilToImage_ClassNew() { PyVTKClass_Add( &PyvtkImageStencilToImage_Type, PyvtkImageStencilToImage_Methods, "vtkImageStencilToImage", &PyvtkImageStencilToImage_StaticNew); PyTypeObject *pytype = &PyvtkImageStencilToImage_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 *)PyvtkImageAlgorithm_ClassNew(); PyType_Ready(pytype); return (PyObject *)pytype; } void PyVTKAddFile_vtkImageStencilToImage( PyObject *dict) { PyObject *o; o = PyvtkImageStencilToImage_ClassNew(); if (o && PyDict_SetItemString(dict, "vtkImageStencilToImage", o) != 0) { Py_DECREF(o); } }