ImFusion C++ SDK 4.4.0
ImFusion::Internal::LoadModelWorker Class Reference

#include <ImFusionLabels/lib/include/ImFusion/Labels/Annotation/TotalSegmentatorAction.h>

A worker thread that loads ML models. More...

Inheritance diagram for ImFusion::Internal::LoadModelWorker:

Detailed Description

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::stringtakeModel ()
 Retrieves the model that has been loaded before.

Member Function Documentation

◆ loadModel()

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.

◆ 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.


The documentation for this class was generated from the following file:
  • ImFusionLabels/lib/include/ImFusion/Labels/Annotation/TotalSegmentatorAction.h
Search Tab / S to search, Esc to close