1234567891011121314151617181920 |
- #include "YundaTecAlgorithnm.h"
- #include "GloabalVariables.h"
- json YundaTecAlgorithnm::CallAlgorithnm(string pluginName, string filePath, string modelPath, int* roiArr, string pcArg)
- {
- json resultJson = { {"flag", -1}, {"result" , ""} };
- auto model = GloabalVariables::GetAlgorithnmplugins()[pluginName];
- if (model != nullptr)
- {
- std::string result;
- int resultId = model->run(filePath.c_str(), roiArr, modelPath.c_str(), result, pcArg);
- resultJson = { {"flag", resultId}, {"result" , result} };
- }
- else
- {
- resultJson = { {"flag", -1}, {"result" , "Ë㷨δ¼ÓÔسɹ¦"} };
- }
- return resultJson;
- }
|