1 #include <visp3/ustk_core/usConfig.h>
5 #include <visp3/ustk_core/usMHDSequenceReader.h>
6 #include <visp3/ustk_core/usMHDSequenceWriter.h>
7 #include <visp3/ustk_core/usRFToPreScan2DConverter.h>
9 int main(
int argc,
char **argv)
11 std::string sequenceDirectory;
13 std::cout <<
"\nUsage: " << argv[0] <<
" [--input /path/to/mhd/sequence ] \n" << std::endl;
17 for (
unsigned int i = 1; i < (
unsigned int)argc; i++) {
18 if (std::string(argv[i]) ==
"--input") {
19 sequenceDirectory = std::string(argv[i + 1]);
22 std::cout <<
"\nUsage: " << argv[0] <<
" [--input /path/to/mhd/sequence ] \n" << std::endl;
33 #if !defined(_WIN32) && (defined(__unix__) || defined(__unix) || (defined(__APPLE__) && defined(__MACH__)))
41 uint64_t timestamp = 0;
44 while (!reader.
end()) {
45 reader.
acquire(imageRF, timestamp);
46 converter.
convert(imageRF, imagePreScan);
47 writer.
write(imagePreScan, timestamp);
48 std::cout <<
"image " << inc <<
" successfully converted\n";
57 std::cout <<
"this tutorial requirest RF to pre-scan conversion, so you have to install FFTW thirdparty\n";
Reader for a sequence of images stored as mhd/raw files in a directory Image sequence files order hav...
void acquire(usImageRF2D< short int > &image, uint64_t ×tamp)
void setSequenceDirectory(const std::string sequenceDirectory)
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)
2D conversion from RF signal to pre-scan image
void convert(const usImageRF2D< short int > &rfImage, usImagePreScan2D< unsigned char > &preScanImage)