1 #include <visp3/ustk_core/usConfig.h>
3 #if defined(USTK_HAVE_FFTW)
5 #include <visp3/ustk_core/usImageIo.h>
6 #include <visp3/ustk_core/usImagePreScan2D.h>
7 #include <visp3/ustk_core/usImageRF2D.h>
8 #include <visp3/ustk_core/usRFToPreScan2DConverter.h>
9 #include <visp3/ustk_core/usRfReader.h>
11 int main(
int argc,
char **argv)
13 std::string rf_filename;
15 for (
int i = 0; i < argc; i++) {
16 if (std::string(argv[i]) ==
"--input")
17 rf_filename = std::string(argv[i + 1]);
18 else if (std::string(argv[i]) ==
"--help") {
19 std::cout <<
"\nUsage: " << argv[0] <<
" [--input <rfData.rf>] [--help]\n" << std::endl;
25 if (rf_filename.empty()) {
27 if (!env_ipath.empty())
28 rf_filename = env_ipath +
"/rf/signal.rf";
30 std::cout <<
"You should set USTK_DATASET_PATH environment var to access to ustk dataset" << std::endl;
42 converter.
convert(rfImage, preScanImage);
51 int main() { std::cout <<
"You should install libfftw to run the Rf to pre-scan conversion" << std::endl; }
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)
VISP_EXPORT std::string getDataSetPath()