static int integration_type_set(BPy_UnaryFunction1DVoid *self, PyObject *value, void *UNUSED(closure)) { if (!BPy_IntegrationType_Check(value)) { PyErr_SetString(PyExc_TypeError, "value must be an IntegrationType"); return -1; } self->uf1D_void->setIntegrationType(IntegrationType_from_BPy_IntegrationType(value)); return 0; }
static int CurveNatureF1D___init__(BPy_CurveNatureF1D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"integration_type", NULL}; PyObject *obj = 0; if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) return -1; IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; self->py_uf1D_edgenature.uf1D_edgenature = new Functions1D::CurveNatureF1D(t); return 0; }
static int LocalAverageDepthF1D___init__(BPy_LocalAverageDepthF1D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"sigma", "integration_type", NULL}; PyObject *obj = 0; double d; if (!PyArg_ParseTupleAndKeywords(args, kwds, "d|O!", (char **)kwlist, &d, &IntegrationType_Type, &obj)) return -1; IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; self->py_uf1D_double.uf1D_double = new Functions1D::LocalAverageDepthF1D(d, t); return 0; }
static int GetSteerableViewMapDensityF1D___init__(BPy_GetSteerableViewMapDensityF1D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"level", "integration_type", "sampling", NULL}; PyObject *obj = 0; int i; float f = 2.0; if (!PyArg_ParseTupleAndKeywords(args, kwds, "i|O!f", (char **)kwlist, &i, &IntegrationType_Type, &obj, &f)) return -1; IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; self->py_uf1D_double.uf1D_double = new Functions1D::GetSteerableViewMapDensityF1D(i, t, f); return 0; }
static int UnaryFunction1DVoid___init__(BPy_UnaryFunction1DVoid *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"integration", NULL}; PyObject *obj = 0; if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) return -1; if (!obj) self->uf1D_void = new UnaryFunction1D_void(); else { self->uf1D_void = new UnaryFunction1D_void(IntegrationType_from_BPy_IntegrationType(obj)); } self->uf1D_void->py_uf1D = (PyObject *)self; return 0; }
static int UnaryFunction1DVectorViewShape___init__(BPy_UnaryFunction1DVectorViewShape *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"integration", NULL}; PyObject *obj = 0; if (!PyArg_ParseTupleAndKeywords( args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) return -1; if (!obj) { self->uf1D_vectorviewshape = new UnaryFunction1D<std::vector<ViewShape *>>(); } else { self->uf1D_vectorviewshape = new UnaryFunction1D<std::vector<ViewShape *>>( IntegrationType_from_BPy_IntegrationType(obj)); } self->uf1D_vectorviewshape->py_uf1D = (PyObject *)self; return 0; }