ImFusion SDK 4.3
ClProbeDeformation Class Reference

#include <ImFusion/US/ClProbeDeformation.h>

Differentiable OpenCL implementation of GlProbeDeformation. More...

+ Inheritance diagram for ClProbeDeformation:

Detailed Description

Differentiable OpenCL implementation of GlProbeDeformation.

This class allows to use the probe deformation inside OpenCL kernels, in particular it is used by UltrasoundDISARegistrationAlgorithm to optimize the probe deformation parameters during registration.

The constructor takes the following parameters:

  • The ultrasound sweep or compounded volume used to geometric parameters of the deformation.
    See also
    GlProbeDeformation::setProbeParameters
  • The world to pixel matrix of the volume that will be used for the registration. For example for DISA this is the world to pixel matrix of the ultrasound DISA feature volume.
  • An optional reference GlProbeDeformation that will be used to initialize the deformation parameters.

It can be converted from and to a GlProbeDeformation.

Public Member Functions

 ClProbeDeformation (UltrasoundSweep &sweep, const mat4 &M, const GlProbeDeformation *reference=nullptr)
 
 ClProbeDeformation (SharedImageSet &compoundedVolume, const mat4 &M, const GlProbeDeformation *reference=nullptr)
 
int addArguments (ClKernel &kernel, int pos, const std::vector< Eigen::VectorXd > &paramsBatch, int firstIndex) override
 Adds the required arguments to the OpenCL kernel.
 
std::unique_ptr< DeformationgetDeformation () override
 Returns a GlProbeDeformation instance with the current parameters.
 
vec3 displacePoint (const vec3 &pointWorld) override
 Displaces a point in world coordinates.
 
void setParameters (const double *params) override
 Sets the deformation parameters.
 
void getParameters (double *params) const override
 Gets the deformation parameters.
 
std::vector< FeatureMapsRegistrationAlgorithm::OptimizationParameterparameters () const override
 Returns the parameters definition (name and range) for the optimization.
 
std::string argumentDefinitions () const override
 Returns the OpenCL code for the definition of the arguments needed by the kernel.
 
std::string displacementCode () const override
 Returns the OpenCL code for the displacement function.
 
std::string gradientCode () const override
 Returns the OpenCL code for the computation of the gradient.
 
std::string functionsCode () const override
 Returns the OpenCL code that defines an additional function used by the deformation.
 

Member Function Documentation

◆ addArguments()

int addArguments ( ClKernel & kernel,
int pos,
const std::vector< Eigen::VectorXd > & paramsBatch,
int firstIndex )
overridevirtual

Adds the required arguments to the OpenCL kernel.

Parameters
kernelThe OpenCL kernel to which the arguments will be added.
posThe first argument index where to start adding.
paramsBatchThe batch of parameters to be used for the deformation. Each vector in the batch corresponds to a different set of parameters.
firstIndexThe index in the parameter vectors where the deformation parameters start.

Implements ClDeformation.

◆ getDeformation()

std::unique_ptr< Deformation > getDeformation ( )
overridevirtual

Returns a GlProbeDeformation instance with the current parameters.

Implements ClDeformation.

◆ displacePoint()

vec3 displacePoint ( const vec3 & pointWorld)
overridevirtual

Displaces a point in world coordinates.

Implements ClDeformation.

◆ setParameters()

void setParameters ( const double * params)
overridevirtual

Sets the deformation parameters.

Implements ClDeformation.

◆ getParameters()

void getParameters ( double * params) const
overridevirtual

Gets the deformation parameters.

Implements ClDeformation.

◆ parameters()

Returns the parameters definition (name and range) for the optimization.

Implements ClDeformation.

◆ argumentDefinitions()

std::string argumentDefinitions ( ) const
overridevirtual

Returns the OpenCL code for the definition of the arguments needed by the kernel.

Implements ClDeformation.

◆ displacementCode()

std::string displacementCode ( ) const
overridevirtual

Returns the OpenCL code for the displacement function.

Implements ClDeformation.

◆ gradientCode()

std::string gradientCode ( ) const
overridevirtual

Returns the OpenCL code for the computation of the gradient.

Implements ClDeformation.

◆ functionsCode()

std::string functionsCode ( ) const
overridevirtual

Returns the OpenCL code that defines an additional function used by the deformation.

Implements ClDeformation.


The documentation for this class was generated from the following file:
Search Tab / S to search, Esc to close