UsTK : Ultrasound ToolKit
version 2.0.1 under development (2024-11-21)
|
#include <visp3/ustk_core/usPreScanToPostScan3DConverter.h>
Public Member Functions | |
usPreScanToPostScan3DConverter () | |
usPreScanToPostScan3DConverter (const usImagePreScan3D< unsigned char > &preScanImage, double down) | |
virtual | ~usPreScanToPostScan3DConverter () |
void | convert (usImagePostScan3D< unsigned char > &postScanImage, const usImagePreScan3D< unsigned char > &preScanImage) |
void | init (const usImagePreScan3D< unsigned char > &preScanImage, double down=1) |
void | setConverterOptimizationMethod (usConverterOptimizationMethod method) |
usConverterOptimizationMethod | setConverterOptimizationMethod () const |
double | getResolution () const |
void | SweepInZdirection (bool flag) |
Protected Attributes | |
usConverterOptimizationMethod | m_converterOptimizationMethod |
usConverterOptimizationMethod | m_conversionOptimizationMethodUsedAtInit |
std::vector< usVoxelWeightAndIndex > | m_lookupTables [2] |
std::vector< usVoxelWeightAndIndexReducedMemory > | m_reducedLookupTables [2] |
void * | m_GPULookupTables [2] |
long int | m_GPULookupTablesSize [2] |
usImagePreScan3D< unsigned char > | m_VpreScan |
double | m_downSamplingFactor |
double | m_resolution |
bool | m_SweepInZdirection |
unsigned int | m_nbX |
unsigned int | m_nbY |
unsigned int | m_nbZ |
bool | m_initDone |
3D scan converter
This class allows to convert 3D pre-scan ultrasound images to post-scan. The converter can be initialized through init() and then applied through convert(). This class accepts only images acquired by a convex transducer and a tilting motor for now. The optimization method used to perform the conversion can be set through setConverterOptimizationMethod() before the call to init().
Considering the following usImagePreScan3D image as input:
this class generates an usImagePostScan3D (convex or linear) as output:
Here is an example of how to use this converter :
Definition at line 109 of file usPreScanToPostScan3DConverter.h.
Definition at line 112 of file usPreScanToPostScan3DConverter.h.
usPreScanToPostScan3DConverter::usPreScanToPostScan3DConverter | ( | ) |
Default constructor.
Definition at line 47 of file usPreScanToPostScan3DConverter.cpp.
usPreScanToPostScan3DConverter::usPreScanToPostScan3DConverter | ( | const usImagePreScan3D< unsigned char > & | preScanImage, |
double | down | ||
) |
Initialisation constructor.
preScanImage | Pre-scan image to convert, with settings filled (transducer and motor). |
down | Downsampling factor (sample number divided by this number). |
Definition at line 59 of file usPreScanToPostScan3DConverter.cpp.
References init().
|
virtual |
Destructor.
Definition at line 439 of file usPreScanToPostScan3DConverter.cpp.
void usPreScanToPostScan3DConverter::convert | ( | usImagePostScan3D< unsigned char > & | postScanImage, |
const usImagePreScan3D< unsigned char > & | preScanImage | ||
) |
Conversion method : compute the scan-conversion 3D and write the post-scan image settings.
[out] | postScanImage | The result of the scan-conversion. |
[in] | preScanImage | Pre-scan image to convert. |
Definition at line 446 of file usPreScanToPostScan3DConverter.cpp.
References usImagePreScan3D< Type >::getBModeSampleNumber(), usImage3D< Type >::getConstData(), usImage3D< Type >::getData(), usImage3D< Type >::getHeight(), usImage3D< Type >::getNumberOfFrames(), usImage3D< Type >::getWidth(), GPU_DIRECT_CONVERSION, GPU_FULL_LOOKUP_TABLE, GPU_REDUCED_LOOKUP_TABLE, init(), usImage3D< Type >::initData(), m_converterOptimizationMethod, m_downSamplingFactor, m_lookupTables, m_nbX, m_nbY, m_nbZ, m_reducedLookupTables, m_resolution, m_SweepInZdirection, m_VpreScan, MULTI_THREAD_DIRECT_CONVERSION, MULTI_THREAD_FULL_LOOKUP_TABLE, MULTI_THREAD_REDUCED_LOOKUP_TABLE, usImage3D< Type >::resize(), usImagePostScan3D< Type >::setElementSpacingX(), usImagePostScan3D< Type >::setElementSpacingY(), usImagePostScan3D< Type >::setElementSpacingZ(), usMotorSettings::setMotorSettings(), usImagePostScan3D< Type >::setScanLineDepth(), usTransducerSettings::setTransducerSettings(), SINGLE_THREAD_DIRECT_CONVERSION, SINGLE_THREAD_FULL_LOOKUP_TABLE, and SINGLE_THREAD_REDUCED_LOOKUP_TABLE.
Referenced by usRFToPostScan3DConverter::convert().
|
inline |
Definition at line 174 of file usPreScanToPostScan3DConverter.h.
References m_resolution.
void usPreScanToPostScan3DConverter::init | ( | const usImagePreScan3D< unsigned char > & | preScanImage, |
double | down = 1 |
||
) |
Initialisation method.
preScanImage | Pre-scan image to convert, with settings filled (transducer and motor). |
down | Down-sampling factor. |
Definition at line 71 of file usPreScanToPostScan3DConverter.cpp.
References usImagePreScanSettings::getAxialResolution(), usImage3D< Type >::getHeight(), usMotorSettings::getMotorType(), usImage3D< Type >::getNumberOfFrames(), usImage3D< Type >::getWidth(), GPU_DIRECT_CONVERSION, GPU_FULL_LOOKUP_TABLE, GPU_REDUCED_LOOKUP_TABLE, usTransducerSettings::isTransducerConvex(), m_conversionOptimizationMethodUsedAtInit, m_converterOptimizationMethod, m_downSamplingFactor, m_GPULookupTablesSize, m_initDone, m_lookupTables, m_nbX, m_nbY, m_nbZ, m_reducedLookupTables, m_resolution, m_VpreScan, MULTI_THREAD_DIRECT_CONVERSION, MULTI_THREAD_FULL_LOOKUP_TABLE, MULTI_THREAD_REDUCED_LOOKUP_TABLE, SINGLE_THREAD_DIRECT_CONVERSION, SINGLE_THREAD_FULL_LOOKUP_TABLE, SINGLE_THREAD_REDUCED_LOOKUP_TABLE, and usMotorSettings::TiltingMotor.
Referenced by usRFToPostScan3DConverter::convert(), convert(), and usPreScanToPostScan3DConverter().
|
inline |
Definition at line 172 of file usPreScanToPostScan3DConverter.h.
References m_converterOptimizationMethod.
void usPreScanToPostScan3DConverter::setConverterOptimizationMethod | ( | usConverterOptimizationMethod | method | ) |
Choose the method used for the optimization of the conversion.
method | optimization method. |
Definition at line 740 of file usPreScanToPostScan3DConverter.cpp.
References GPU_DIRECT_CONVERSION, GPU_FULL_LOOKUP_TABLE, GPU_REDUCED_LOOKUP_TABLE, m_converterOptimizationMethod, MULTI_THREAD_DIRECT_CONVERSION, MULTI_THREAD_FULL_LOOKUP_TABLE, MULTI_THREAD_REDUCED_LOOKUP_TABLE, SINGLE_THREAD_DIRECT_CONVERSION, SINGLE_THREAD_FULL_LOOKUP_TABLE, and SINGLE_THREAD_REDUCED_LOOKUP_TABLE.
|
inline |
Definition at line 176 of file usPreScanToPostScan3DConverter.h.
References m_SweepInZdirection.
|
protected |
Definition at line 142 of file usPreScanToPostScan3DConverter.h.
Referenced by init().
|
protected |
Definition at line 141 of file usPreScanToPostScan3DConverter.h.
Referenced by convert(), init(), and setConverterOptimizationMethod().
|
protected |
Definition at line 152 of file usPreScanToPostScan3DConverter.h.
|
protected |
Definition at line 147 of file usPreScanToPostScan3DConverter.h.
|
protected |
Definition at line 148 of file usPreScanToPostScan3DConverter.h.
Referenced by init().
|
protected |
Definition at line 160 of file usPreScanToPostScan3DConverter.h.
Referenced by init().
|
protected |
Definition at line 145 of file usPreScanToPostScan3DConverter.h.
|
protected |
Definition at line 156 of file usPreScanToPostScan3DConverter.h.
|
protected |
Definition at line 157 of file usPreScanToPostScan3DConverter.h.
|
protected |
Definition at line 158 of file usPreScanToPostScan3DConverter.h.
|
protected |
Definition at line 146 of file usPreScanToPostScan3DConverter.h.
|
protected |
Definition at line 153 of file usPreScanToPostScan3DConverter.h.
Referenced by convert(), getResolution(), and init().
|
protected |
Definition at line 154 of file usPreScanToPostScan3DConverter.h.
Referenced by convert(), and SweepInZdirection().
|
protected |
Definition at line 150 of file usPreScanToPostScan3DConverter.h.