ImFusion C++ SDK 4.5.0
ImFusion::US::ChannelDataLayout Class Reference

#include <ImFusion/USImgFormation/ChannelDataLayout.h>

Layout of ultrasound channel data in a 3D image. More...

Inheritance diagram for ImFusion::US::ChannelDataLayout:

Detailed Description

Layout of ultrasound channel data in a 3D image.

Default: Channels, FastTime, SlowTime.

The layout is defined by the semantics of the three axes in the 3D image. "Channels" is the axis with the individual channels of the ultrasound data. "FastTime" is the axis of "depth-wise" data points from the same channel and the same pulse echo event. "SlowTime" is the axis for the individual pulse echo events.

Public Types

enum class  Axis { Channels = 0 , FastTime = 1 , SlowTime = 2 }
 The semantics of one axis in the 3D image. More...

Public Member Functions

 ChannelDataLayout (const ChannelDataLayout &)=default
 ChannelDataLayout (ChannelDataLayout &&)=default
 ChannelDataLayout (Axis axis0, Axis axis1, Axis axis2)
 Create a new layout with the given axis semantics. axis0 is the x-axis in the data, axis1 the y-axis, and axis2 the z-axis.
ChannelDataLayout & operator= (const ChannelDataLayout &)=default
ChannelDataLayout & operator= (ChannelDataLayout &&)=default
Axis axisSemantics (int index) const
 Get the semantics of the axis at the given index.
int axisIndex (Axis axis) const
 Get the index the axis with the given semantics.
int channelsAxisIndex () const
int fastTimeAxisIndex () const
int slowTimeAxisIndex () const
vec3i packVec (int channelsValue, int fastTimeValue, int slowTimeValue) const
 Pack the given values into a 3D vector according to the layout.
std::tuple< int, int, int > unpackVec (const vec3i &vec) const
 Unpack the given 3D vector into the values according to the layout.
std::string id () const override
 Returns a unique string identifier for this type of data component.
Public Member Functions inherited from ImFusion::DataComponent< ChannelDataLayout >
std::unique_ptr< DataComponentBase > clone () const override
 Creates a clone of this data component.
std::unique_ptr< Subclass > cloneDerived () const
bool assign (const DataComponentBase &other) override
 Assigns the content of other to this data component.
bool equals (const DataComponentBase &other) const override
 Compares this data component to other for equality.
Public Member Functions inherited from ImFusion::Configurable
virtual void configureDefaults ()
 Retrieve the properties of this object, replaces values with their defaults and sets it again.
void registerParameter (ParameterBase *param)
 Register the given Parameter or SubProperty, so that it will be configured during configure()/configuration().
void unregisterParameter (const ParameterBase *param)
 Remove the given Parameter or SubProperty from the list of registered parameters.
 Configurable (const Configurable &rhs)
 Configurable (Configurable &&rhs) noexcept
Configurable & operator= (const Configurable &)
Configurable & operator= (Configurable &&) noexcept

Configurable interface

void configure (const Properties *p) override
 Configure this object instance by de-serializing the given Properties.
void configuration (Properties *p) const override
 Serialize the current object configuration into the given Properties object.
bool operator== (const ChannelDataLayout &other) const
bool operator!= (const ChannelDataLayout &other) const

Additional Inherited Members

Public Attributes inherited from ImFusion::Configurable
Signal signalParametersChanged
 Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted.
Protected Member Functions inherited from ImFusion::DataComponentBase
 DataComponentBase (const DataComponentBase &)=default
DataComponentBase & operator= (const DataComponentBase &other)=default
Protected Attributes inherited from ImFusion::Configurable
std::vector< Paramm_params
 List of all registered Parameter and SubProperty instances.

Member Enumeration Documentation

◆ Axis

The semantics of one axis in the 3D image.

Enumerator
Channels 

the axis with the individual channels of the ultrasound data.

FastTime 

the axis of "depth-wise" data points from the same channel and the same pulse echo event.

SlowTime 

the axis for the individual pulse echo events.

Member Function Documentation

◆ packVec()

vec3i ImFusion::US::ChannelDataLayout::packVec ( int channelsValue,
int fastTimeValue,
int slowTimeValue ) const
nodiscard

Pack the given values into a 3D vector according to the layout.

The values can be e.g. the indices to access in an image, or sizes of the axes. The resulting vector is equivalent to:

vec3i result;
result[channelsAxisIndex()] = channelsValue;
result[fastTimeAxisIndex()] = fastTimeValue;
result[slowTimeAxisIndex()] = slowTimeValue;

◆ unpackVec()

std::tuple< int, int, int > ImFusion::US::ChannelDataLayout::unpackVec ( const vec3i & vec) const
nodiscard

Unpack the given 3D vector into the values according to the layout.

Best used with structured bindings:

auto [channelsValue, fastTimeValue, slowTimeValue] = layout.unpackVec(vec);

The vector can be e.g. the indices to access in an image, or sizes of the axes. The resulting values are equivalent to:

channelsValue = vec[channelsAxisIndex()];
fastTimeValue = vec[fastTimeAxisIndex()];
slowTimeValue = vec[slowTimeAxisIndex()];

◆ id()

std::string ImFusion::US::ChannelDataLayout::id ( ) const
nodiscardoverridevirtual

Returns a unique string identifier for this type of data component.

Note
To avoid conflicts make sure to include potential plugin names into this ID. Due to the modular architecture of the ImFusion library, uniqueness of IDs cannot be checked at compile time. However, DataComponentFactory will check the uniqueness of the ID during registration.

Implements ImFusion::DataComponentBase.

◆ configure()

void ImFusion::US::ChannelDataLayout::configure ( const Properties * p)
overridevirtual

Configure this object instance by de-serializing the given Properties.

The default implementation will do so automatically for all registered Parameter and SubProperty instances.

See also
configuration() for the inverse functionality

Reimplemented from ImFusion::Configurable.

◆ configuration()

void ImFusion::US::ChannelDataLayout::configuration ( Properties * p) const
overridevirtual

Serialize the current object configuration into the given Properties object.

The default implementation will do so automatically for all registered Parameter and SubProperty instances.

See also
configure() for the inverse functionality

Reimplemented from ImFusion::Configurable.


The documentation for this class was generated from the following file:
  • ImFusion/USImgFormation/ChannelDataLayout.h
Search Tab / S to search, Esc to close