// python wrapper for vtkPImageWriter // #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 "vtkPImageWriter.h" extern "C" { VTK_ABI_EXPORT void PyVTKAddFile_vtkPImageWriter(PyObject *); } extern "C" { VTK_ABI_EXPORT PyObject *PyvtkPImageWriter_ClassNew(); } #ifndef DECLARED_PyvtkImageWriter_ClassNew extern "C" { PyObject *PyvtkImageWriter_ClassNew(); } #define DECLARED_PyvtkImageWriter_ClassNew #endif static const char *PyvtkPImageWriter_Doc = "vtkPImageWriter - Writes images to files.\n\n" "Superclass: vtkImageWriter\n\n" "vtkPImageWriter writes images to files with any data type. The data\n" "type of the file is the same scalar type as the input. The\n" "dimensionality determines whether the data will be written in one or\n" "multiple files. This class is used as the superclass of most image\n" "writing classes such as vtkBMPWriter etc. It supports streaming.\n\n"; static PyObject * PyvtkPImageWriter_IsTypeOf(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "IsTypeOf"); char *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetValue(temp0)) { int tempr = vtkPImageWriter::IsTypeOf(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkPImageWriter_IsA(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "IsA"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPImageWriter *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->vtkPImageWriter::IsA(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkPImageWriter_SafeDownCast(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "SafeDownCast"); vtkObjectBase *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkObjectBase")) { vtkPImageWriter *tempr = vtkPImageWriter::SafeDownCast(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkPImageWriter_NewInstance(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "NewInstance"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPImageWriter *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkPImageWriter *tempr = (ap.IsBound() ? op->NewInstance() : op->vtkPImageWriter::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 * PyvtkPImageWriter_SetMemoryLimit(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetMemoryLimit"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPImageWriter *op = static_cast(vp); unsigned long temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetMemoryLimit(temp0); } else { op->vtkPImageWriter::SetMemoryLimit(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkPImageWriter_GetMemoryLimit(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetMemoryLimit"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPImageWriter *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { unsigned long tempr = (ap.IsBound() ? op->GetMemoryLimit() : op->vtkPImageWriter::GetMemoryLimit()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyMethodDef PyvtkPImageWriter_Methods[] = { {"IsTypeOf", PyvtkPImageWriter_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", PyvtkPImageWriter_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", PyvtkPImageWriter_SafeDownCast, METH_VARARGS, "V.SafeDownCast(vtkObjectBase) -> vtkPImageWriter\nC++: static vtkPImageWriter *SafeDownCast(vtkObjectBase *o)\n\n"}, {"NewInstance", PyvtkPImageWriter_NewInstance, METH_VARARGS, "V.NewInstance() -> vtkPImageWriter\nC++: vtkPImageWriter *NewInstance()\n\n"}, {"SetMemoryLimit", PyvtkPImageWriter_SetMemoryLimit, METH_VARARGS, "V.SetMemoryLimit(int)\nC++: virtual void SetMemoryLimit(unsigned long _arg)\n\nSet / Get the memory limit in kibibytes (1024 bytes). The writer\nwill stream to attempt to keep the pipeline size within this\nlimit\n"}, {"GetMemoryLimit", PyvtkPImageWriter_GetMemoryLimit, METH_VARARGS, "V.GetMemoryLimit() -> int\nC++: virtual unsigned long GetMemoryLimit()\n\nSet / Get the memory limit in kibibytes (1024 bytes). The writer\nwill stream to attempt to keep the pipeline size within this\nlimit\n"}, {nullptr, nullptr, 0, nullptr} }; static PyTypeObject PyvtkPImageWriter_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "vtkIOParallelPython.vtkPImageWriter", // 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 PyvtkPImageWriter_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 *PyvtkPImageWriter_StaticNew() { return vtkPImageWriter::New(); } PyObject *PyvtkPImageWriter_ClassNew() { PyVTKClass_Add( &PyvtkPImageWriter_Type, PyvtkPImageWriter_Methods, "vtkPImageWriter", &PyvtkPImageWriter_StaticNew); PyTypeObject *pytype = &PyvtkPImageWriter_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 *)PyvtkImageWriter_ClassNew(); PyType_Ready(pytype); return (PyObject *)pytype; } void PyVTKAddFile_vtkPImageWriter( PyObject *dict) { PyObject *o; o = PyvtkPImageWriter_ClassNew(); if (o && PyDict_SetItemString(dict, "vtkPImageWriter", o) != 0) { Py_DECREF(o); } }