4 #include <visp3/ustk_core/usConfig.h>
6 #if (defined(USTK_HAVE_QT5) || defined(USTK_HAVE_VTK_QT)) && \
7 (defined(VISP_HAVE_X11) || defined(VISP_HAVE_GDI) || defined(VISP_HAVE_OPENCV))
9 #include <QApplication>
10 #include <QtCore/QStringList>
11 #include <QtCore/QThread>
13 #include <visp3/ustk_core/usMHDSequenceWriter.h>
14 #include <visp3/ustk_core/usRFToPreScan3DConverter.h>
15 #include <visp3/ustk_grabber/usNetworkGrabberRF3D.h>
17 #include <visp3/gui/vpDisplayGDI.h>
18 #include <visp3/gui/vpDisplayOpenCV.h>
19 #include <visp3/gui/vpDisplayX.h>
21 int main(
int argc,
char **argv)
24 QApplication app(argc, argv);
26 if (app.arguments().contains(QString(
"--output"))) {
27 outputPath = app.arguments().at(app.arguments().indexOf(QString(
"--output")) + 1);
48 if (!outputPath.isEmpty()) {
52 bool captureRunning =
true;
56 std::cout <<
"init success" << std::endl;
59 std::cout <<
"waiting ultrasound initialisation..." << std::endl;
64 grabbedVolume = qtGrabber->
acquire();
66 std::cout <<
"MAIN THREAD received volume No : " << grabbedVolume->
getVolumeCount() << std::endl;
69 converter.
convert(*grabbedVolume, preScanImage);
71 if (!outputPath.isEmpty())
77 }
while (captureRunning);
85 std::cout <<
"You should intall Qt5 (with wigdets and network modules), and display X to run this tutorial"
Writer for a sequence of images stored as mhd/raw files in a directory Image filenames are set based ...
void setSequenceDirectory(const std::string sequenceDirectory)
void write(const usImageRF2D< short int > &image, const uint64_t timestamp)
Specific class to grab RF volumes from the ultrasound station on the network.
usVolumeGrabbedInfo< usImageRF3D< short int > > * acquire()
bool isFirstFrameAvailable()
bool initAcquisition(const usNetworkGrabber::usInitHeaderSent &header)
void setIPAddress(const std::string &s_ip)
3D conversion from RF signal to pre-scan image
void convert(const usImageRF3D< short int > &rfImage, usImagePreScan3D< unsigned char > &preScanImage)
Class to store additionnal informations arriving on the network with ultrasound volumes grabbed,...
std::vector< uint64_t > getTimeStamps() const
quint32 getVolumeCount() const