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

#include <visp3/ustk_core/usSequenceReader.h>

Public Member Functions

 usSequenceReader ()
 
virtual ~usSequenceReader ()
 
void acquire (ImageType &image)
 
void acquire (ImageType &image, uint64_t &timestamp)
 
bool end ()
 
void getFrame (ImageType &image, int index)
 
ImageType & getFrame (int index)
 
long getFrameCount ()
 
double getFrameRate () const
 
long getImageNumber () const
 
std::vector< uint64_t > getSequenceTimestamps () const
 
usImageSettingsXmlParser getXmlParser ()
 
void open (ImageType &image, uint64_t &timestamp)
 
void open (ImageType &image)
 
void setFirstFrameIndex (long firstIndex)
 
void setLastFrameIndex (long lastIndex)
 
void setLoopCycling (bool activateLoopCycling)
 
void setSequenceFileName (const std::string &sequenceFileName)
 

Detailed Description

template<class ImageType>
class usSequenceReader< ImageType >

Reading of sequences of ultrasound images.

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

Definition at line 67 of file usSequenceReader.h.

Constructor & Destructor Documentation

◆ usSequenceReader()

template<class ImageType >
usSequenceReader< ImageType >::usSequenceReader

Default constructor.

Definition at line 183 of file usSequenceReader.h.

◆ ~usSequenceReader()

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

Destructor.

Definition at line 192 of file usSequenceReader.h.

Member Function Documentation

◆ acquire() [1/2]

template<class ImageType >
void usSequenceReader< ImageType >::acquire ( ImageType &  image)

Sequence image acquisition (grabber-style : an internal counter is incremented to open next image at the next call).

Parameters
[out]imageImage of the sequence to read.

Definition at line 639 of file usSequenceReader.h.

Referenced by usImageIo::read().

◆ acquire() [2/2]

template<class ImageType >
void usSequenceReader< ImageType >::acquire ( ImageType &  image,
uint64_t &  timestamp 
)

Sequence image acquisition (grabber-style : an internal counter is incremented to open next image at the next call).

Parameters
[out]imageImage of the sequence to read.
[out]timestampReal timestamp of the image acquisition (optional).

Definition at line 704 of file usSequenceReader.h.

◆ end()

template<class ImageType >
bool usSequenceReader< ImageType >::end ( )
inline
Returns
true if the end of the sequence is reached.

Definition at line 119 of file usSequenceReader.h.

References usSequenceReader< ImageType >::open().

Referenced by usImageIo::read().

◆ getFrame() [1/2]

template<class ImageType >
void usSequenceReader< ImageType >::getFrame ( ImageType &  image,
int  index 
)

Sequence image acquisition with selection of the index (bypassing the internal counter).

Parameters
[out]imageImage of the sequence to read.
[in]indexIndex of the image you want to acquire.

Definition at line 914 of file usSequenceReader.h.

◆ getFrame() [2/2]

template<class ImageType >
ImageType & usSequenceReader< ImageType >::getFrame ( int  index)

Sequence image acquisition with selection of the index (bypassing the internal counter).

Returns
image Image read.
Parameters
indexIndex of the image you want to acquire.

Definition at line 938 of file usSequenceReader.h.

◆ getFrameCount()

template<class ImageType >
long usSequenceReader< ImageType >::getFrameCount

Get the total number of frames in the sequence.

Returns
Total number of frames in the sequence.

Definition at line 958 of file usSequenceReader.h.

Referenced by usImageIo::read().

◆ getFrameRate()

template<class ImageType >
double usSequenceReader< ImageType >::getFrameRate ( ) const
inline

Definition at line 157 of file usSequenceReader.h.

◆ getImageNumber()

template<class ImageType >
long usSequenceReader< ImageType >::getImageNumber ( ) const
inline

Definition at line 158 of file usSequenceReader.h.

◆ getSequenceTimestamps()

template<class ImageType >
std::vector<uint64_t> usSequenceReader< ImageType >::getSequenceTimestamps ( ) const
inline

Definition at line 161 of file usSequenceReader.h.

◆ getXmlParser()

template<class ImageType >
usImageSettingsXmlParser usSequenceReader< ImageType >::getXmlParser

Get the xml parser used to access all the image settings written in the xml file.

Returns
Xml parser used by the sequence reader.

Definition at line 969 of file usSequenceReader.h.

Referenced by usImageIo::read().

◆ open() [1/2]

template<class ImageType >
void usSequenceReader< ImageType >::open ( ImageType &  image)

Sequence opening.

Parameters
imageFirst image of the sequence to read.

Definition at line 228 of file usSequenceReader.h.

◆ open() [2/2]

template<class ImageType >
void usSequenceReader< ImageType >::open ( ImageType &  image,
uint64_t &  timestamp 
)

Sequence opening.

Parameters
imageFirst image of the sequence to read.
[out]timestampReal timestamp of the image acquisition (optionnal).

Definition at line 239 of file usSequenceReader.h.

Referenced by usSequenceReader< ImageType >::end(), and usImageIo::read().

◆ setFirstFrameIndex()

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

Sequence first index setter.

Parameters
firstIndexFirst index of the sequence.

Definition at line 208 of file usSequenceReader.h.

◆ setLastFrameIndex()

template<class ImageType >
void usSequenceReader< ImageType >::setLastFrameIndex ( long  lastIndex)

Sequence last index setter.

Parameters
lastIndexLast index of the sequence.

Definition at line 218 of file usSequenceReader.h.

◆ setLoopCycling()

template<class ImageType >
void usSequenceReader< ImageType >::setLoopCycling ( bool  activateLoopCycling)

Activate loop cycling mode

Parameters
activateLoopCyclingTrue if you want to activate it, false to stop the loop.

Definition at line 949 of file usSequenceReader.h.

◆ setSequenceFileName()

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

Settings fileName setter.

Parameters
sequenceFileNameRelative or absolute file name of the sequence header.

Definition at line 198 of file usSequenceReader.h.

Referenced by usImageIo::read().