UsTK : Ultrasound ToolKit  version 2.0.1 under development (2024-11-21)
portaAcquisitionVispDisplayQtServer.cpp
1 // std includes
2 #include <iostream>
3 
4 // Visp includes
5 #include <visp3/core/vpConfig.h>
6 #include <visp3/core/vpException.h>
7 #include <visp3/core/vpImage.h>
8 
9 // Qt includes
10 #include <QtWidgets/QApplication>
11 
12 // local includes
13 #include "usNetworkServer.h"
14 #include "usServerMainWindow.h"
15 
16 int main(int argc, char *argv[])
17 {
18  QApplication a(argc, argv);
19  usNetworkServer server;
20 
21  if (a.arguments().contains(QString("--probeSettingsFile"))) {
22  std::cout << "using settings file : "
23  << a.arguments().at(a.arguments().indexOf(QString("--probeSettingsFile")) + 1).toStdString() << std::endl;
24  server.useProbeConfigFile(
25  a.arguments().at(a.arguments().indexOf(QString("--probeSettingsFile")) + 1).toStdString());
26  }
27 
28  if (a.arguments().contains(QString("--usm"))) {
29  std::cout << "using usm version : "
30  << a.arguments().at(a.arguments().indexOf(QString("--usm")) + 1).toStdString() << std::endl;
31  server.setUSMVersion(
32  a.arguments().at(a.arguments().indexOf(QString("--usm")) + 1).toInt());
33  }
34 
35  if (a.arguments().contains(QString("--pci"))) {
36  std::cout << "using pci version : "
37  << a.arguments().at(a.arguments().indexOf(QString("--pci")) + 1).toStdString() << std::endl;
38  server.setPCIVersion(
39  a.arguments().at(a.arguments().indexOf(QString("--pci")) + 1).toInt());
40  }
41 
43 
44  QObject::connect(window,SIGNAL(startServer()), &server, SLOT(startServerSlot()));
45  QObject::connect(window,SIGNAL(stopServer()), &server, SLOT(stopServerSlot()));
46 
47  window->show();
48  window->activateWindow();
49 
50  return a.exec();
51 }
void useProbeConfigFile(std::string configFileName)
void setPCIVersion(int pciVersion)
void setUSMVersion(int usmVersion)