fast::UFFStreamer class

Stream ultrasound file format (UFF) data.

A streamer for reading data stored in the ultrasound file format (UFF) which is essentially and HDF5 file with ultrasound image/beam data.

There is GUI tool called the 'UFFviewer' which uses the UFF streamer, enabling you to load and play with UFF data without programming. Type UFFviewer in your terminal to access it.

Output ports

Examples using the UFF streamer:

Base classes

class RandomAccessStreamer
Abstract class of streamer in which any frame can be accessed at any time through an integer index and playbacked can be paused.

Constructors, destructors, conversion operators

~UFFStreamer()
UFFStreamer() protected

Public functions

auto create(std::string filename, bool loop, uint framerate, float gain, float dynamicRange, int scanConversionWidth, int scanConversionHeight, bool doScanConversion, bool convertToGrayscale) -> std::shared_ptr<UFFStreamer>
Create instance.
void setFilename(std::string filename)
void setGain(float gain)
void setDynamicRange(float dynamicRange)
void execute() override
auto getNrOfFrames() -> int override
Nr of frames in UFF file.
void setName(std::string name)
Set name of which HDF5 group to stream.
void loadAttributes() override

Protected functions

void load()
void generateStream() override

Protected variables

std::string m_filename
std::string m_name
std::shared_ptr<UFFData> m_uffData
float m_dynamicRange
float m_gain
bool m_doScanConversion
std::shared_ptr<ScanConverter> m_scanConverter
std::shared_ptr<EnvelopeAndLogCompressor> m_envelopeAndLogCompressor

Function documentation

std::shared_ptr<UFFStreamer> fast::UFFStreamer::create(std::string filename, bool loop, uint framerate, float gain, float dynamicRange, int scanConversionWidth, int scanConversionHeight, bool doScanConversion, bool convertToGrayscale)

Create instance.

Parameters
filename UFF file to stream from
loop Whether to loop or not
framerate Max framerate (FPS) to output frames
gain Gain
dynamicRange Dynamic range
scanConversionWidth Width of scan converted image
scanConversionHeight Height of scan converted image
doScanConversion Whether to perform scan conversion or not
convertToGrayscale
Returns instance

int fast::UFFStreamer::getNrOfFrames() override

Nr of frames in UFF file.

Returns nr of frames

void fast::UFFStreamer::generateStream() override protected

The function producing the data stream