4 #include <visp3/ustk_core/usConfig.h>
6 #if (defined(USTK_HAVE_QT5) || defined(USTK_HAVE_VTK_QT)) && defined(USTK_HAVE_FFTW)
8 #include <QApplication>
9 #include <QtCore/QThread>
11 #include <visp3/ustk_grabber/usNetworkGrabberRF3D.h>
13 int main(
int argc,
char **argv)
16 QApplication app(argc, argv);
21 std::string preCompressedDirectory, postCompressedDirectory;
24 if (qApp->arguments().contains(QString(
"--preCompressed"))) {
25 preCompressedDirectory =
26 qApp->arguments().at(qApp->arguments().indexOf(QString(
"--preCompressed")) + 1).toStdString();
28 std::cout <<
"You need to specify the directory to record the pre-compressed volumes with --preCompressed option\n";
29 throw vpException(vpException::fatalError,
"No output directory specified for pre-compressed volumes !");
31 if (qApp->arguments().contains(QString(
"--postCompressed"))) {
32 postCompressedDirectory =
33 qApp->arguments().at(qApp->arguments().indexOf(QString(
"--postCompressed")) + 1).toStdString();
36 <<
"You need to specify the directory to record the post-compressed volumes with --postCompressed option\n";
37 throw vpException(vpException::fatalError,
"No output directory specified for post-compressed volumes !");
59 std::cout <<
"Start pre-compressed volumes acquisition" << std::endl;
62 double t0 = vpTime::measureTimeMs();
65 grabbedFrame = qtGrabber->
acquire();
67 std::cout <<
"MAIN THREAD received volume No : " << grabbedFrame->
getVolumeCount() << std::endl;
73 }
while (vpTime::measureTimeMs() - t0 < 10000);
79 std::cout <<
"NOW MOVE THE PROBE DOWN TO ACQUIRE POST-COMPRESSED FRAMES (5sec before next acquisition)" << std::endl;
100 std::cout <<
"Start post-compressed volumes acquisition" << std::endl;
103 t0 = vpTime::measureTimeMs();
106 grabbedFrame = qtGrabber->
acquire();
108 std::cout <<
"MAIN THREAD received volume No : " << grabbedFrame->
getVolumeCount() << std::endl;
113 t0 = vpTime::measureTimeMs();
115 }
while (vpTime::measureTimeMs() - t0 < 10000);
125 std::cout <<
"You should intall FFTW and Qt to run this tutorial" << std::endl;
@ US_ANGLE_PITCH_3
8 motor steps per frame = 1.4634 degrees
Specific class to grab RF volumes from the ultrasound station on the network.
void activateRecording(std::string path)
usVolumeGrabbedInfo< usImageRF3D< short int > > * acquire()
bool isFirstFrameAvailable()
void setFramesPerVolume(int framesPerVolume)
bool initAcquisition(const usNetworkGrabber::usInitHeaderSent &header)
bool sendAcquisitionParameters()
void disconnectFromServer()
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