YundaTecAlgorithnm.cpp 658 B

1234567891011121314151617181920
  1. #include "YundaTecAlgorithnm.h"
  2. #include "GloabalVariables.h"
  3. json YundaTecAlgorithnm::CallAlgorithnm(string pluginName, string filePath, string modelPath, int* roiArr, string pcArg)
  4. {
  5. json resultJson = { {"flag", -1}, {"result" , ""} };
  6. auto model = GloabalVariables::GetAlgorithnmplugins()[pluginName];
  7. if (model != nullptr)
  8. {
  9. std::string result;
  10. int resultId = model->run(filePath.c_str(), roiArr, modelPath.c_str(), result, pcArg);
  11. resultJson = { {"flag", resultId}, {"result" , result} };
  12. }
  13. else
  14. {
  15. resultJson = { {"flag", -1}, {"result" , "Ë㷨δ¼ÓÔسɹ¦"} };
  16. }
  17. return resultJson;
  18. }