39 #include <visp3/ustk_core/usRFToPreScan3DConverter.h>
41 #if defined(USTK_HAVE_FFTW)
43 #ifdef VISP_HAVE_OPENMP
70 (((
int)rfImage.
getHeight()) != m_heightRF) || (((
int)rfImage.
getWidth()) != m_widthRF)) {
78 std::vector<usImagePreScan2D<unsigned char> > preScanFrame;
79 preScanFrame.resize(m_frameNumber);
80 std::vector<usImageRF2D<short int> > frameRF;
81 frameRF.resize(m_frameNumber);
84 for (
int i = 0; i < m_frameNumber; i++) {
92 #ifdef VISP_HAVE_OPENMP
93 #pragma omp parallel for
95 for (
int i = 0; i < m_frameNumber; i++) {
96 m_converter[i].
convert(frameRF[i], preScanFrame.at(i));
99 for (
int i = 0; i < m_frameNumber; i++) {
116 for (
int i = 0; i < m_frameNumber; i++)
118 m_decimationFactor = decimationFactor;
129 for (
int i = 0; i < frameNumber; i++) {
130 m_converter[i].init(widthRF, heightRF);
135 m_frameNumber = frameNumber;
136 m_heightRF = heightRF;
140 else if (m_frameNumber != frameNumber || m_heightRF != heightRF || m_widthRF != widthRF) {
141 for (
int i = 0; i < m_frameNumber; i++)
142 delete &(m_converter[i]);
144 m_frameNumber = frameNumber;
145 m_heightRF = heightRF;
148 for (
int i = 0; i < m_frameNumber; i++) {
149 m_converter[i].init(m_widthRF, m_heightRF);
unsigned int getHeight() const
void resize(unsigned int height, unsigned int width, unsigned int numberOfFrames)
void insertFrame(const usImagePreScan2D< Type > &frame, unsigned int index)
void setImagePreScanSettings(const usImagePreScanSettings &preScanSettings)
void setAxialResolution(const double axialResolution)
void getFrame(usImageRF2D< Type > &image, unsigned int index) const
unsigned int getWidth() const
unsigned int getHeight() const
unsigned int getNumberOfFrames() const
void setMotorSettings(const usMotorSettings &other)
2D conversion from RF signal to pre-scan image
void convert(const usImageRF2D< short int > &rfImage, usImagePreScan2D< unsigned char > &preScanImage)
void setDecimationFactor(int decimationFactor)
usRFToPreScan3DConverter()
void init(int heightRF, int widthRF, int frameNumber)
~usRFToPreScan3DConverter()
void setDecimationFactor(int decimationFactor)
int getDecimationFactor()
void convert(const usImageRF3D< short int > &rfImage, usImagePreScan3D< unsigned char > &preScanImage)