#include <iostream>
#include <visp3/ustk_core/usConfig.h>
#if (defined(USTK_HAVE_QT5) || defined(USTK_HAVE_VTK_QT)) && \
(defined(VISP_HAVE_X11) || defined(VISP_HAVE_GDI) || defined(VISP_HAVE_OPENCV))
#include <QApplication>
#include <QtCore/QStringList>
#include <QtCore/QThread>
#include <visp3/ustk_core/usMHDSequenceWriter.h>
#include <visp3/ustk_grabber/usNetworkGrabberPreScan3D.h>
#include <visp3/gui/vpDisplayGDI.h>
#include <visp3/gui/vpDisplayOpenCV.h>
#include <visp3/gui/vpDisplayX.h>
int main(int argc, char **argv)
{
QApplication app(argc, argv);
if (qApp->arguments().contains(QString("--output"))) {
qApp->arguments().at(qApp->arguments().indexOf(QString("--output")) + 1).toStdString());
}
bool captureRunning = true;
std::cout << "init success" << std::endl;
std::cout << "waiting ultrasound initialisation..." << std::endl;
do {
grabbedFrame = qtGrabber->
acquire();
std::cout <<
"MAIN THREAD received volume No : " << grabbedFrame->
getVolumeCount() << std::endl;
} else {
vpTime::wait(10);
}
} while (captureRunning);
return app.exec();
}
#else
int main()
{
std::cout << "You should intall Qt5 (with wigdets and network modules), and display X to run this tutorial"
<< std::endl;
return 0;
}
#endif
Specific class to grab pre-scan volumes from the ultrasound station on the network.
bool isFirstFrameAvailable()
usVolumeGrabbedInfo< usImagePreScan3D< unsigned char > > * acquire()
void activateRecording(std::string path)
bool initAcquisition(const usNetworkGrabber::usInitHeaderSent &header)
void setIPAddress(const std::string &s_ip)
Class to store additionnal informations arriving on the network with ultrasound volumes grabbed,...
quint32 getVolumeCount() const