#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))
#include <QApplication>
#include <QStringList>
#include <QtCore/QThread>
#include <visp3/ustk_grabber/usNetworkGrabberPreScan3D.h>
#include <visp3/ustk_core/usImageIo.h>
#include <visp3/gui/vpDisplayGDI.h>
#include <visp3/gui/vpDisplayX.h>
int main(int argc, char **argv)
{
QApplication app(argc, argv);
if (qApp->arguments().contains(QString("--record"))) {
qApp->arguments().at(qApp->arguments().indexOf(QString("--record")) + 1).toStdString());
}
bool captureRunning = true;
do {
grabbedFrame = qtGrabber->
acquire();
std::cout <<
"MAIN THREAD received volume No : " << grabbedFrame->
getVolumeCount() << std::endl;
char buffer[FILENAME_MAX];
snprintf(buffer, FILENAME_MAX,
"volumePreScan%d.mhd", grabbedFrame->
getVolumeCount());
} while (captureRunning);
return 0;
}
#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
@ US_ANGLE_PITCH_3
8 motor steps per frame = 1.4634 degrees
static void write(const usImageRF2D< short > &rfImage, const std::string &headerFileName, const std::string &imageExtension2D)
Specific class to grab pre-scan volumes from the ultrasound station on the network.
usVolumeGrabbedInfo< usImagePreScan3D< unsigned char > > * acquire()
void activateRecording(std::string path)
void setFramesPerVolume(int framesPerVolume)
bool initAcquisition(const usNetworkGrabber::usInitHeaderSent &header)
bool sendAcquisitionParameters()
void setStepsPerFrame(usAcquisitionParameters::usMotorStep stepsPerFrame)
void setMotorActivation(bool activateMotor)
Class to store additionnal informations arriving on the network with ultrasound volumes grabbed,...
quint32 getVolumeCount() const