Skip to content

Studio/ShapeWorksMONAI/MonaiLabelTool.h

Namespaces

Name
shapeworks
User usage reporting (telemetry)
monailabel

Classes

Name
class monailabel::MonaiLabelTool

Source code

```cpp

pragma once

include

include

include

include

include

include

include

include

include

include

class Ui_MonaiLabelTool; class QLabel; class QTableWidget; class QLineEdit; class Preferences;

namespace shapeworks { class ShapeWorksStudioApp; class Session; } // namespace shapeworks namespace monailabel {

class MonaiLabelJob; using shapeworks::Session; using shapeworks::ShapeWorksStudioApp; class MonaiLabelTool : public QWidget { Q_OBJECT;

public: const static std::string MONAI_MODE_SEGMENTATION; const static std::string MONAI_MODE_DEEPGROW; const static std::string MONAI_MODE_DEEPEDIT; const static std::string MONAI_SAMPLE_STRATEGY_RANDOM;

MonaiLabelTool(Preferences& prefs); ~MonaiLabelTool();

void set_session(QSharedPointer session); void set_app(ShapeWorksStudioApp app); bool is_active(); void loadParamsFromUi(); void shutdown(); void runSegmentationTool(); void resizeEvent(QResizeEvent event) override; int getCurrentSampleNumber(); void enable_actions(); void activate();

public Q_SLOTS: void handle_error(QString msg); void onConnectServer(); void onServerAddressChanged(); void onModelTypeChanged(int index); void triggerUpdateView(); void handle_progress(int val, QString message); void handleSampleNumberChanged(); void handleClientInitialized(bool success); void handleUploadSampleCompleted(); void handleSegmentationCompleted(); void handleSubmitLabelCompleted();

Q_SIGNALS: void update_view(); void progress(int); void sampleChanged();

private:

void set_connect_button();

Preferences& preferences_; Ui_MonaiLabelTool ui_; QSharedPointer session_; ShapeWorksStudioApp app_; bool tool_is_running_ = false; QSharedPointer monai_label_job_; QElapsedTimer timer_;

std::string server_address_; std::string model_type_; std::string strategy_; std::string client_id_; int samples_processed_ = 0; };

} // namespace monailabel ```


Updated on 2026-03-31 at 16:02:11 +0000