Skip to content

monailabel::MonaiLabelJob

Inherits from shapeworks::Job, QObject

Public Slots

Name
void onUploadSampleClicked()
void onRunSegmentationClicked()
void onSubmitLabelClicked()

Public Signals

Name
void triggerUpdateView()
void triggerClientInitialized()
void triggerUploadSampleCompleted()
void triggerSegmentationCompleted()
void triggerSubmitLabelCompleted()

Public Functions

Name
MonaiLabelJob(QSharedPointer< Session > session, const std::string & server_url, const std::string & client_id, const std::string & strategy, const std::string & model_type)
~MonaiLabelJob()
void setServer(const std::string & server_url)
void setModelType(const std::string & model_type)
const std::string & getServer()
void setClientId(const std::string & client_id ="")
const std::string & getClientId()
void initializeClient()
std::shared_ptr< py::object > getClient() const
py::dict getInfo()
std::string getModelName(std::string modelType)
std::vector< std::string > getModelNames(const std::string & model_type)
std::string getSessionId()
py::dict getParamsFromConfig(std::string section, std::string name)
py::dict nextSample(std::string strategy, py::dict params)
py::tuple infer(std::string model, std::string image_in, py::dict params, std::string label_in, std::string file, std::string session_id)
py::dict saveLabel(std::string image_in, std::string label_in, py::dict params)
py::dict uploadImage(std::string image_in, std::string image_id)
void updateShapes()
void runSegmentationModel()
virtual void run() override
run the job
virtual QString name() override
get the name of the job
void python_message(std::string str)
void setCurrentSampleNumber(int n)

Public Attributes

Name
const std::string MONAI_RESULT_EXTENSION
const std::string MONAI_RESULT_DTYPE

Additional inherited members

Public Signals inherited from shapeworks::Job

Name
void progress(double , QString ="")
void finished()

Public Functions inherited from shapeworks::Job

Name
Job()
virtual ~Job()
virtual QString get_completion_message()
get a message to display when the job is complete
virtual QString get_abort_message()
get a message to display when the job is aborted
void start_timer()
start the timer
qint64 timer_elapsed()
how much time has elapsed since the timer was started
void set_complete(bool complete)
set the job as complete
bool is_complete() const
is the job complete?
void abort()
abort the job
bool is_aborted() const
was the job aborted?
void set_quiet_mode(bool quiet)
set to quiet mode (no progress messages)
bool get_quiet_mode()
get quiet mode

Public Slots Documentation

slot onUploadSampleClicked

void onUploadSampleClicked()

slot onRunSegmentationClicked

void onRunSegmentationClicked()

slot onSubmitLabelClicked

void onSubmitLabelClicked()

Public Signals Documentation

signal triggerUpdateView

void triggerUpdateView()

signal triggerClientInitialized

void triggerClientInitialized()

signal triggerUploadSampleCompleted

void triggerUploadSampleCompleted()

signal triggerSegmentationCompleted

void triggerSegmentationCompleted()

signal triggerSubmitLabelCompleted

void triggerSubmitLabelCompleted()

Public Functions Documentation

function MonaiLabelJob

MonaiLabelJob(
    QSharedPointer< Session > session,
    const std::string & server_url,
    const std::string & client_id,
    const std::string & strategy,
    const std::string & model_type
)

function ~MonaiLabelJob

~MonaiLabelJob()

function setServer

void setServer(
    const std::string & server_url
)

function setModelType

void setModelType(
    const std::string & model_type
)

function getServer

inline const std::string & getServer()

function setClientId

void setClientId(
    const std::string & client_id =""
)

function getClientId

inline const std::string & getClientId()

function initializeClient

void initializeClient()

function getClient

inline std::shared_ptr< py::object > getClient() const

function getInfo

py::dict getInfo()

function getModelName

std::string getModelName(
    std::string modelType
)

function getModelNames

std::vector< std::string > getModelNames(
    const std::string & model_type
)

function getSessionId

std::string getSessionId()

function getParamsFromConfig

py::dict getParamsFromConfig(
    std::string section,
    std::string name
)

function nextSample

py::dict nextSample(
    std::string strategy,
    py::dict params
)

function infer

py::tuple infer(
    std::string model,
    std::string image_in,
    py::dict params,
    std::string label_in,
    std::string file,
    std::string session_id
)

function saveLabel

py::dict saveLabel(
    std::string image_in,
    std::string label_in,
    py::dict params
)

function uploadImage

py::dict uploadImage(
    std::string image_in,
    std::string image_id
)

function updateShapes

void updateShapes()

function runSegmentationModel

void runSegmentationModel()

function run

virtual void run() override

run the job

Reimplements: shapeworks::Job::run

function name

virtual QString name() override

get the name of the job

Reimplements: shapeworks::Job::name

function python_message

void python_message(
    std::string str
)

function setCurrentSampleNumber

void setCurrentSampleNumber(
    int n
)

Public Attributes Documentation

variable MONAI_RESULT_EXTENSION

static const std::string MONAI_RESULT_EXTENSION;

variable MONAI_RESULT_DTYPE

static const std::string MONAI_RESULT_DTYPE;

Updated on 2024-11-11 at 19:51:45 +0000