py_parula.cpp 1019 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. )
  14. {
  15. double r, g, b;
  16. igl::parula(f, r, g, b);
  17. return std::make_tuple(r,g,b);
  18. }, __doc_igl_parula,
  19. py::arg("f"));
  20. m.def("parula", []
  21. (
  22. const double f,
  23. double & r,
  24. double & g,
  25. double & b
  26. )
  27. {
  28. return igl::parula(f, r, g, b);
  29. }, __doc_igl_parula,
  30. py::arg("f"), py::arg("r"), py::arg("g"), py::arg("b"));
  31. m.def("parula", []
  32. (
  33. const Eigen::MatrixXd& Z,
  34. const bool normalize,
  35. Eigen::MatrixXd& C
  36. )
  37. {
  38. assert_is_VectorX("Z",Z);
  39. return igl::parula(Z, normalize, C);
  40. }, __doc_igl_parula,
  41. py::arg("Z"), py::arg("normalize"), py::arg("C"));
  42. m.def("parula", []
  43. (
  44. const Eigen::MatrixXd& Z,
  45. const double min_Z,
  46. const double max_Z,
  47. Eigen::MatrixXd& C
  48. )
  49. {
  50. assert_is_VectorX("Z",Z);
  51. return igl::parula(Z, min_Z, max_Z, C);
  52. }, __doc_igl_parula,
  53. py::arg("Z"), py::arg("min_Z"), py::arg("max_Z"), py::arg("C"));