PlusLib
2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
|
This class converts ultrasound RF data to brightness values. More...
#include <src/PlusImageProcessing/vtkPlusRfToBrightnessConvert.h>
Public Types | |
typedef vtkThreadedImageAlgorithm | Superclass |
Public Member Functions | |
virtual double | GetBrightnessScale () |
virtual const char * | GetClassName () |
virtual US_IMAGE_TYPE | GetImageType () |
virtual int | GetNumberOfHilbertFilterCoeffs () |
virtual int | IsA (const char *type) |
virtual void | PrintSelf (ostream &os, vtkIndent indent) VTK_OVERRIDE |
virtual PlusStatus | ReadConfiguration (vtkXMLDataElement *rfToBrightnessElement) |
virtual void | SetBrightnessScale (double) |
virtual void | SetImageType (US_IMAGE_TYPE) |
virtual void | SetNumberOfHilbertFilterCoeffs (int) |
virtual PlusStatus | WriteConfiguration (vtkXMLDataElement *rfToBrightnessElement) |
Static Public Member Functions | |
static int | IsTypeOf (const char *type) |
static vtkPlusRfToBrightnessConvert * | New () |
static vtkPlusRfToBrightnessConvert * | SafeDownCast (vtkObject *o) |
Protected Member Functions | |
template<typename ScalarType > | |
void | ComputeAmplitudeILineQLine (unsigned char *ampl, ScalarType *inputSignal, ScalarType *inputSignalHilbertTransformed, int npt) |
template<typename ScalarType > | |
void | ComputeAmplitudeIqLine (unsigned char *ampl, ScalarType *inputSignal, const int npt) |
template<typename ScalarType > | |
PlusStatus | ComputeHilbertTransform (ScalarType *hilbertTransformOutput, ScalarType *input, int npt) |
virtual void | ComputeHilbertTransformCoeffs () |
virtual int | RequestInformation (vtkInformation *, vtkInformationVector **, vtkInformationVector *outputVector) |
template<typename ScalarType > | |
void | ThreadedLineByLineHilbertTransform (int inExt[6], int outExt[6], vtkImageData ***inData, vtkImageData **outData, int threadId) |
void | ThreadedRequestData (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector, vtkImageData ***inData, vtkImageData **outData, int outExt[6], int id) |
vtkPlusRfToBrightnessConvert () | |
~vtkPlusRfToBrightnessConvert () | |
Protected Attributes | |
double | BrightnessScale |
std::vector< double > | HilbertTransformCoeffs |
US_IMAGE_TYPE | ImageType |
int | NumberOfHilbertFilterCoeffs |
This class converts ultrasound RF data to brightness values.
The filter computes brightness values by envelope detection and dynamic range compression of the RF data.
Envelope detection (estimation of the amplitude of the RF signal) is performed by computing the Euclidean norm of the RF signal (in-phase, I) and a 90deg phase shifted version of the RF signal (quadrature, Q). The Q signal may be provided by the acquisition system or can be computed from the I signal by a Hilbert transform.
Dynamic range compression converts the 16-bit input signal to 8-bit by a non-linear function. In this filter the compressedSignal=sqrt(sqrt(envelopeDetected))*BrightnessScale function is used. A log function is also frequently used for dynamic range compression. The sqrt(sqrt(.)) function was chosen because it provides a somewhat more linear mapping than log(.) function for the input data range (16 bits).
The input image type must be VTK_SHORT (signed 16-bit) and the output image type is always VTK_UNSIGNED_CHAR (unsigned 8-bit).
Definition at line 36 of file vtkPlusRfToBrightnessConvert.h.
typedef vtkThreadedImageAlgorithm vtkPlusRfToBrightnessConvert::Superclass |
Definition at line 40 of file vtkPlusRfToBrightnessConvert.h.
|
protected |
Definition at line 26 of file vtkPlusRfToBrightnessConvert.cxx.
|
protected |
Definition at line 34 of file vtkPlusRfToBrightnessConvert.cxx.
|
protected |
Compute amplitude from the original and Hilbert transformed RF data. npt is the number of samples in the input signal
Definition at line 413 of file vtkPlusRfToBrightnessConvert.cxx.
|
protected |
Compute amplitude from IQ encoded RF data. npt is the number of IQ pairs * 2.
Definition at line 444 of file vtkPlusRfToBrightnessConvert.cxx.
|
protected |
Compute the Hilbert transform (90 deg phase shift) of a signal
Definition at line 371 of file vtkPlusRfToBrightnessConvert.cxx.
|
protectedvirtual |
Compute the Hilbert transform coefficients. Used by the ComputeHilbertTransform method.
Definition at line 335 of file vtkPlusRfToBrightnessConvert.cxx.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
static |
|
static |
|
virtual |
Definition at line 306 of file vtkPlusRfToBrightnessConvert.cxx.
|
virtual |
Read configuration from xml data. The rfToBrightnessElement is typically in DataCollction/ImageAcquisition/RfProcessing.
Definition at line 312 of file vtkPlusRfToBrightnessConvert.cxx.
|
protectedvirtual |
Definition at line 39 of file vtkPlusRfToBrightnessConvert.cxx.
|
static |
|
virtual |
|
virtual |
Specify image type (RF data encoding type)
|
virtual |
|
protected |
Essentialy, a templated version of ThreadedRequestData
Definition at line 192 of file vtkPlusRfToBrightnessConvert.cxx.
|
protected |
Definition at line 105 of file vtkPlusRfToBrightnessConvert.cxx.
|
virtual |
Write configuration to xml data. The rfToBrightnessElement is typically in DataCollction/ImageAcquisition/RfProcessing.
Definition at line 322 of file vtkPlusRfToBrightnessConvert.cxx.
|
protected |
Scaling of the brightness output. Higher value means brighter image.
Definition at line 93 of file vtkPlusRfToBrightnessConvert.h.
|
protected |
Coefficients of the Hilbert transform, computed from the NumberOfHilbertFilterCoeffs
Definition at line 99 of file vtkPlusRfToBrightnessConvert.h.
|
protected |
Image type (RF_IQ_LINE, RF_I_LINE_Q_LINE, ...)
Definition at line 102 of file vtkPlusRfToBrightnessConvert.h.
|
protected |
Number of the Hilbert transform convolution filter coefficients. Higher number results in better approximation but longer computation time.
Definition at line 96 of file vtkPlusRfToBrightnessConvert.h.