#include <iostream>
#include <visp3/ustk_core/usConfig.h>
#if defined(VISP_HAVE_MODULE_USTK_GUI) && defined(VISP_HAVE_MODULE_USTK_GRABBER) && defined(VISP_HAVE_MODULE_USTK_ELASTOGRAPHY)
#include <visp3/ustk_grabber/usNetworkGrabberRF2D.h>
#include <visp3/ustk_gui/usElastographyDisplayWidget.h>
#include <visp3/ustk_gui/usImageElastographyCreationWrapper.h>
#include <QApplication>
#include <QMainWindow>
int main(int argc, char **argv)
{
QApplication app(argc, argv);
app.setApplicationName(QString("USTK display widget"));
vpImage<vpRGBa> elastoImage(50, 50, vpRGBa(0, 200, 0, 254));
vpImage<unsigned char> strainImage(50, 50);
QMainWindow window;
window.setCentralWidget(widget);
window.show();
QThread *grabbingThread = new QThread();
qtGrabber->moveToThread(grabbingThread);
grabbingThread->start();
QThread *elastoThread = new QThread();
elastoGenerator->
setROI(270, 40, 500, 50);
elastoGenerator->moveToThread(elastoThread);
elastoThread->start();
qRegisterMetaType<vpImage<vpRGBa> >("vpImage<vpRGBa>");
QObject::connect(elastoGenerator, SIGNAL(elastographyImageReady(vpImage<vpRGBa>)), widget,
SLOT(updateFrame(vpImage<vpRGBa>)));
qRegisterMetaType<usImageRF2D<short int> >("usImageRF2D<short int>&");
app.exec();
grabbingThread->quit();
return 0;
}
#else
int main()
{
std::cout << "You should build ustk_gui and ustk_grabber to run this tutorial" << std::endl;
return 0;
}
#endif
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()