4 #include <visp3/ustk_core/usConfig.h>
6 #if defined(VISP_HAVE_MODULE_USTK_GUI) && defined(VISP_HAVE_MODULE_USTK_GRABBER) && defined(VISP_HAVE_MODULE_USTK_ELASTOGRAPHY)
8 #include <visp3/ustk_grabber/usNetworkGrabberRF2D.h>
9 #include <visp3/ustk_gui/usElastographyDisplayWidget.h>
10 #include <visp3/ustk_gui/usImageElastographyCreationWrapper.h>
12 #include <QApplication>
13 #include <QMainWindow>
15 int main(
int argc,
char **argv)
18 QApplication app(argc, argv);
19 app.setApplicationName(QString(
"USTK display widget"));
24 vpImage<vpRGBa> elastoImage(50, 50, vpRGBa(0, 200, 0, 254));
25 vpImage<unsigned char> strainImage(50, 50);
31 window.setCentralWidget(widget);
35 QThread *grabbingThread =
new QThread();
46 qtGrabber->moveToThread(grabbingThread);
47 grabbingThread->start();
54 QThread *elastoThread =
new QThread();
56 elastoGenerator->
setROI(270, 40, 500, 50);
57 elastoGenerator->moveToThread(elastoThread);
58 elastoThread->start();
60 qRegisterMetaType<vpImage<vpRGBa> >(
"vpImage<vpRGBa>");
61 QObject::connect(elastoGenerator, SIGNAL(elastographyImageReady(vpImage<vpRGBa>)), widget,
62 SLOT(updateFrame(vpImage<vpRGBa>)));
64 qRegisterMetaType<usImageRF2D<short int> >(
"usImageRF2D<short int>&");
86 grabbingThread->quit();
93 std::cout <<
"You should build ustk_gui and ustk_grabber to run this tutorial" << std::endl;
Qt wrapper for colored elastography image creation (pre-scan image with a colored rectangle overlay f...
void setROI(unsigned int i, unsigned int j, unsigned int height, unsigned int width)
Specific class to grab RF frames from the ultrasound station on the network.
bool initAcquisition(const usNetworkGrabber::usInitHeaderSent &header)
void setIPAddress(const std::string &s_ip)
void disconnectFromServer()