![]() |
ImFusion C++ SDK 4.4.0
|
#include <ImFusionLabels/lib/include/ImFusion/Labels/Annotation/TotalSegmentatorAction.h>
A worker thread that loads ML models. More...
A worker thread that loads ML models.
Instances should be moved to a QThread for this to make any sense.
Signals | |
| void | modelLoaded () |
Public Member Functions | |
| LoadModelWorker (QObject *parent=nullptr) | |
| void | loadModel (const std::string &infoJson) |
| Loads the model from the config file and emits modelLoaded once done. | |
| Utils::Expected< std::unique_ptr< ML::MachineLearningModel >, std::string > | takeModel () |
| Retrieves the model that has been loaded before. | |
| void ImFusion::Internal::LoadModelWorker::loadModel | ( | const std::string & | infoJson | ) |
Loads the model from the config file and emits modelLoaded once done.
The model can be retrieved with takeModel. The signal is always emitted even if the model fails to load. Overwrites any previous model that hasn't been retrieved by takeModel.
| Utils::Expected< std::unique_ptr< ML::MachineLearningModel >, std::string > ImFusion::Internal::LoadModelWorker::takeModel | ( | ) |
Retrieves the model that has been loaded before.
This method should only be called after modelLoaded has been emitted.