adding service worker structure for dicomscan skullremoval and volumepreparation

This commit is contained in:
Giovanni Fattori
2026-01-07 00:33:36 +01:00
parent 7e785c9a09
commit 61ba9d2e93
15 changed files with 1014 additions and 13 deletions
+9 -2
View File
@@ -84,6 +84,12 @@ MainWindow::MainWindow(QString p_loadPath){
loadPatient->moveToThread(loadPatient_thread);
loadPatient_thread->start();
// Volume preparation worker (detaches volumes from the loader thread)
volumePrep = new VolumePrepWorker;
volumePrep_thread = new QThread;
volumePrep->moveToThread(volumePrep_thread);
volumePrep_thread->start();
qRegisterMetaType< gPatientRTGeneralInfos* >("gPatientRTGeneralInfos *");
qRegisterMetaType< std::vector<std::string> >("std::vector<std::string>");
qRegisterMetaType< std::string >("std::string");
@@ -94,7 +100,8 @@ MainWindow::MainWindow(QString p_loadPath){
qRegisterMetaType<MarkerList>("MarkerList");
qRegisterMetaType<LocalizationParams>("LocalizationParams");
connect(loadPatient, SIGNAL(loadEnd(vtkImageData*)), Visualizer,SLOT(loadVolume (vtkImageData* )));
connect(loadPatient, SIGNAL(loadEnd(vtkImageData*)), volumePrep, SLOT(run(vtkImageData* )));
connect(volumePrep, SIGNAL(finished(vtkImageData*)), Visualizer, SLOT(loadVolume (vtkImageData* )));
connect(loadPatient, SIGNAL(folderIsEmpty()),this,SLOT(onParsedEmptyFolder()));
connect(loadPatient, SIGNAL(parse_result(int , gPatientRTGeneralInfos* )),this,SLOT(onParsedOK(int , gPatientRTGeneralInfos* )));
connect(loadPatient, SIGNAL(loadedRTIso(double*)),this,SLOT(onRTIsoAvailable(double*)));
@@ -562,7 +569,7 @@ void MainWindow::call_skullMask(){
Q_ARG(QString, "Skull masking..." ),
Q_ARG(int, 3000));
QMetaObject::invokeMethod(skullRemoval, "runFilter", Qt::QueuedConnection,
QMetaObject::invokeMethod(skullRemoval, "run", Qt::QueuedConnection,
Q_ARG(vtkImageData*, Visualizer->getVolume()),
Q_ARG(double, regGrownParameters[1]),
Q_ARG(double,regGrownParameters[0]));