// python wrapper for vtkGeoImageNode // #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 "vtkGeoImageNode.h" extern "C" { VTK_ABI_EXPORT void PyVTKAddFile_vtkGeoImageNode(PyObject *); } extern "C" { VTK_ABI_EXPORT PyObject *PyvtkGeoImageNode_ClassNew(); } #ifndef DECLARED_PyvtkGeoTreeNode_ClassNew extern "C" { PyObject *PyvtkGeoTreeNode_ClassNew(); } #define DECLARED_PyvtkGeoTreeNode_ClassNew #endif static const char *PyvtkGeoImageNode_Doc = "vtkGeoImageNode - A node in a multi-resolution image tree.\n\n" "Superclass: vtkGeoTreeNode\n\n" "vtkGeoImageNode contains an image tile in a multi-resolution image\n" "tree, along with metadata about that image's extents.\n\n" "@sa\n" "vtkGeoTreeNode vtkGeoTerrainNode\n\n"; static PyObject * PyvtkGeoImageNode_IsTypeOf(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "IsTypeOf"); char *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetValue(temp0)) { int tempr = vtkGeoImageNode::IsTypeOf(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkGeoImageNode_IsA(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "IsA"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoImageNode *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->vtkGeoImageNode::IsA(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkGeoImageNode_SafeDownCast(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "SafeDownCast"); vtkObjectBase *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkObjectBase")) { vtkGeoImageNode *tempr = vtkGeoImageNode::SafeDownCast(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkGeoImageNode_NewInstance(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "NewInstance"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoImageNode *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkGeoImageNode *tempr = (ap.IsBound() ? op->NewInstance() : op->vtkGeoImageNode::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 * PyvtkGeoImageNode_GetChild(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetChild"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoImageNode *op = static_cast(vp); int temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { vtkGeoImageNode *tempr = (ap.IsBound() ? op->GetChild(temp0) : op->vtkGeoImageNode::GetChild(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkGeoImageNode_GetParent(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetParent"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoImageNode *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkGeoImageNode *tempr = (ap.IsBound() ? op->GetParent() : op->vtkGeoImageNode::GetParent()); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkGeoImageNode_GetImage(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetImage"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoImageNode *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkImageData *tempr = (ap.IsBound() ? op->GetImage() : op->vtkGeoImageNode::GetImage()); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkGeoImageNode_SetImage(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetImage"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoImageNode *op = static_cast(vp); vtkImageData *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkImageData")) { if (ap.IsBound()) { op->SetImage(temp0); } else { op->vtkGeoImageNode::SetImage(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkGeoImageNode_GetTexture(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetTexture"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoImageNode *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkTexture *tempr = (ap.IsBound() ? op->GetTexture() : op->vtkGeoImageNode::GetTexture()); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkGeoImageNode_SetTexture(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetTexture"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoImageNode *op = static_cast(vp); vtkTexture *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkTexture")) { if (ap.IsBound()) { op->SetTexture(temp0); } else { op->vtkGeoImageNode::SetTexture(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkGeoImageNode_CropImageForTile(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "CropImageForTile"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoImageNode *op = static_cast(vp); vtkImageData *temp0 = nullptr; int size1 = ap.GetArgSize(1); vtkPythonArgs::Array store1(2*size1); double *temp1 = store1.Data(); double *save1 = (size1 == 0 ? nullptr : temp1 + size1); char *temp2 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(2, 3) && ap.GetVTKObject(temp0, "vtkImageData") && ap.GetArray(temp1, size1) && (ap.NoArgsLeft() || ap.GetValue(temp2))) { ap.SaveArray(temp1, save1, size1); if (ap.IsBound()) { op->CropImageForTile(temp0, temp1, temp2); } else { op->vtkGeoImageNode::CropImageForTile(temp0, temp1, temp2); } if (ap.ArrayHasChanged(temp1, save1, size1) && !ap.ErrorOccurred()) { ap.SetArray(1, temp1, size1); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkGeoImageNode_LoadAnImage(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "LoadAnImage"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoImageNode *op = static_cast(vp); char *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->LoadAnImage(temp0); } else { op->vtkGeoImageNode::LoadAnImage(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkGeoImageNode_ShallowCopy(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "ShallowCopy"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoImageNode *op = static_cast(vp); vtkGeoTreeNode *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkGeoTreeNode")) { if (ap.IsBound()) { op->ShallowCopy(temp0); } else { op->vtkGeoImageNode::ShallowCopy(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkGeoImageNode_DeepCopy(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "DeepCopy"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoImageNode *op = static_cast(vp); vtkGeoTreeNode *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkGeoTreeNode")) { if (ap.IsBound()) { op->DeepCopy(temp0); } else { op->vtkGeoImageNode::DeepCopy(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkGeoImageNode_HasData(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "HasData"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoImageNode *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { bool tempr = (ap.IsBound() ? op->HasData() : op->vtkGeoImageNode::HasData()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkGeoImageNode_DeleteData(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "DeleteData"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoImageNode *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->DeleteData(); } else { op->vtkGeoImageNode::DeleteData(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyMethodDef PyvtkGeoImageNode_Methods[] = { {"IsTypeOf", PyvtkGeoImageNode_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", PyvtkGeoImageNode_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", PyvtkGeoImageNode_SafeDownCast, METH_VARARGS, "V.SafeDownCast(vtkObjectBase) -> vtkGeoImageNode\nC++: static vtkGeoImageNode *SafeDownCast(vtkObjectBase *o)\n\n"}, {"NewInstance", PyvtkGeoImageNode_NewInstance, METH_VARARGS, "V.NewInstance() -> vtkGeoImageNode\nC++: vtkGeoImageNode *NewInstance()\n\n"}, {"GetChild", PyvtkGeoImageNode_GetChild, METH_VARARGS, "V.GetChild(int) -> vtkGeoImageNode\nC++: vtkGeoImageNode *GetChild(int idx)\n\nEvery subclass implements these methods returning the specific\ntype. This is easier than templating.\n"}, {"GetParent", PyvtkGeoImageNode_GetParent, METH_VARARGS, "V.GetParent() -> vtkGeoImageNode\nC++: vtkGeoImageNode *GetParent()\n\nEvery subclass implements these methods returning the specific\ntype. This is easier than templating.\n"}, {"GetImage", PyvtkGeoImageNode_GetImage, METH_VARARGS, "V.GetImage() -> vtkImageData\nC++: vtkImageData *GetImage()\n\nGet the image tile.\n"}, {"SetImage", PyvtkGeoImageNode_SetImage, METH_VARARGS, "V.SetImage(vtkImageData)\nC++: void SetImage(vtkImageData *image)\n\nGet the image tile.\n"}, {"GetTexture", PyvtkGeoImageNode_GetTexture, METH_VARARGS, "V.GetTexture() -> vtkTexture\nC++: vtkTexture *GetTexture()\n\nGet the image tile.\n"}, {"SetTexture", PyvtkGeoImageNode_SetTexture, METH_VARARGS, "V.SetTexture(vtkTexture)\nC++: void SetTexture(vtkTexture *texture)\n\nGet the image tile.\n"}, {"CropImageForTile", PyvtkGeoImageNode_CropImageForTile, METH_VARARGS, "V.CropImageForTile(vtkImageData, [float, ...], string)\nC++: void CropImageForTile(vtkImageData *image,\n double *imageLonLatExt, const char *prefix=nullptr)\n\nThis crops the image as small as possible while still covering\nthe patch. The Longitude Latitude range may get bigger to\nreflect the actual size of the image. If prefix is specified,\nwrites the tile to that location.\n"}, {"LoadAnImage", PyvtkGeoImageNode_LoadAnImage, METH_VARARGS, "V.LoadAnImage(string)\nC++: void LoadAnImage(const char *prefix)\n\nThis loads the image from a tile database at the specified\nlocation.\n"}, {"ShallowCopy", PyvtkGeoImageNode_ShallowCopy, METH_VARARGS, "V.ShallowCopy(vtkGeoTreeNode)\nC++: void ShallowCopy(vtkGeoTreeNode *src) override;\n\nShallow and Deep copy.\n"}, {"DeepCopy", PyvtkGeoImageNode_DeepCopy, METH_VARARGS, "V.DeepCopy(vtkGeoTreeNode)\nC++: void DeepCopy(vtkGeoTreeNode *src) override;\n\nShallow and Deep copy.\n"}, {"HasData", PyvtkGeoImageNode_HasData, METH_VARARGS, "V.HasData() -> bool\nC++: bool HasData() override;\n\nReturns whether this node has valid data associated with it, or\nif it is an \"empty\" node.\n"}, {"DeleteData", PyvtkGeoImageNode_DeleteData, METH_VARARGS, "V.DeleteData()\nC++: void DeleteData() override;\n\nDeletes the data associated with the node to make this an \"empty\"\nnode. This is performed when the node has been unused for a\ncertain amount of time.\n"}, {nullptr, nullptr, 0, nullptr} }; static PyTypeObject PyvtkGeoImageNode_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "vtkGeovisCorePython.vtkGeoImageNode", // 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 PyvtkGeoImageNode_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 *PyvtkGeoImageNode_StaticNew() { return vtkGeoImageNode::New(); } PyObject *PyvtkGeoImageNode_ClassNew() { PyVTKClass_Add( &PyvtkGeoImageNode_Type, PyvtkGeoImageNode_Methods, "vtkGeoImageNode", &PyvtkGeoImageNode_StaticNew); PyTypeObject *pytype = &PyvtkGeoImageNode_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 *)PyvtkGeoTreeNode_ClassNew(); PyType_Ready(pytype); return (PyObject *)pytype; } void PyVTKAddFile_vtkGeoImageNode( PyObject *dict) { PyObject *o; o = PyvtkGeoImageNode_ClassNew(); if (o && PyDict_SetItemString(dict, "vtkGeoImageNode", o) != 0) { Py_DECREF(o); } }