UsTK : Ultrasound ToolKit  version 2.0.1 under development (2023-12-07)
tutorial-elastography-2D-basic.cpp
#include <iostream>
#include <visp3/ustk_core/usConfig.h>
#if defined(USTK_HAVE_FFTW)
#include <visp3/ustk_elastography/usElastography.h>
#include <visp3/io/vpImageIo.h>
#include <visp3/ustk_core/usImageIo.h>
int main()
{
// prepare image;
std::string image1 = us::getDataSetPath() + std::string("/RFElasto/image00012.mhd");
std::string image2 = us::getDataSetPath() + std::string("/RFElasto/image00015.mhd");
usImageIo::read(preComp, image1.c_str());
usImageIo::read(postComp, image2.c_str());
usElastography elastography(preComp, postComp);
elastography.setDecimationFactor(1);
elastography.setROI(40, 2500, 50, 500);
// computate elasto
vpImage<unsigned char> strainImage;
strainImage = elastography.run();
vpImageIo::write(strainImage, "outputElasto.png");
return 0;
}
#else
int main()
{
std::cout << "You should intall FFTW to run this tutorial" << std::endl;
return 0;
}
#endif
Computation of a strain map using two sucessive RF images acquired at different compressions of the p...
vpImage< unsigned char > run()
void setROI(int tx, int ty, int tw, int th)
void setDecimationFactor(unsigned int decimationFactor)
static void read(usImageRF2D< short int > &imageRf2D, const std::string &headerFileName)
Definition: usImageIo.cpp:153
VISP_EXPORT std::string getDataSetPath()
Definition: us.cpp:54