py_parula.cpp 864 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. //m.def("parula", []
  2. //(
  3. // const double f,
  4. // T * rgb
  5. //)
  6. //{
  7. // return igl::parula(f, rgb);
  8. //}, __doc_igl_parula,
  9. //py::arg("f"), py::arg("rgb"));
  10. m.def("parula", []
  11. (
  12. const double f,
  13. double & r,
  14. double & g,
  15. double & b
  16. )
  17. {
  18. return igl::parula(f, r, g, b);
  19. }, __doc_igl_parula,
  20. py::arg("f"), py::arg("r"), py::arg("g"), py::arg("b"));
  21. m.def("parula", []
  22. (
  23. const Eigen::MatrixXd& Z,
  24. const bool normalize,
  25. Eigen::MatrixXd& C
  26. )
  27. {
  28. assert_is_VectorX("Z",Z);
  29. return igl::parula(Z, normalize, C);
  30. }, __doc_igl_parula,
  31. py::arg("Z"), py::arg("normalize"), py::arg("C"));
  32. m.def("parula", []
  33. (
  34. const Eigen::MatrixXd& Z,
  35. const double min_Z,
  36. const double max_Z,
  37. Eigen::MatrixXd& C
  38. )
  39. {
  40. assert_is_VectorX("Z",Z);
  41. return igl::parula(Z, min_Z, max_Z, C);
  42. }, __doc_igl_parula,
  43. py::arg("Z"), py::arg("min_Z"), py::arg("max_Z"), py::arg("C"));