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

#include <visp3/ustk_core/usSequenceWriter.h>

Public Member Functions

 usSequenceWriter ()
 
virtual ~usSequenceWriter ()
 
void close ()
 
double getFrameRate () const
 
void saveImage (const ImageType &image, uint64_t timestamp=0)
 
void setFirstFrameIndex (long firstIndex)
 
void setFrameRate (double frameRate)
 
void setImageFileName (const std::string &imageFileName)
 
void setSequenceFileName (const std::string &sequenceFileName)
 
void close ()
 
void close ()
 
void close ()
 

Detailed Description

template<class ImageType>
class usSequenceWriter< ImageType >

Writing of sequences of ultrasound images.

This class is used to write ultrasound images from a sequence.

Examples
tutorial-elastography-2D.cpp.

Definition at line 63 of file usSequenceWriter.h.

Constructor & Destructor Documentation

◆ usSequenceWriter()

template<class ImageType >
usSequenceWriter< ImageType >::usSequenceWriter

Default constructor.

Definition at line 113 of file usSequenceWriter.h.

◆ ~usSequenceWriter()

template<class ImageType >
usSequenceWriter< ImageType >::~usSequenceWriter
virtual

Destructor.

Definition at line 121 of file usSequenceWriter.h.

Member Function Documentation

◆ close() [1/4]

template<class ImageType >
void usSequenceWriter< ImageType >::close

Sequence closing : writes sequence settings in the header.

Warning
Implemented only for usImageRF2D < unsigned char >, usImagePreScan2D < unsigned char > and usImagePostScan2D < unsigned char >

Definition at line 224 of file usSequenceWriter.h.

◆ close() [2/4]

◆ close() [3/4]

◆ close() [4/4]

◆ getFrameRate()

template<class ImageType >
double usSequenceWriter< ImageType >::getFrameRate

FrameRate getter.

Returns
frameRate Frame rate of the sequence.

Definition at line 133 of file usSequenceWriter.h.

◆ saveImage()

template<class ImageType >
void usSequenceWriter< ImageType >::saveImage ( const ImageType &  image,
uint64_t  timestamp = 0 
)

Sequence last index setter.

Parameters
imageNext image to write.
timestamptimestamp of the image (optionnal).
Examples
tutorial-elastography-2D.cpp.

Definition at line 291 of file usSequenceWriter.h.

◆ setFirstFrameIndex()

template<class ImageType >
void usSequenceWriter< ImageType >::setFirstFrameIndex ( long  firstIndex)

Sequence first index setter.

Parameters
firstIndexSequence first index.

Definition at line 170 of file usSequenceWriter.h.

◆ setFrameRate()

template<class ImageType >
void usSequenceWriter< ImageType >::setFrameRate ( double  frameRate)

FrameRate setter.

Parameters
frameRateFrame rate to set.

Definition at line 127 of file usSequenceWriter.h.

◆ setImageFileName()

template<class ImageType >
void usSequenceWriter< ImageType >::setImageFileName ( const std::string &  imageFileName)

Image generic file name setter. ex : "rf2d%04d.png". If you want to write the images in a subdirectory of where the header is, add the subdirs names in the file name (ex :"mySubDir/myserie%04d.png". Otherwise the images will be written in the same directory as the header.

Parameters
imageFileNameImage file name, relatively to the header.
Examples
tutorial-elastography-2D.cpp.

Definition at line 152 of file usSequenceWriter.h.

◆ setSequenceFileName()

template<class ImageType >
void usSequenceWriter< ImageType >::setSequenceFileName ( const std::string &  sequenceFileName)

File name setter, with parents direcotries (relative or absolute).

Parameters
sequenceFileNameFile name, ex : "../../myheader.xml", or : "/tmp/myheader.xml".
Examples
tutorial-elastography-2D.cpp.

Definition at line 139 of file usSequenceWriter.h.