Fraxinus  16.5.0-fx-rc9
An IGT application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 57 of file cxSyntheticVolume.h.

Constructor & Destructor Documentation

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

Definition at line 60 of file cxSyntheticVolume.h.

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

Definition at line 66 of file cxSyntheticVolume.h.

Member Function Documentation

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

Definition at line 209 of file cxSyntheticVolume.cpp.

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

Definition at line 193 of file cxSyntheticVolume.cpp.

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

Definition at line 182 of file cxSyntheticVolume.cpp.

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.

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

Definition at line 222 of file cxSyntheticVolume.cpp.

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

Definition at line 69 of file cxSyntheticVolume.h.

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

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

Definition at line 126 of file cxSyntheticVolume.h.

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 103 of file cxSyntheticVolume.cpp.

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 60 of file cxSyntheticVolume.cpp.

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 84 of file cxSyntheticVolume.cpp.

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 139 of file cxSyntheticVolume.cpp.

Member Data Documentation

Vector3D cx::cxSyntheticVolume::mBounds
protected

Definition at line 135 of file cxSyntheticVolume.h.


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