NorMIT-nav  22.09
An IGT application
cx::cxSyntheticVolume Class Referenceabstract

#include <cxSyntheticVolume.h>

Inheritance diagram for cx::cxSyntheticVolume:
cx::cxSimpleSyntheticVolume cxtest::SphereSyntheticVolume

Public Member Functions

 cxSyntheticVolume (Vector3D bounds)
 
virtual ~cxSyntheticVolume ()
 
virtual Vector3D getBounds ()
 
virtual ProcessedUSInputDataPtr sampleUsData (const std::vector< Transform3D > &planes_rMf, const Eigen::Array2f &pixelSpacing, const Eigen::Array2i &sliceDimension, const Transform3D &output_dMr, const double noiseSigma, const unsigned char noiseMean) const
 
virtual ProcessedUSInputDataPtr sampleUsData (const std::vector< Transform3D > &planes_rMt, const ProbeDefinition &probe, const Transform3D &output_dMr, const double noiseSigma=0, const unsigned char noiseMean=0) const
 
vtkImageDataPtr sampleUsData (const Transform3D &plane_rMt, const ProbeDefinition &probe, const double noiseSigma=0, const unsigned char noiseMean=0) const
 
vtkImageDataPtr sampleUsData (const Transform3D &plane_rMf, const Eigen::Array2f &pixelSpacing, const Eigen::Array2i &sliceDimension, const double noiseSigma, const unsigned char noiseMean) const
 
virtual unsigned char evaluate (const Vector3D &p) const =0
 
virtual void printInfo () const
 
void fillVolume (cx::ImagePtr vol)
 
virtual float computeRMSError (cx::ImagePtr vol)
 

Protected Member Functions

unsigned char constrainToUnsignedChar (const int val) const
 
vtkImageDataPtr createEmptyMask (const Eigen::Array2i &sliceDimension) const
 

Protected Attributes

Vector3D mBounds
 

Detailed Description

This abstract class provides an interface to synthetic volumes. The requirements of this class are as follows:

  • The volume must be defined at every point inside the volume defined by [0, bounds]
  • The volume must be sliceable with any imaginable slice
  • The volume must be the same every time it is used (i.e. no randomness)
    • If you want to test noise suppression, add noise to the US slice after it has been sampled from this class.

Definition at line 36 of file cxSyntheticVolume.h.

Constructor & Destructor Documentation

◆ cxSyntheticVolume()

cx::cxSyntheticVolume::cxSyntheticVolume ( Vector3D  bounds)
inline

Definition at line 39 of file cxSyntheticVolume.h.

◆ ~cxSyntheticVolume()

virtual cx::cxSyntheticVolume::~cxSyntheticVolume ( )
inlinevirtual

Definition at line 45 of file cxSyntheticVolume.h.

Member Function Documentation

◆ computeRMSError()

float cx::cxSyntheticVolume::computeRMSError ( cx::ImagePtr  vol)
virtual

Definition at line 188 of file cxSyntheticVolume.cpp.

◆ constrainToUnsignedChar()

unsigned char cx::cxSyntheticVolume::constrainToUnsignedChar ( const int  val) const
protected

Definition at line 172 of file cxSyntheticVolume.cpp.

◆ createEmptyMask()

vtkImageDataPtr cx::cxSyntheticVolume::createEmptyMask ( const Eigen::Array2i &  sliceDimension) const
protected

Definition at line 161 of file cxSyntheticVolume.cpp.

◆ evaluate()

virtual unsigned char cx::cxSyntheticVolume::evaluate ( const Vector3D p) const
pure virtual

Evaluate the volume at position (x, y, z). The coordinates are given in volume space.

Implemented in cx::cxSimpleSyntheticVolume, and cxtest::SphereSyntheticVolume.

◆ fillVolume()

void cx::cxSyntheticVolume::fillVolume ( cx::ImagePtr  vol)

Definition at line 201 of file cxSyntheticVolume.cpp.

◆ getBounds()

virtual Vector3D cx::cxSyntheticVolume::getBounds ( )
inlinevirtual

Definition at line 48 of file cxSyntheticVolume.h.

◆ printInfo()

virtual void cx::cxSyntheticVolume::printInfo ( ) const
inlinevirtual

Reimplemented in cxtest::SphereSyntheticVolume, and cx::cxSimpleSyntheticVolume.

Definition at line 105 of file cxSyntheticVolume.h.

◆ sampleUsData() [1/4]

ProcessedUSInputDataPtr cx::cxSyntheticVolume::sampleUsData ( const std::vector< Transform3D > &  planes_rMf,
const Eigen::Array2f &  pixelSpacing,
const Eigen::Array2i &  sliceDimension,
const Transform3D output_dMr,
const double  noiseSigma,
const unsigned char  noiseMean 
) const
virtual

Sample a set of ultrasound slices. The planes to use are defined by planes. The Transform3D-s represent the transform from image space to world space. The volume is assumed to lie from [0, 0, 0] -> bounds. If any part of an image plane is outside the definition of the volume, the pixel value will be set to 0.

Parameters
planes_rMfTransforms from image space to world space (and thus also volume space) for the desired slices.
pixelSpacingThe size of each pixel in the ultrasonic image.
sliceDimensionThe size in pixels of each ultrasound image.
output_dMrPosition of generated output volume d relative to ref space r.
noiseSigmaThe sigma of the noise distribution on each image
noiseMeanThe sigma of the noise distribution on each image

Definition at line 82 of file cxSyntheticVolume.cpp.

◆ sampleUsData() [2/4]

ProcessedUSInputDataPtr cx::cxSyntheticVolume::sampleUsData ( const std::vector< Transform3D > &  planes_rMt,
const ProbeDefinition probe,
const Transform3D output_dMr,
const double  noiseSigma = 0,
const unsigned char  noiseMean = 0 
) const
virtual

Alternative version. Input rMt, uses probe to generate required information about probe plane.

Definition at line 39 of file cxSyntheticVolume.cpp.

◆ sampleUsData() [3/4]

vtkImageDataPtr cx::cxSyntheticVolume::sampleUsData ( const Transform3D plane_rMf,
const Eigen::Array2f &  pixelSpacing,
const Eigen::Array2i &  sliceDimension,
const double  noiseSigma,
const unsigned char  noiseMean 
) const

Alternative version. Input primitive components of probe, transform to image plane f.

Definition at line 118 of file cxSyntheticVolume.cpp.

◆ sampleUsData() [4/4]

vtkImageDataPtr cx::cxSyntheticVolume::sampleUsData ( const Transform3D plane_rMt,
const ProbeDefinition probe,
const double  noiseSigma = 0,
const unsigned char  noiseMean = 0 
) const

Generate one simulated us plane from the input rMt, probe.

Definition at line 63 of file cxSyntheticVolume.cpp.

Member Data Documentation

◆ mBounds

Vector3D cx::cxSyntheticVolume::mBounds
protected

Definition at line 114 of file cxSyntheticVolume.h.


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