PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkPlusRfToBrightnessConvert Class Reference

This class converts ultrasound RF data to brightness values. More...

#include <src/PlusImageProcessing/vtkPlusRfToBrightnessConvert.h>

Inheritance diagram for vtkPlusRfToBrightnessConvert:
Inheritance graph
[legend]
Collaboration diagram for vtkPlusRfToBrightnessConvert:
Collaboration graph
[legend]

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 vtkPlusRfToBrightnessConvertNew ()
 
static vtkPlusRfToBrightnessConvertSafeDownCast (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
 

Detailed Description

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.

Member Typedef Documentation

◆ Superclass

typedef vtkThreadedImageAlgorithm vtkPlusRfToBrightnessConvert::Superclass

Definition at line 40 of file vtkPlusRfToBrightnessConvert.h.

Constructor & Destructor Documentation

◆ vtkPlusRfToBrightnessConvert()

vtkPlusRfToBrightnessConvert::vtkPlusRfToBrightnessConvert ( )
protected

Definition at line 26 of file vtkPlusRfToBrightnessConvert.cxx.

◆ ~vtkPlusRfToBrightnessConvert()

vtkPlusRfToBrightnessConvert::~vtkPlusRfToBrightnessConvert ( )
protected

Definition at line 34 of file vtkPlusRfToBrightnessConvert.cxx.

Member Function Documentation

◆ ComputeAmplitudeILineQLine()

template<typename ScalarType >
void vtkPlusRfToBrightnessConvert::ComputeAmplitudeILineQLine ( unsigned char *  ampl,
ScalarType *  inputSignal,
ScalarType *  inputSignalHilbertTransformed,
int  npt 
)
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.

◆ ComputeAmplitudeIqLine()

template<typename ScalarType >
void vtkPlusRfToBrightnessConvert::ComputeAmplitudeIqLine ( unsigned char *  ampl,
ScalarType *  inputSignal,
const int  npt 
)
protected

Compute amplitude from IQ encoded RF data. npt is the number of IQ pairs * 2.

Definition at line 444 of file vtkPlusRfToBrightnessConvert.cxx.

◆ ComputeHilbertTransform()

template<typename ScalarType >
PlusStatus vtkPlusRfToBrightnessConvert::ComputeHilbertTransform ( ScalarType *  hilbertTransformOutput,
ScalarType *  input,
int  npt 
)
protected

Compute the Hilbert transform (90 deg phase shift) of a signal

Definition at line 371 of file vtkPlusRfToBrightnessConvert.cxx.

◆ ComputeHilbertTransformCoeffs()

void vtkPlusRfToBrightnessConvert::ComputeHilbertTransformCoeffs ( )
protectedvirtual

Compute the Hilbert transform coefficients. Used by the ComputeHilbertTransform method.

Definition at line 335 of file vtkPlusRfToBrightnessConvert.cxx.

◆ GetBrightnessScale()

virtual double vtkPlusRfToBrightnessConvert::GetBrightnessScale ( )
virtual

◆ GetClassName()

virtual const char* vtkPlusRfToBrightnessConvert::GetClassName ( )
virtual

◆ GetImageType()

virtual US_IMAGE_TYPE vtkPlusRfToBrightnessConvert::GetImageType ( )
virtual

◆ GetNumberOfHilbertFilterCoeffs()

virtual int vtkPlusRfToBrightnessConvert::GetNumberOfHilbertFilterCoeffs ( )
virtual

◆ IsA()

virtual int vtkPlusRfToBrightnessConvert::IsA ( const char *  type)
virtual

◆ IsTypeOf()

static int vtkPlusRfToBrightnessConvert::IsTypeOf ( const char *  type)
static

◆ New()

static vtkPlusRfToBrightnessConvert* vtkPlusRfToBrightnessConvert::New ( )
static

◆ PrintSelf()

void vtkPlusRfToBrightnessConvert::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
virtual

Definition at line 306 of file vtkPlusRfToBrightnessConvert.cxx.

◆ ReadConfiguration()

PlusStatus vtkPlusRfToBrightnessConvert::ReadConfiguration ( vtkXMLDataElement *  rfToBrightnessElement)
virtual

Read configuration from xml data. The rfToBrightnessElement is typically in DataCollction/ImageAcquisition/RfProcessing.

Definition at line 312 of file vtkPlusRfToBrightnessConvert.cxx.

◆ RequestInformation()

int vtkPlusRfToBrightnessConvert::RequestInformation ( vtkInformation *  ,
vtkInformationVector **  inputVector,
vtkInformationVector *  outputVector 
)
protectedvirtual

Definition at line 39 of file vtkPlusRfToBrightnessConvert.cxx.

◆ SafeDownCast()

static vtkPlusRfToBrightnessConvert* vtkPlusRfToBrightnessConvert::SafeDownCast ( vtkObject *  o)
static

◆ SetBrightnessScale()

virtual void vtkPlusRfToBrightnessConvert::SetBrightnessScale ( double  )
virtual

◆ SetImageType()

virtual void vtkPlusRfToBrightnessConvert::SetImageType ( US_IMAGE_TYPE  )
virtual

Specify image type (RF data encoding type)

◆ SetNumberOfHilbertFilterCoeffs()

virtual void vtkPlusRfToBrightnessConvert::SetNumberOfHilbertFilterCoeffs ( int  )
virtual

◆ ThreadedLineByLineHilbertTransform()

template<typename ScalarType >
void vtkPlusRfToBrightnessConvert::ThreadedLineByLineHilbertTransform ( int  inExt[6],
int  outExt[6],
vtkImageData ***  inData,
vtkImageData **  outData,
int  threadId 
)
protected

Essentialy, a templated version of ThreadedRequestData

Definition at line 192 of file vtkPlusRfToBrightnessConvert.cxx.

◆ ThreadedRequestData()

void vtkPlusRfToBrightnessConvert::ThreadedRequestData ( vtkInformation *  request,
vtkInformationVector **  inputVector,
vtkInformationVector *  outputVector,
vtkImageData ***  inData,
vtkImageData **  outData,
int  outExt[6],
int  id 
)
protected

Definition at line 105 of file vtkPlusRfToBrightnessConvert.cxx.

◆ WriteConfiguration()

PlusStatus vtkPlusRfToBrightnessConvert::WriteConfiguration ( vtkXMLDataElement *  rfToBrightnessElement)
virtual

Write configuration to xml data. The rfToBrightnessElement is typically in DataCollction/ImageAcquisition/RfProcessing.

Definition at line 322 of file vtkPlusRfToBrightnessConvert.cxx.

Member Data Documentation

◆ BrightnessScale

double vtkPlusRfToBrightnessConvert::BrightnessScale
protected

Scaling of the brightness output. Higher value means brighter image.

Definition at line 93 of file vtkPlusRfToBrightnessConvert.h.

◆ HilbertTransformCoeffs

std::vector<double> vtkPlusRfToBrightnessConvert::HilbertTransformCoeffs
protected

Coefficients of the Hilbert transform, computed from the NumberOfHilbertFilterCoeffs

Definition at line 99 of file vtkPlusRfToBrightnessConvert.h.

◆ ImageType

US_IMAGE_TYPE vtkPlusRfToBrightnessConvert::ImageType
protected

Image type (RF_IQ_LINE, RF_I_LINE_Q_LINE, ...)

Definition at line 102 of file vtkPlusRfToBrightnessConvert.h.

◆ NumberOfHilbertFilterCoeffs

int vtkPlusRfToBrightnessConvert::NumberOfHilbertFilterCoeffs
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.


The documentation for this class was generated from the following files: