UsTK : Ultrasound ToolKit  version 2.0.1 under development (2024-12-17)
usVolumeProcessing Class Reference

#include <visp3/ustk_volume_processing/usVolumeProcessing.h>

Static Public Member Functions

template<class Type1 , class Type2 >
static void absoluteDifference (const usImage3D< Type1 > &src1, const usImage3D< Type1 > &src2, usImage3D< Type2 > &dst)
 
template<class Type1 , class Type2 >
static double applyFilter (const usImage3D< Type1 > &src, const usImage3D< Type2 > &filter, unsigned int i, unsigned int j, unsigned int k)
 
template<class Type1 , class Type2 >
static void applyFilter (const usImage3D< Type1 > &src, usImage3D< Type2 > &dst, const usImage3D< double > &filter)
 
template<class Type >
static void computeBarycenter (const usImage3D< Type > &V, double &ic, double &jc, double &kc)
 
template<class Type1 , class Type2 >
static void derivativeI (const usImage3D< Type1 > &src, usImage3D< Type2 > &dst)
 
template<class Type1 , class Type2 = typename std::conditional<std::is_arithmetic<Type1>::value, double, Type1>::type>
static Type2 derivativeI (const usImage3D< Type1 > &V, unsigned int i, unsigned int j, unsigned int k)
 
template<class Type1 , class Type2 >
static void derivativeJ (const usImage3D< Type1 > &src, usImage3D< Type2 > &dst)
 
template<class Type1 , class Type2 = typename std::conditional<std::is_arithmetic<Type1>::value, double, Type1>::type>
static Type2 derivativeJ (const usImage3D< Type1 > &V, unsigned int i, unsigned int j, unsigned int k)
 
template<class Type1 , class Type2 >
static void derivativeK (const usImage3D< Type1 > &src, usImage3D< Type2 > &dst)
 
template<class Type1 , class Type2 = typename std::conditional<std::is_arithmetic<Type1>::value, double, Type1>::type>
static Type2 derivativeK (const usImage3D< Type1 > &V, unsigned int i, unsigned int j, unsigned int k)
 
template<class Type1 , class Type2 >
static void difference (const usImage3D< Type1 > &src1, const usImage3D< Type1 > &src2, usImage3D< Type2 > &dst)
 
template<class Type >
static void frangi (const usImage3D< Type > &src, usImage3D< double > &dst, double a, double b, double c)
 
template<class Type1 , class Type2 >
static void gaussianDerivativeI (const usImage3D< Type1 > &src, usImage3D< Type2 > &dst, double sigma, unsigned int filter_size)
 
template<class Type1 , class Type2 >
static void gaussianDerivativeJ (const usImage3D< Type1 > &src, usImage3D< Type2 > &dst, double sigma, unsigned int filter_size)
 
template<class Type1 , class Type2 >
static void gaussianDerivativeK (const usImage3D< Type1 > &src, usImage3D< Type2 > &dst, double sigma, unsigned int filter_size)
 
static usImage3D< double > generateGaussianDerivativeFilterI (double sigma, int size)
 
static usImage3D< double > generateGaussianDerivativeFilterII (double sigma, int size)
 
static usImage3D< double > generateGaussianDerivativeFilterIJ (double sigma, int size)
 
static usImage3D< double > generateGaussianDerivativeFilterIK (double sigma, int size)
 
static usImage3D< double > generateGaussianDerivativeFilterJ (double sigma, int size)
 
static usImage3D< double > generateGaussianDerivativeFilterJJ (double sigma, int size)
 
static usImage3D< double > generateGaussianDerivativeFilterJK (double sigma, int size)
 
static usImage3D< double > generateGaussianDerivativeFilterK (double sigma, int size)
 
static usImage3D< double > generateGaussianDerivativeFilterKK (double sigma, int size)
 
template<class Type >
static void gradient (const usImage3D< Type > &src, usImage3D< vpColVector > &dst)
 
template<class Type >
static void hessian (const usImage3D< Type > &src, usImage3D< vpMatrix > &dst)
 
template<class Type >
static Type max (const usImage3D< Type > &V)
 
template<class Type >
static Type min (const usImage3D< Type > &V)
 
static void norm (const usImage3D< vpColVector > &src, usImage3D< double > &dst)
 

Detailed Description

Processing tools (derivative, filtering...) for the usImage3D class.

Definition at line 58 of file usVolumeProcessing.h.

Member Function Documentation

◆ absoluteDifference()

template<class Type1 , class Type2 >
void usVolumeProcessing::absoluteDifference ( const usImage3D< Type1 > &  src1,
const usImage3D< Type1 > &  src2,
usImage3D< Type2 > &  dst 
)
static

Compute the volume absolute difference: dst = |src1 - src2|.

Parameters
src1The first volume.
src2The second volume.
dstThe output volume (difference).

Definition at line 591 of file usVolumeProcessing.h.

References usImage3D< Type >::getConstData(), usImage3D< Type >::getData(), usImage3D< Type >::getHeight(), usImage3D< Type >::getNumberOfFrames(), usImage3D< Type >::getSize(), usImage3D< Type >::getWidth(), and usImage3D< Type >::resize().

◆ applyFilter() [1/2]

template<class Type1 , class Type2 >
double usVolumeProcessing::applyFilter ( const usImage3D< Type1 > &  src,
const usImage3D< Type2 > &  filter,
unsigned int  i,
unsigned int  j,
unsigned int  k 
)
static

Apply a 3D filter to a voxel.

Parameters
srcThe volume to filter.
filterThe filter kernel.
iIndex on i-axis of the voxel to filter.
jIndex on j-axis of the voxel to filter.
kIndex on k-axis of the voxel to filter.
Returns
the value of the volxel filtered.

Definition at line 200 of file usVolumeProcessing.h.

References usImage3D< Type >::getHeight(), usImage3D< Type >::getNumberOfFrames(), and usImage3D< Type >::getWidth().

Referenced by applyFilter(), gaussianDerivativeI(), gaussianDerivativeJ(), and gaussianDerivativeK().

◆ applyFilter() [2/2]

template<class Type1 , class Type2 >
void usVolumeProcessing::applyFilter ( const usImage3D< Type1 > &  src,
usImage3D< Type2 > &  dst,
const usImage3D< double > &  filter 
)
static

Apply a filter to a volume.

Parameters
[in]srcThe volume to filter.
[out]dstThe volume filtered.
[in]filterThe filter kernel.

Definition at line 229 of file usVolumeProcessing.h.

References applyFilter(), usImage3D< Type >::getHeight(), usImage3D< Type >::getNumberOfFrames(), usImage3D< Type >::getWidth(), usImage3D< Type >::initData(), and usImage3D< Type >::resize().

◆ computeBarycenter()

template<class Type >
void usVolumeProcessing::computeBarycenter ( const usImage3D< Type > &  V,
double &  ic,
double &  jc,
double &  kc 
)
static

Compute the photometric barycenter of the volume.

Parameters
[in]VVolume to compute.
[out]icI-axis index of the barycenter.
[out]jcJ-axis index of the barycenter.
[out]kcK-axis index of the barycenter.

Definition at line 614 of file usVolumeProcessing.h.

References usImage3D< Type >::getHeight(), usImage3D< Type >::getNumberOfFrames(), and usImage3D< Type >::getWidth().

◆ derivativeI() [1/2]

template<class Type1 , class Type2 >
void usVolumeProcessing::derivativeI ( const usImage3D< Type1 > &  src,
usImage3D< Type2 > &  dst 
)
static

Apply a derivative filter along the i-axis (height) to a volume.

Parameters
srcThe volume to derivate.
dstThe volume derivated.

Definition at line 387 of file usVolumeProcessing.h.

References usImage3D< Type >::getHeight(), usImage3D< Type >::getNumberOfFrames(), usImage3D< Type >::getWidth(), and usImage3D< Type >::resize().

Referenced by gradient(), and hessian().

◆ derivativeI() [2/2]

template<class Type1 , class Type2 >
Type2 usVolumeProcessing::derivativeI ( const usImage3D< Type1 > &  V,
unsigned int  i,
unsigned int  j,
unsigned int  k 
)
static

Apply a derivative filter along the i-axis (height) to a voxel.

Parameters
VThe volume to derivate.
iIndex on i-axis of the voxel to filter.
jIndex on j-axis of the voxel to filter.
kIndex on k-axis of the voxel to filter.
Returns
The derivate output volume.

Definition at line 257 of file usVolumeProcessing.h.

◆ derivativeJ() [1/2]

template<class Type1 , class Type2 >
void usVolumeProcessing::derivativeJ ( const usImage3D< Type1 > &  src,
usImage3D< Type2 > &  dst 
)
static

Apply a derivative filter along the j-axis (width) to a volume.

Parameters
srcThe volume to derivate.
dstThe volume derivated.

Definition at line 410 of file usVolumeProcessing.h.

References usImage3D< Type >::getHeight(), usImage3D< Type >::getNumberOfFrames(), usImage3D< Type >::getWidth(), and usImage3D< Type >::resize().

Referenced by gradient(), and hessian().

◆ derivativeJ() [2/2]

template<class Type1 , class Type2 >
Type2 usVolumeProcessing::derivativeJ ( const usImage3D< Type1 > &  V,
unsigned int  i,
unsigned int  j,
unsigned int  k 
)
static

Apply a derivative filter along the j-axis (width) to a voxel.

Parameters
VThe volume to derivate.
iIndex on i-axis of the voxel to filter.
jIndex on j-axis of the voxel to filter.
kIndex on k-axis of the voxel to filter.
Returns
The derivate output volume.

Definition at line 271 of file usVolumeProcessing.h.

◆ derivativeK() [1/2]

template<class Type1 , class Type2 >
void usVolumeProcessing::derivativeK ( const usImage3D< Type1 > &  src,
usImage3D< Type2 > &  dst 
)
static

Apply a derivative filter along the k-axis (3rd dimension) to a volume.

Parameters
srcThe volume to derivate.
dstThe volume derivated.

Definition at line 436 of file usVolumeProcessing.h.

References usImage3D< Type >::getHeight(), usImage3D< Type >::getNumberOfFrames(), usImage3D< Type >::getWidth(), and usImage3D< Type >::resize().

Referenced by gradient(), and hessian().

◆ derivativeK() [2/2]

template<class Type1 , class Type2 >
Type2 usVolumeProcessing::derivativeK ( const usImage3D< Type1 > &  V,
unsigned int  i,
unsigned int  j,
unsigned int  k 
)
static

Apply a derivative filter along the k-axis (3rd dimension) to a voxel.

Parameters
VThe volume to derivate.
iIndex on i-axis of the voxel to filter.
jIndex on j-axis of the voxel to filter.
kIndex on k-axis of the voxel to filter.
Returns
The derivate output volume.

Definition at line 285 of file usVolumeProcessing.h.

◆ difference()

template<class Type1 , class Type2 >
void usVolumeProcessing::difference ( const usImage3D< Type1 > &  src1,
const usImage3D< Type1 > &  src2,
usImage3D< Type2 > &  dst 
)
static

Compute the volume difference: dst = src1 - src2.

Parameters
src1The first volume.
src2The second volume.
dstThe output volume (difference).

Definition at line 571 of file usVolumeProcessing.h.

References usImage3D< Type >::getConstData(), usImage3D< Type >::getData(), usImage3D< Type >::getHeight(), usImage3D< Type >::getNumberOfFrames(), usImage3D< Type >::getSize(), usImage3D< Type >::getWidth(), and usImage3D< Type >::resize().

◆ frangi()

template<class Type >
void usVolumeProcessing::frangi ( const usImage3D< Type > &  src,
usImage3D< double > &  dst,
double  a,
double  b,
double  c 
)
static

Compute the Frangi's vesselness. Here is the frangi vesselness formula, from Frangi et al. (1998):

\[ V_{0}(s) = (1 - exp(- \frac{- R_{A}^{2}}{2α^{2}}))exp(- \frac{- R_{B}^{2}}{2β^{2}})(1 - exp(- \frac{S^{2}}{2c^{2}})) \]

Warning
This method needs GSL thirdparty to work. You can prevent errors by testing VISP_HAVE_GSL define.
Parameters
srcThe volume to computed.
dstThe volume filtered.
aCorresponds to $ α $ parameter in formula above.
bCorresponds to $ β $ parameter in formula above.
cCorresponds to $ c $ parameter in formula above.

Definition at line 530 of file usVolumeProcessing.h.

References usImage3D< Type >::getConstData(), usImage3D< Type >::getData(), usImage3D< Type >::getHeight(), usImage3D< Type >::getNumberOfFrames(), usImage3D< Type >::getSize(), usImage3D< Type >::getWidth(), hessian(), and usImage3D< Type >::resize().

◆ gaussianDerivativeI()

template<class Type1 , class Type2 >
void usVolumeProcessing::gaussianDerivativeI ( const usImage3D< Type1 > &  src,
usImage3D< Type2 > &  dst,
double  sigma,
unsigned int  filter_size 
)
static

Compute the gaussian filtered i-derivative (height) of a volume.

Parameters
srcThe volume to filter.
dstThe volume filtered.
sigmaGaussian filter standard deviation.
filter_sizeSize of the gaussian filter.
Returns
The derivate output volume.

Definition at line 342 of file usVolumeProcessing.h.

References applyFilter(), and generateGaussianDerivativeFilterI().

◆ gaussianDerivativeJ()

template<class Type1 , class Type2 >
void usVolumeProcessing::gaussianDerivativeJ ( const usImage3D< Type1 > &  src,
usImage3D< Type2 > &  dst,
double  sigma,
unsigned int  filter_size 
)
static

Compute the gaussian filtered j-derivative (width) of a volume.

Parameters
srcThe volume to filter.
dstThe volume filtered.
sigmaGaussian filter standard deviation.
filter_sizeSize of the gaussian filter.
Returns
The derivate output volume.

Definition at line 358 of file usVolumeProcessing.h.

References applyFilter(), and generateGaussianDerivativeFilterJ().

◆ gaussianDerivativeK()

template<class Type1 , class Type2 >
void usVolumeProcessing::gaussianDerivativeK ( const usImage3D< Type1 > &  src,
usImage3D< Type2 > &  dst,
double  sigma,
unsigned int  filter_size 
)
static

Compute the gaussian filtered k-derivative (3rd dimension) of a volume.

Parameters
srcThe volume to filter.
dstThe volume filtered.
sigmaGaussian filter standard deviation.
filter_sizeSize of the gaussian filter.
Returns
The derivate output volume.

Definition at line 374 of file usVolumeProcessing.h.

References applyFilter(), and generateGaussianDerivativeFilterK().

◆ generateGaussianDerivativeFilterI()

usImage3D< double > usVolumeProcessing::generateGaussianDerivativeFilterI ( double  sigma,
int  size 
)
static

Generate a Gaussian filtered derivative filter along the j-axis (width).

Parameters
sigmaGaussian filter standard deviation.
sizeSize of the gaussian filter.

Definition at line 55 of file usVolumeProcessing.cpp.

Referenced by gaussianDerivativeI().

◆ generateGaussianDerivativeFilterII()

usImage3D< double > usVolumeProcessing::generateGaussianDerivativeFilterII ( double  sigma,
int  size 
)
static

Generate a Gaussian filtered second derivative filter along the i-axis (height).

Parameters
sigmaGaussian filter standard deviation.
sizeSize of the gaussian filter.

Definition at line 148 of file usVolumeProcessing.cpp.

◆ generateGaussianDerivativeFilterIJ()

usImage3D< double > usVolumeProcessing::generateGaussianDerivativeFilterIJ ( double  sigma,
int  size 
)
static

Generate a Gaussian filtered second derivative filter along the ij-axis (height/width diagonal).

