#include <visp3/ustk_core/usConfig.h>
#ifdef USTK_HAVE_FFTW
#include <visp3/core/vpTime.h>
#include <visp3/ustk_core/usImageIo.h>
#include <visp3/ustk_core/usImageRF3D.h>
#include <visp3/ustk_core/usRFToPreScan3DConverter.h>
int main()
{
std::string filename;
if (!env_ipath.empty())
filename = env_ipath + "/rf/signal.rf";
else {
std::cout << "You should set USTK_DATASET_PATH environment var to access to ustk dataset" << std::endl;
return 0;
}
std::cout << filename << std::endl;
std::cout << "end reading" << std::endl;
double startTime = vpTime::measureTimeMs();
std::cout << "converting..." << std::endl;
converter.
convert(rfImage, prescanImage);
std::cout << prescanImage;
double endConvertTime = vpTime::measureTimeMs();
std::cout << "convert time (sec) = " << (endConvertTime - startTime) / 1000.0 << std::endl;
std::cout << "writing pre-scan..." << std::endl;
std::string outFileName = "preScan.png";
return 0;
}
#else
#include <iostream>
int main()
{
std::cout << "You should install FFTW library to run this tutorial" << std::endl;
return 0;
}
#endif
static void read(usImageRF2D< short int > &imageRf2D, const std::string &headerFileName)
static void write(const usImageRF2D< short > &rfImage, const std::string &headerFileName, const std::string &imageExtension2D)
2D conversion from RF signal to pre-scan image
void convert(const usImageRF2D< short int > &rfImage, usImagePreScan2D< unsigned char > &preScanImage)
void setDepth(double depth)
void setScanLinePitch(const double scanLinePitch)
void setTransducerRadius(const double transducerRadius)
VISP_EXPORT std::string getDataSetPath()