// cout << "Finished fitting and wrote result mesh and isomap to files with basename " << outputfile.stem().stem() << "." << endl;
//
// return EXIT_SUCCESS;
//}
PYBIND11_PLUGIN(fit){
py::modulem("fit","fit example");
/**
* General bindings, for OpenCV vector types and cv::Mat:
* - cv::Vec2f
* - cv::Vec4f
* - cv::Mat (only 1-channel matrices and only conversion of CV_32F C++ matrices to Python, and conversion of CV_32FC1 and CV_64FC1 matrices from Python to C++)
*/
//py::class_<cv::Vec2f>(fit, "Vec2f", "Wrapper for OpenCV's cv::Vec2f type.")
//.def("__init__", [](cv::Vec2f& vec, py::buffer b) {
// py::buffer_info info = b.request();
// if (info.ndim != 1)
// throw std::runtime_error("Buffer ndim is " + std::to_string(info.ndim) + ", please hand a buffer with dimension == 1 to create a Vec2f.");
// if (info.strides.size() != 1)
// throw std::runtime_error("strides.size() is " + std::to_string(info.strides.size()) + ", please hand a buffer with strides.size() == 1 to create a Vec2f.");
// // Todo: Should add a check that checks for default stride sizes, everything else would not work yet I think.
// if (info.shape.size() != 1)
// throw std::runtime_error("shape.size() is " + std::to_string(info.shape.size()) + ", please hand a buffer with shape dimension == 1 to create a Vec2f.");
// if (info.shape[0] != 2)
// throw std::runtime_error("shape[0] is " + std::to_string(info.shape[0]) + ", please hand a buffer with 2 entries to create a Vec2f.");
// if (info.format == py::format_descriptor<float>::format()) {
// cv::Mat temp(1, 2, CV_32FC1, info.ptr);
// // std::cout << temp << std::endl;
// new (&vec) cv::Vec2f(temp);
// } else {
// throw std::runtime_error("Not given a buffer of type float - please hand a buffer of type float to create a Vec2f.");