Parameters
sigmaGaussian filter standard deviation.
sizeSize of the gaussian filter.

Definition at line 247 of file usVolumeProcessing.cpp.

◆ generateGaussianDerivativeFilterIK()

usImage3D< double > usVolumeProcessing::generateGaussianDerivativeFilterIK ( double  sigma,
int  size 
)
static

Generate a Gaussian filtered second derivative filter along the ik-axis (height/3rd dimension diagonal).

Parameters
sigmaGaussian filter standard deviation.
sizeSize of the gaussian filter.

Definition at line 278 of file usVolumeProcessing.cpp.

◆ generateGaussianDerivativeFilterJ()

usImage3D< double > usVolumeProcessing::generateGaussianDerivativeFilterJ ( double  sigma,
int  size 
)
static

Generate a Gaussian filtered derivative filter along the j-axis (width).

Parameters
sigmaGaussian filter standard deviation.
sizeSize of the gaussian filter.

Definition at line 86 of file usVolumeProcessing.cpp.

Referenced by gaussianDerivativeJ().

◆ generateGaussianDerivativeFilterJJ()

usImage3D< double > usVolumeProcessing::generateGaussianDerivativeFilterJJ ( double  sigma,
int  size 
)
static

Generate a Gaussian filtered second derivative filter along the j-axis (width).

Parameters
sigmaGaussian filter standard deviation.
sizeSize of the gaussian filter.

Definition at line 181 of file usVolumeProcessing.cpp.

◆ generateGaussianDerivativeFilterJK()

usImage3D< double > usVolumeProcessing::generateGaussianDerivativeFilterJK ( double  sigma,
int  size 
)
static

Generate a Gaussian filtered second derivative filter along the jk-axis (width/3rd dimension diagonal).

Parameters
sigmaGaussian filter standard deviation.
sizeSize of the gaussian filter.

Definition at line 309 of file usVolumeProcessing.cpp.

◆ generateGaussianDerivativeFilterK()

usImage3D< double > usVolumeProcessing::generateGaussianDerivativeFilterK ( double  sigma,
int  size 
)
static

Generate a Gaussian filtered derivative filter along the k-axis (3rd dimension).

Parameters
sigmaGaussian filter standard deviation.
sizeSize of the gaussian filter.

Definition at line 117 of file usVolumeProcessing.cpp.

Referenced by gaussianDerivativeK().

◆ generateGaussianDerivativeFilterKK()

usImage3D< double > usVolumeProcessing::generateGaussianDerivativeFilterKK ( double  sigma,
int  size 
)
static

Generate a Gaussian filtered second derivative filter along the k-axis (3rd dimension).

Parameters
sigmaGaussian filter standard deviation.
sizeSize of the gaussian filter.

Definition at line 214 of file usVolumeProcessing.cpp.

◆ gradient()

template<class Type >
void usVolumeProcessing::gradient ( const usImage3D< Type > &  src,
usImage3D< vpColVector > &  dst 
)
static

◆ hessian()

template<class Type >
void usVolumeProcessing::hessian ( const usImage3D< Type > &  src,
usImage3D< vpMatrix > &  dst 
)
static

◆ max()

template<class Type >
Type usVolumeProcessing::max ( const usImage3D< Type > &  V)
static

Get the max value of the volume.

Parameters
VThe volume to compute.
Returns
The maximum value of the volume.

Definition at line 159 of file usVolumeProcessing.h.

References usImage3D< Type >::getConstData(), and usImage3D< Type >::getSize().

◆ min()

template<class Type >
Type usVolumeProcessing::min ( const usImage3D< Type > &  V)
static

Get the min value of the volume.

Parameters
VThe volume to compute.
Returns
The minimum value of the volume.

Definition at line 177 of file usVolumeProcessing.h.

References usImage3D< Type >::getConstData(), and usImage3D< Type >::getSize().

◆ norm()

void usVolumeProcessing::norm ( const usImage3D< vpColVector > &  src,
usImage3D< double > &  dst 
)
static