Skip to content

Commit 88a4c4e

Browse files
committed
Adding debug statements
1 parent 08a4662 commit 88a4c4e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Studio/ShapeWorksMONAI/MonaiLabelJob.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,15 @@ void MonaiLabelJob::initializeClient() {
7878
py::str py_server_url(server_url_);
7979
py::str py_tmp_dir(tmp_dir_);
8080
py::str py_client_id(client_id_);
81+
SW_DEBUG("Instantiating monai_client_class");
8182
monai_client_ = std::make_shared<py::object>(monai_client_class(py_server_url, py_tmp_dir, py_client_id));
83+
SW_DEBUG("Instantiating monai_client_class completed");
8284
if (!monai_client_) {
8385
SW_ERROR("Error in instantiating MONAI client");
8486
return;
85-
} else
87+
} else {
8688
SW_DEBUG("MONAI Client object created.");
89+
}
8790
model_name_ = getModelName(model_type_);
8891
models_available_[model_type_] = {model_name_};
8992
Q_EMIT triggerClientInitialized();
@@ -286,7 +289,10 @@ py::dict MonaiLabelJob::saveLabel(std::string image_in, std::string label_in, py
286289
//---------------------------------------------------------------------------
287290
void MonaiLabelJob::runSegmentationModel() {
288291
if (!monai_client_) {
292+
SW_DEBUG("MONAI client not initialized, initializing now...");
289293
initializeClient();
294+
} else {
295+
SW_DEBUG("MONAI client already initialized");
290296
}
291297

292298
SW_DEBUG("Waiting for Upload Sample Action...");

0 commit comments

Comments
 (0)