// python wrapper for vtkCirclePackFrontChainLayoutStrategy // #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 "vtkCirclePackFrontChainLayoutStrategy.h" extern "C" { VTK_ABI_EXPORT void PyVTKAddFile_vtkCirclePackFrontChainLayoutStrategy(PyObject *); } extern "C" { VTK_ABI_EXPORT PyObject *PyvtkCirclePackFrontChainLayoutStrategy_ClassNew(); } #ifndef DECLARED_PyvtkCirclePackLayoutStrategy_ClassNew extern "C" { PyObject *PyvtkCirclePackLayoutStrategy_ClassNew(); } #define DECLARED_PyvtkCirclePackLayoutStrategy_ClassNew #endif static const char *PyvtkCirclePackFrontChainLayoutStrategy_Doc = "vtkCirclePackFrontChainLayoutStrategy - layout a vtkTree into packed\ncircles using the front chain algorithm.\n\n" "Superclass: vtkCirclePackLayoutStrategy\n\n" "vtkCirclePackFrontChainLayoutStrategy assigns circles to each node of\n" "the input vtkTree using the front chain algorithm. The algorithm\n" "packs circles by searching a \"front chain\" of circles around the\n" "perimeter of the circles that have already been packed for the\n" "current level in the tree hierarchy. Searching the front chain is in\n" "general faster than searching all of the circles that have been\n" "packed at the current level.\n\n" "WARNING: The algorithm tends to break down and produce packings with\n" "overlapping circles when there is a large difference in the radii of\n" "the circles at a given level of the tree hierarchy. Roughly on the\n" "order a 1000:1 ratio of circle radii.\n\n" "Please see the following reference for more details on the algorithm.\n\n" "Title: \"Visualization of large hierarchical data by circle packing\"\n" "Authors: Weixin Wang, Hui Wang, Guozhong Dai, Hongan Wang\n" "Conference: Proceedings of the SIGCHI conference on Human Factors in\n" "computing systems Year: 2006\n\n"; static PyObject * PyvtkCirclePackFrontChainLayoutStrategy_IsTypeOf(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "IsTypeOf"); char *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetValue(temp0)) { int tempr = vtkCirclePackFrontChainLayoutStrategy::IsTypeOf(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCirclePackFrontChainLayoutStrategy_IsA(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "IsA"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCirclePackFrontChainLayoutStrategy *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->vtkCirclePackFrontChainLayoutStrategy::IsA(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCirclePackFrontChainLayoutStrategy_SafeDownCast(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "SafeDownCast"); vtkObjectBase *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkObjectBase")) { vtkCirclePackFrontChainLayoutStrategy *tempr = vtkCirclePackFrontChainLayoutStrategy::SafeDownCast(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkCirclePackFrontChainLayoutStrategy_NewInstance(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "NewInstance"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCirclePackFrontChainLayoutStrategy *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkCirclePackFrontChainLayoutStrategy *tempr = (ap.IsBound() ? op->NewInstance() : op->vtkCirclePackFrontChainLayoutStrategy::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 * PyvtkCirclePackFrontChainLayoutStrategy_Layout(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "Layout"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCirclePackFrontChainLayoutStrategy *op = static_cast(vp); vtkTree *temp0 = nullptr; vtkDataArray *temp1 = nullptr; vtkDataArray *temp2 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(3) && ap.GetVTKObject(temp0, "vtkTree") && ap.GetVTKObject(temp1, "vtkDataArray") && ap.GetVTKObject(temp2, "vtkDataArray")) { if (ap.IsBound()) { op->Layout(temp0, temp1, temp2); } else { op->vtkCirclePackFrontChainLayoutStrategy::Layout(temp0, temp1, temp2); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCirclePackFrontChainLayoutStrategy_GetWidth(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetWidth"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCirclePackFrontChainLayoutStrategy *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->GetWidth() : op->vtkCirclePackFrontChainLayoutStrategy::GetWidth()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCirclePackFrontChainLayoutStrategy_SetWidth(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetWidth"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCirclePackFrontChainLayoutStrategy *op = static_cast(vp); int temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetWidth(temp0); } else { op->vtkCirclePackFrontChainLayoutStrategy::SetWidth(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCirclePackFrontChainLayoutStrategy_GetHeight(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetHeight"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCirclePackFrontChainLayoutStrategy *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->GetHeight() : op->vtkCirclePackFrontChainLayoutStrategy::GetHeight()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCirclePackFrontChainLayoutStrategy_SetHeight(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetHeight"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCirclePackFrontChainLayoutStrategy *op = static_cast(vp); int temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetHeight(temp0); } else { op->vtkCirclePackFrontChainLayoutStrategy::SetHeight(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyMethodDef PyvtkCirclePackFrontChainLayoutStrategy_Methods[] = { {"IsTypeOf", PyvtkCirclePackFrontChainLayoutStrategy_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", PyvtkCirclePackFrontChainLayoutStrategy_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", PyvtkCirclePackFrontChainLayoutStrategy_SafeDownCast, METH_VARARGS, "V.SafeDownCast(vtkObjectBase)\n -> vtkCirclePackFrontChainLayoutStrategy\nC++: static vtkCirclePackFrontChainLayoutStrategy *SafeDownCast(\n vtkObjectBase *o)\n\n"}, {"NewInstance", PyvtkCirclePackFrontChainLayoutStrategy_NewInstance, METH_VARARGS, "V.NewInstance() -> vtkCirclePackFrontChainLayoutStrategy\nC++: vtkCirclePackFrontChainLayoutStrategy *NewInstance()\n\n"}, {"Layout", PyvtkCirclePackFrontChainLayoutStrategy_Layout, METH_VARARGS, "V.Layout(vtkTree, vtkDataArray, vtkDataArray)\nC++: void Layout(vtkTree *inputTree, vtkDataArray *areaArray,\n vtkDataArray *sizeArray) override;\n\nPerform the layout of the input tree, and store the circle bounds\nof each vertex as a tuple in a data array. (Xcenter, Ycenter,\nRadius).\n"}, {"GetWidth", PyvtkCirclePackFrontChainLayoutStrategy_GetWidth, METH_VARARGS, "V.GetWidth() -> int\nC++: virtual int GetWidth()\n\nWidth and Height define the size of the output window that the\ncircle packing is placed inside. Defaults to Width 1, Height 1\n"}, {"SetWidth", PyvtkCirclePackFrontChainLayoutStrategy_SetWidth, METH_VARARGS, "V.SetWidth(int)\nC++: virtual void SetWidth(int _arg)\n\nWidth and Height define the size of the output window that the\ncircle packing is placed inside. Defaults to Width 1, Height 1\n"}, {"GetHeight", PyvtkCirclePackFrontChainLayoutStrategy_GetHeight, METH_VARARGS, "V.GetHeight() -> int\nC++: virtual int GetHeight()\n\nWidth and Height define the size of the output window that the\ncircle packing is placed inside. Defaults to Width 1, Height 1\n"}, {"SetHeight", PyvtkCirclePackFrontChainLayoutStrategy_SetHeight, METH_VARARGS, "V.SetHeight(int)\nC++: virtual void SetHeight(int _arg)\n\nWidth and Height define the size of the output window that the\ncircle packing is placed inside. Defaults to Width 1, Height 1\n"}, {nullptr, nullptr, 0, nullptr} }; static PyTypeObject PyvtkCirclePackFrontChainLayoutStrategy_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "vtkInfovisLayoutPython.vtkCirclePackFrontChainLayoutStrategy", // 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 PyvtkCirclePackFrontChainLayoutStrategy_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 *PyvtkCirclePackFrontChainLayoutStrategy_StaticNew() { return vtkCirclePackFrontChainLayoutStrategy::New(); } PyObject *PyvtkCirclePackFrontChainLayoutStrategy_ClassNew() { PyVTKClass_Add( &PyvtkCirclePackFrontChainLayoutStrategy_Type, PyvtkCirclePackFrontChainLayoutStrategy_Methods, "vtkCirclePackFrontChainLayoutStrategy", &PyvtkCirclePackFrontChainLayoutStrategy_StaticNew); PyTypeObject *pytype = &PyvtkCirclePackFrontChainLayoutStrategy_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 *)PyvtkCirclePackLayoutStrategy_ClassNew(); PyType_Ready(pytype); return (PyObject *)pytype; } void PyVTKAddFile_vtkCirclePackFrontChainLayoutStrategy( PyObject *dict) { PyObject *o; o = PyvtkCirclePackFrontChainLayoutStrategy_ClassNew(); if (o && PyDict_SetItemString(dict, "vtkCirclePackFrontChainLayoutStrategy", o) != 0) { Py_DECREF(o); } }