UsTK : Ultrasound ToolKit  version 2.0.1 under development (2024-11-21)
usImage3D< Type > Class Template Reference

#include <visp3/ustk_core/usImage3D.h>

+ Inheritance diagram for usImage3D< Type >:

Public Member Functions

 usImage3D ()
 
 usImage3D (unsigned int height, unsigned int width, unsigned int frameNumber)
 
 usImage3D (unsigned int height, unsigned int width, unsigned int frameNumber, Type initialValue)
 
 usImage3D (const usImage3D< Type > &image, const bool copy=true)
 
virtual ~usImage3D ()
 

Inherited functionalities from usImage3D

Type * getConstData () const
 
Type * getData ()
 
Type * getData (unsigned int i, unsigned int j, unsigned int k)
 
unsigned int getWidth () const
 
unsigned int getHeight () const
 
unsigned int getNumberOfFrames () const
 
unsigned int getSize () const
 
void initData (Type value)
 
usImage3D< Type > & operator= (const usImage3D< Type > &other)
 
bool operator== (const usImage3D< Type > &other)
 
Type operator() (unsigned int i, unsigned int j, unsigned int k) const
 
void operator() (unsigned int i, unsigned int j, unsigned int k, Type value)
 
void resize (unsigned int height, unsigned int width, unsigned int numberOfFrames)
 
void setData (Type *data, int numberOfVoxels)
 

Detailed Description

template<class Type>
class usImage3D< Type >

Representation of a physical image volume.

This class is used to represent 3D ultrasoubd data with physical information.

Definition at line 60 of file usImage3D.h.

Constructor & Destructor Documentation

◆ usImage3D() [1/4]

template<class Type >
usImage3D< Type >::usImage3D

Constructor.

Definition at line 281 of file usImage3D.h.

◆ usImage3D() [2/4]

template<class Type >
usImage3D< Type >::usImage3D ( unsigned int  height,
unsigned int  width,
unsigned int  frameNumber 
)

Constructor. Set the dimensions of the volume. Initialize the data container with default value.

Parameters
heightVolume height.
widthVolume width.
frameNumberVolume size in the third dimension (orthogonal to ultrasound 2D frames).

Definition at line 286 of file usImage3D.h.

References usImage3D< Type >::initData().

◆ usImage3D() [3/4]

template<class Type >
usImage3D< Type >::usImage3D ( unsigned int  height,
unsigned int  width,
unsigned int  frameNumber,
Type  initialValue 
)

Constructor. Set the dimensions of the volume. Initialize the data container with the specified value.

Parameters
heightVolume height.
widthVolume width.
frameNumberVolume size in the third dimension (orthogonal to ultrasound 2D frames).
initialValueThe initial data

Definition at line 294 of file usImage3D.h.

References usImage3D< Type >::initData().

◆ usImage3D() [4/4]

template<class Type >
usImage3D< Type >::usImage3D ( const usImage3D< Type > &  image,
const bool  copy = true 
)

Copy constructor. By default performs a deep copy.

Parameters
imageother 3D-image to copy
copyboolean to select if deep copy is performed or not (deep copy by default)

Definition at line 302 of file usImage3D.h.

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

◆ ~usImage3D()

template<class Type >
usImage3D< Type >::~usImage3D
virtual

Destructor.

Definition at line 312 of file usImage3D.h.

Member Function Documentation

◆ getConstData()

◆ getData() [1/2]

template<class Type >
Type* usImage3D< Type >::getData ( )
inline

◆ getData() [2/2]

template<class Type >
Type* usImage3D< Type >::getData ( unsigned int  i,
unsigned int  j,
unsigned int  k 
)
inline

Get the pointer to the data container for specified position in the volume.

Parameters
iIndex on i-axis to acess
jIndex on j-axis to acess
kIndex on k-axis to acess
Returns
The pointer to the voxel specified indexes.

Definition at line 119 of file usImage3D.h.

◆ getHeight()

◆ getNumberOfFrames()

◆ getSize()

template<class Type >
unsigned int usImage3D< Type >::getSize ( ) const
inline

◆ getWidth()

◆ initData()

template<class Type >
void usImage3D< Type >::initData ( Type  value)

Initialize the data container with the specified value.

Parameters
valueThe data

Definition at line 367 of file usImage3D.h.

Referenced by usVolumeProcessing::applyFilter(), usPreScanToPostScan3DConverter::convert(), and usImage3D< Type >::usImage3D().

◆ operator()() [1/2]

template<class Type >
Type usImage3D< Type >::operator() ( unsigned int  i,
unsigned int  j,
unsigned int  k 
) const
inline

Access operator.

Parameters
iIndex on i-axis to acess
jIndex on j-axis to acess
kIndex on k-axis to acess

Definition at line 169 of file usImage3D.h.

◆ operator()() [2/2]

template<class Type >
void usImage3D< Type >::operator() ( unsigned int  i,
unsigned int  j,
unsigned int  k,
Type  value 
)
inline

Modification operator.

Parameters
iIndex on i-axis to modify
jIndex on j-axis to modify
kIndex on k-axis to modify
valueValue to insert at the desired index

Definition at line 181 of file usImage3D.h.

◆ operator=()

template<class Type >
usImage3D< Type > & usImage3D< Type >::operator= ( const usImage3D< Type > &  other)

Assignment operator.

Parameters
otherother 3D-image to copy

Definition at line 324 of file usImage3D.h.

Referenced by usImagePostScan3D< Type >::operator=(), usImagePreScan3D< Type >::operator=(), usImagePreScan3D< Type >::setData(), and usImagePostScan3D< Type >::setData().

◆ operator==()

template<class Type >
bool usImage3D< Type >::operator== ( const usImage3D< Type > &  other)

Comparison operator.

Parameters
otherThe 3d image to compare. Comparing image parameters, and all volume voxel by voxel.

Definition at line 332 of file usImage3D.h.

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

Referenced by usImagePostScan3D< Type >::operator==().

◆ resize()

◆ setData()

template<class Type >
void usImage3D< Type >::setData ( Type *  data,
int  numberOfVoxels 
)

Set the data container.

Parameters
dataThe data container.
numberOfVoxelsThe number of voxels in the image.

Definition at line 354 of file usImage3D.h.