UsTK : Ultrasound ToolKit  version 2.0.1 under development (2024-11-23)
usRFToPreScan3DConverter.h
1 /****************************************************************************
2  *
3  * This file is part of the ustk software.
4  * Copyright (C) 2016 - 2017 by Inria. All rights reserved.
5  *
6  * This software is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * ("GPL") version 2 as published by the Free Software Foundation.
9  * See the file LICENSE.txt at the root directory of this source
10  * distribution for additional information about the GNU GPL.
11  *
12  * For using ustk with software that can not be combined with the GNU
13  * GPL, please contact Inria about acquiring a ViSP Professional
14  * Edition License.
15  *
16  * This software was developed at:
17  * Inria Rennes - Bretagne Atlantique
18  * Campus Universitaire de Beaulieu
19  * 35042 Rennes Cedex
20  * France
21  *
22  * If you have questions regarding the use of this file, please contact
23  * Inria at ustk@inria.fr
24  *
25  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
26  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
27  *
28  * Authors:
29  * Pedro Patlan
30  * Marc Pouliquen
31  *
32  *****************************************************************************/
33 
39 #ifndef __usRFToPreScan3DConverter_h_
40 #define __usRFToPreScan3DConverter_h_
41 
42 #include <visp3/ustk_core/usConfig.h>
43 
44 #if defined(USTK_HAVE_FFTW)
45 // external includes
46 #include <fftw3.h>
47 
48 // std includes
49 #include <cmath>
50 #include <complex>
51 #include <vector>
52 
53 // visp/ustk includes
54 #include <visp3/ustk_core/usImagePreScan3D.h>
55 #include <visp3/ustk_core/usImageRF3D.h>
56 #include <visp3/ustk_core/usLogCompressor.h>
57 #include <visp3/ustk_core/usRFToPreScan2DConverter.h>
58 
109 class VISP_EXPORT usRFToPreScan3DConverter
110 {
111 public:
113 
115 
116  void convert(const usImageRF3D<short int> &rfImage, usImagePreScan3D<unsigned char> &preScanImage);
117 
118  int getDecimationFactor();
119 
120  void setDecimationFactor(int decimationFactor);
121 
122 protected:
123  void init(int heightRF, int widthRF, int frameNumber);
124 
125 private:
126  usRFToPreScan2DConverter *m_converter;
127  int m_frameNumber;
128  int m_widthRF;
129  int m_heightRF;
130  bool m_isInit;
131  int m_decimationFactor;
132 };
133 
134 #endif // USTK_HAVE_FFTW
135 #endif // __usRFToPreScan3DConverter_h_
2D conversion from RF signal to pre-scan image
3D conversion from RF signal to pre-scan image