ImFusion SDK 4.3
StreamRecorderAlgorithm Class Reference

#include <ImFusion/Stream/StreamRecorderAlgorithm.h>

Records multiple ImageStream and TrackingStream instances and optionally merges their results into one or more TrackedSharedImageSet objects. More...

+ Inheritance diagram for StreamRecorderAlgorithm:

Detailed Description

Records multiple ImageStream and TrackingStream instances and optionally merges their results into one or more TrackedSharedImageSet objects.

There are three modes for the recorded data to be saved to disk:

  1. Data is not saved to disk with setSaveToFile(false)
  2. Data is saved to an .imf-file after recording with setSaveToFile(true) and setLiveStreamRecording(false)
  3. Raw image frames are saved continuously during recording and other data (meta data, tracking data) to an .imf-file after recording with setSaveToFile(true) and setLiveStreamRecording(true)

Modes 2 and 3 support both synchronous/blocking (takeOutput) and asynchronous/non-blocking (takeOutputAsync) saving of recorded data to disk once recording has finished.

In live saving mode (3), you can limit memory use by retaining only the last N frames in memory via setSaveStreamingFramesKeptInMemory(N).

Warning
If frames are removed from memory, the SharedImageSet or TrackedSharedImageSet returned by takeOutput or takeOutputAsync will not contain the actual image data for those frames as their content was replaced with a placeholder.

Example usage:

// Example recordings of image and tracking stream
//
FakeImageStream imageStream;
imageStream.start();
FakeTrackingStream trackingStream;
trackingStream.start();
StreamRecorderAlgorithm recorderAlgorithm{std::vector<Stream*>{&imageStream, &trackingStream}};
// Record for 5 seconds
recorderAlgorithm.start();
recorderAlgorithm.stop();
// Take output
auto recordings = recorderAlgorithm.takeOutput();
auto images = recordings.extractFirst<SharedImageSet>();
auto trackingSequence = recordings.extractFirst<TrackingSequence>();
// Change input (two images and two tracking instruments) and combination mode
imageStream.setNumImages(2);
recorderAlgorithm.setDataCombinationMode(StreamRecorderAlgorithm::DataCombinationMode::OneOnOne);
// Record for 5 seconds
recorderAlgorithm.start();
recorderAlgorithm.stop();
// Take output
recordings = recorderAlgorithm.takeOutput();
auto twotrackedSharedImageSets = recordings.extractAll<TrackedSharedImageSet>();

Classes

struct  OwningDataListAsync
 Helper class for managing recorded data together with a future to ensure that background saving tasks are complete before the data is deleted. More...
 

Public Types

enum class  DataCombinationMode { Individual = 0 , All = 1 , FirstTracking = 2 , OneOnOne = 3 }
 Specifies how image and tracking data should be combined when both types are recorded. More...
 
- Public Types inherited from Algorithm
enum  Status {
  Unknown = -1 , Success = 0 , Error = 1 , InvalidInput ,
  IncompleteInput , OutOfMemoryHost , OutOfMemoryGPU , UnsupportedGPU ,
  UnknownAction , AbortedByUser , User = 1000
}
 Status codes. More...
 

Public Member Functions

 StreamRecorderAlgorithm (std::vector< Stream * > inputStreams)
 Constructs the recorder for multiple Stream objects.
 
void compute () override
 Performs basic consistency checks, method itself is not involved in recording.
 
OwningDataList takeOutput () override
 Returns all recorded data based on the configured combination mode.
 
OwningDataListAsync takeOutputAsync ()
 Returns recorded data along with a future for any pending background save tasks.
 
virtual void start ()
 Initializes individual StreamRecorder instances for each input stream and starts recording.
 
virtual void stop ()
 Stops all StreamRecorders and combines recorded output based on the selected combination mode.
 
void restart ()
 Restarts recording without clearing internal data.
 
bool isRestarting () const
 Returns true if the algorithm is currently restarting.
 
bool isRecording () const
 Returns true if any StreamRecorder is recording.
 
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.
 
int recordedFrames () const
 Returns total number of recorded image frames across all ImageStreamRecorders.
 
int recordedTrackingData () const
 Returns total number of recorded tracking samples across all TrackingStreamRecorders.
 
virtual size_t recordedBytes ()
 Returns total memory usage for all recorded images and tracking data.
 
double passedTime () const
 Returns the elapsed recording time of the current recording session, in seconds.
 
bool limitReached () const
 Returns true if any recording limit (e.g. time, memory, sample count) has been reached in any of the StreamRecorders.
 
StreamRecorderrecorder (int which=0) const
 Returns a specific StreamRecorder instance by index.
 
int numRecorders () const
 Returns the number of StreamRecorder instances.
 
TrackingStreamRecordertrackingRecorder (int which=0) const
 Returns a TrackingStreamRecorder by index (only considers tracking recorders).
 
ImageStreamRecorderimageRecorder (int which=0) const
 Returns an ImageStreamRecorder by index (only considers image recorders).
 
std::vector< Stream * > recordedStreams () const
 Returns all recorded Stream instances.
 
TrackingStreamtrackingStream (int which=0) const
 Returns a TrackingStream by index (only considers tracking streams).
 
ImageStreamimageStream (int which=0) const
 Returns an ImageStream by index (only considers image streams).
 
void setTimestampSource (bool deviceImage=false, bool deviceTracking=false)
 Configures which timestamp source to use for image and tracking streams.
 
bool trackingTimeUseDevice () const
 Returns whether device timestamps are used for tracking streams.
 
bool imageTimeUseDevice () const
 Returns whether device timestamps are used for image streams.
 
std::vector< TrackingInstrumentallTrackingDevices ()
 Returns a copy of all tracking instruments.
 
std::vector< TrackingInstrumentallTrackingInstruments () const
 Returns all TrackingInstruments from all recorded TrackingStreams.
 
void setSaveToFile (bool save)
 Enables automatic saving of recorded data to m_savePath after recording ends.
 
bool saveToFile () const
 Returns true if automatic saving to m_savePath is enabled.
 
bool isDataBeingSaved (const Data *data) const
 Returns true if the given data is currently being saved to disk.
 
void setSaveAsDicom (bool flag)
 Enables saving of recorded data as DICOM. Disabled by default; ImFusion format is used otherwise.
 
bool saveAsDicom () const
 Returns whether recorded data will be saved in DICOM format.
 
void setSavePath (std::string savePath)
 Sets the base directory for saving recorded data. Data is saved to subfolders within this path.
 
std::string savePath () const
 Returns the base save directory.
 
void setPatientName (std::string patientName)
 Sets the patient name for data saving. Used in subfolder and filename generation.
 
std::string patientName () const
 Returns the configured patient name.
 
void setPatientNameSuffix (std::string suffix)
 Sets a suffix for the patient name (e.g., name-X-suffix).
 
std::string patientNameSuffix () const
 Returns the patient name suffix.
 
void setNumberOfDataToKeep (int n)
 Sets how many recent recordings to keep in the data widget. Use 0 to keep all.
 
int numberOfDataToKeep () const
 Returns the number of recordings retained in the data widget. 0 means all are kept.
 
void setCompression (bool compress)
 Deprecated: Enables compression before saving. Default is off.
 
void setCompressSave (bool save)
 Enables compression for saved data. Ignored if saveStreamingFramesKeptInMemory is not Zero.
 
bool compressSave () const
 Returns whether compression is enabled for saved data. Ignored if saveStreamingFramesKeptInMemory is not Zero.
 
DataCombinationMode dataCombinationMode () const
 Returns the current data combination mode.
 
void setDataCombinationMode (DataCombinationMode m)
 Sets how recorded data should be combined. See DataCombinationMode for available modes.
 
void setLimits (double timeLimitInSeconds, double systemMemLimit, int imageSamplesLimit, int trackingSamplesLimit, size_t recordedBytesLimit)
 Sets recording constraints. Use zero to disable any given limit.
 
double timeLimit () const
 Returns the time limit for recording in seconds. Zero indicates no limit.
 
double systemMemLimit () const
 Returns the allowed ratio of RAM usage during recording (between 0 and 1). Zero indicates no limit.
 
int imageSamplesLimit () const
 Returns the maximum number of image samples to record per ImageStreamRecorder. Zero disables the limit.
 
int trackingSamplesLimit () const
 Returns the maximum number of tracking samples to record per TrackingStreamRecorder. Zero disables the limit.
 
size_t recordedBytesLimit () const
 Returns the maximum number of bytes allowed for recording per StreamRecorder. Zero disables the limit.
 
void setTrackingQualityThreshold (double t)
 Sets a quality threshold for tracking samples. Values below this threshold or NaN are excluded.
 
double trackingQualityThreshold () const
 Returns the configured tracking quality threshold.
 
void setStopOnImageSizeChanged (bool flag)
 Enables or disables stopping when the image size changes.
 
bool isStopOnImageSizeChanged () const
 Returns true if recording stops when the image size changes.
 
void setStopOnDeviceListChanged (bool flag)
 Specify whether to stop when the device list of a tracking stream changes.
 
bool isStopOnDeviceListChanged () const
 Returns if the recording stops when the device list of a tracking stream changes.
 
void setStopOnInstrumentsChanged (bool flag)
 Sets whether recording stops when currently recorded instrument is removed in a TrackingStream.
 
bool stopOnInsturmentsChanged () const
 Returns true if recording stops when an instruments is removed in a TrackingStream.
 
void setRecordBothTimestamps (bool x)
 Sets whether both arrival and device timestamps are recorded.
 
bool recordBothTimestamps () const
 Returns true if both timestamps are recorded.
 
void setCaptureMode (StreamRecorder::CaptureMode captureMode)
 Sets the capture mode.
 
StreamRecorder::CaptureMode captureMode () const
 Returns the current capture mode.
 
void setCaptureNextSample ()
 Enables capturing the next sample.
 
void setLiveStreamRecording (bool x)
 Enables saving images during live recording. Requires saveToFile to be true.
 
bool liveStreamRecording () const
 Returns true if images are saved during live recording.
 
void setSaveStreamingFramesKeptInMemory (int val)
 Specifies how many frames to retain in memory during recording. Use -1 for no limit.
 
int saveStreamingFramesKeptInMemory () const
 Returns the number of frames retained in memory. -1 means unlimited.
 
void setSaveRecordingsAsync (bool flag)
 Enables asynchronous saving after recording ends.
 
bool saveRecordingsAsync () const
 Returns true if asynchronous saving is enabled.
 
void setAutomaticLimitRestart (bool flag)
 Enables automatic restart of the recording into new containers if recording stops due to a limit being exceeded.
 
bool automaticLimitRestart () const
 Returns true if automatic restart is enabled after a limit being exceeded.
 
void setAutomaticImageChangeRestart (bool flag)
 Enables automatic restart of the recording into new containers when images in ImageStream change (e.g., size, type, channels, number of images).
 
bool automaticImageChangeRestart () const
 Returns true if restart on image stream changes is enabled.
 
- Public Member Functions inherited from Algorithm
 Algorithm ()
 Default constructor will registers a single "compute" action that calls compute() and returns status().
 
virtual void setProgress (Progress *progress)
 Sets a Progress interface the algorithm can use to notify observers about its computing progress.
 
Progressprogress () const
 Returns the progress interface if set.
 
virtual int status () const
 Indicates the status of the last call to compute().
 
virtual bool survivesDataDeletion (const Data *) const
 Indicates whether the algorithm can handle (partial) deletion of the specified data, by default this checks whether the data is in the input list.
 
const FactoryInfofactoryInfo () const
 Returns the record describing how this Algorithm was instantiated by the AlgorithmFactory.
 
void setFactoryInfo (const FactoryInfo &value)
 Sets the record describing how this Algorithm was instantiated by the AlgorithmFactory.
 
Status runAction (const std::string &id)
 Run the action with name id if it exists.
 
const std::vector< Action > & actions ()
 Get a mapping from Action id to Action as registered in this algorithm.
 
- Public Member Functions inherited from 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
 
Configurableoperator= (const Configurable &)
 
Configurableoperator= (Configurable &&) noexcept
 
- Public Member Functions inherited from SignalReceiver
 SignalReceiver ()=default
 Default constructor.
 
 SignalReceiver (const SignalReceiver &other)
 Copy constructor, does not copy any existing signal connections from other.
 
SignalReceiveroperator= (SignalReceiver rhs)
 Assignment operator, disconnects all existing connections, does not copy any existing signal connections from rhs.
 
virtual ~SignalReceiver ()
 Virtual destructor disconnects from all connected signals.
 

Static Public Member Functions

static bool createCompatible (const DataList &data, Algorithm **a=nullptr)
 
- Static Public Member Functions inherited from Algorithm
static bool createCompatible (const DataList &data, Algorithm **a=nullptr)
 Factory function to check algorithm compatibility with input data and optionally instantiate it.
 

Protected Member Functions

std::unique_ptr< StreamRecordercreateRecorderForStream (Stream *stream)
 Creates a suitable recorder for the given stream and attaches listeners for byte count and limit events.
 
void addEventListenersToRecorder (StreamRecorder *rec)
 Connects signals from created StreamRecorder instances so that statistics are reflected in the UI.
 
virtual OwningDataList outputInternal (std::function< std::unique_ptr< TrackedSharedImageSet >()> containerFactory)
 Combines recorded data based on the configured combination mode using a container factory.
 
void saveRecordedData (const OwningDataList &odl)
 Saves recorded data. Uses blocking or asynchronous saving depending on m_saveRecordingsAsync.
 
virtual std::future< void > saveRecordedDataAsync (const DataList &dataList, const std::vector< std::string > &paths)
 Asynchronously saves data. Override in derived classes for custom saving behavior.
 
virtual void saveRecordedDataBlocking (const DataList &dataList, const std::vector< std::string > &paths)
 Synchronously saves data. Override in derived classes for custom saving behavior.
 
virtual void extractRecordedData ()
 Collects recorded data from internal recorders and stores it in m_lastRecordedData.
 
- Protected Member Functions inherited from Algorithm
void loadDefaults ()
 
void registerAction (const std::string &id, const std::string &guiName, const std::function< Algorithm::Status(void)> &action)
 Register an action to be run via runAction.
 
template<typename D>
void registerAction (const std::string &id, const std::string &guiName, Algorithm::Status(D::*action)(void))
 Template version of runAction that can be used with a pointer to a member function.
 
void registerAction (const Action &action)
 Register an action.
 
- Protected Member Functions inherited from SignalReceiver
void disconnectAll ()
 Disconnects all existing connections.
 

Protected Attributes

std::vector< Stream * > m_inputStreams
 Input streams (mapped 1:1 to m_streamRecorders)
 
std::vector< std::unique_ptr< StreamRecorder > > m_streamRecorders
 Recorders for input streams.
 
std::recursive_mutex m_mutexRecorders
 Mutex to protect recorder manipulation.
 
std::mutex m_mutexCtrlUpdate
 Mutex to protect signal emission to controllers.
 
DataCombinationMode m_combinationMode = DataCombinationMode::Individual
 How recorded data is combined.
 
std::string m_savePath
 Directory for saving recorded data.
 
std::string m_patientName = "Patient-01"
 Subfolder and filename for saved data.
 
std::string m_patientNameSuffix = ""
 Optional suffix added to filenames.
 
bool m_saveToFile = true
 If true, saved automatically to file in background thread.
 
bool m_saveAsDicom = false
 If true, data saved in DICOM format; otherwise in ImFusion format.
 
int m_numberOfDataToKeep = 1
 Number of recent recordings retained in data widget (default: 1)
 
bool m_compressSave = false
 If true, data compressed before saving.
 
bool m_useDeviceTracking = false
 If true, use device timestamps for tracking, otherwise arrival timestamps.
 
bool m_useDeviceImages = false
 If true, use device timestamps for images, otherwise arrival timestamps.
 
double m_timeLimit = 0
 Time-based recording limit (seconds)
 
double m_systemMemLimit = 0
 Max ratio of used physical RAM (0 = unlimited)
 
int m_imageSamplesLimit = 0
 Max number of image frames to record (per recorder)
 
int m_trackingSamplesLimit = 0
 Max number of tracking samples to record (per recorder)
 
size_t m_recordedBytesLimit = 0
 Max number of bytes to record.
 
double m_trackingQualityThreshold = 0.2
 Quality threshold for tracking samples, samples below threshold (or NaN) are not recorded.
 
bool m_stopOnImageSizeChanged = true
 Stops recording when image dimensions change in the stream.
 
bool m_restartRecordingOnImageDescriptorsChanged = false
 If true, restarts recording automatically when the image structure (size, number of channels, frame count) changes.
 
bool m_stopOnInstrumentsChanged = true
 If true, stops recording when instruments change in a TrackingStream.
 
bool m_limitRestartRecording = false
 If true, automatically restarts recording when any limit criterion is exceeded.
 
bool m_recordBothTimestamps = false
 If true, saves both arrival and device timestamps in data components.
 
StreamRecorder::CaptureMode m_captureMode = StreamRecorder::CaptureMode::CaptureAll
 Selected mode for sample capturing.
 
bool m_saveRecordingsAsync = true
 If true, recorded data is saved asynchronously, otherwise block (both in a background thread)
 
bool m_liveStreamRecording = false
 If true, enables live recording of image streams during acquisition. Requires m_saveToFile = true.
 
int m_saveStreamingFramesKeptInMemory
 Number of image frames retained in memory during live recording. -1 indicates unlimited retention.
 
std::unique_ptr< BackgroundExporterm_exporter
 Exporter for the saving task after recording.
 
- Protected Attributes inherited from Algorithm
std::string m_name
 Algorithm name.
 
Progressm_progress = nullptr
 Non-owing pointer to a progress interface. May be a nullptr.
 
FactoryInfo m_factoryInfo = {}
 Record describing how this algorithm was instantiated by the AlgorithmFactory.
 
int m_status = Status::Unknown
 Algorithm status after last call to compute()
 
std::vector< Actionm_actions
 Map of key given by the id of the action, of the available actions of this algorithm.
 
- Protected Attributes inherited from Configurable
std::vector< Paramm_params
 List of all registered Parameter and SubProperty instances.
 

Additional Inherited Members

- Public Attributes inherited from Algorithm
Signal signalOutputChanged
 Signal should be emitted by Algorithms when their output/result has changed.
 
Signal signalParametersChanged
 Signal should be emitted by Algorithms when their parameter configuration has changed.
 
- Public Attributes inherited from Configurable
Signal signalParametersChanged
 Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted.
 

Member Enumeration Documentation

◆ DataCombinationMode

enum class DataCombinationMode
strong

Specifies how image and tracking data should be combined when both types are recorded.

Enumerator
Individual 

Default: No merging.

One SharedImageSet is created per image in each ImageStream, and one TrackingSequence per TrackingInstrument in each TrackingStream.

All 

All recorded images are returned in the form of TrackedSharedImageSets, each containing a copy of all TrackingSequences.

FirstTracking 

Each recorded SharedImageSet receives a copy of the first TrackingSequence (first instrument of the first TrackingStream) and is returned as TrackedSharedImageSet.

Remaining instruemnts are recorded separately as TrackingSequences.

Note
Selected TrackingSequence depends on the order of TrackingStreams and instruments therein.
OneOnOne 

Combines SharedImageSet and TrackingSequence pairwise into a TrackedSharedImageSets, originating from the first image from the first ImageStream and first TrackingInstrument from the first TrackingStream, the same with the second image and tracking instrument, etc.

Remaining image or tracking data is recorded individually.

Note
Which ImageStreams images are combined with which tracking instrument depends on the order of Streams and the image/tracking instrument order therein.

Constructor & Destructor Documentation

◆ StreamRecorderAlgorithm()

Constructs the recorder for multiple Stream objects.

Only ImageStream and TrackingStream types are considered; others are ignored.

Member Function Documentation

◆ compute()

void compute ( )
overridevirtual

Performs basic consistency checks, method itself is not involved in recording.

Implements Algorithm.

◆ takeOutput()

OwningDataList takeOutput ( )
overridevirtual

Returns all recorded data based on the configured combination mode.

Blocks if data is still being saved in the background. Use takeOutputAsync() for non-blocking retrieval. Returned data is sorted by time, newest first, if recording has been performed more than once.

Reimplemented from Algorithm.

◆ takeOutputAsync()

OwningDataListAsync takeOutputAsync ( )

Returns recorded data along with a future for any pending background save tasks.

If no save tasks exist or saving is synchronous, the future will be empty. Check future.valid() and call future.wait() before deleting the data. Data is sorted by time, newest first.

◆ start()

virtual void start ( )
virtual

Initializes individual StreamRecorder instances for each input stream and starts recording.

Clears internal buffers prior to starting.

◆ stop()

virtual void stop ( )
virtual

Stops all StreamRecorders and combines recorded output based on the selected combination mode.

If setSaveToFile(true) is used, data is saved synchronously or asynchronously depending on m_saveRecordingsAsync.

◆ configure()

void 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 Configurable.

Reimplemented in SweepRecorderAlgorithm.

◆ configuration()

void 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 Configurable.

Reimplemented in SweepRecorderAlgorithm.

◆ trackingStream()

TrackingStream & trackingStream ( int which = 0) const

Returns a TrackingStream by index (only considers tracking streams).

Exceptions
std::range_errorif the specified index which is negative or exceeds the number of available tracking streams.

◆ imageStream()

ImageStream & imageStream ( int which = 0) const

Returns an ImageStream by index (only considers image streams).

Exceptions
std::range_errorif the specified index which is negative or exceeds the number of available image streams.

◆ setTimestampSource()

void setTimestampSource ( bool deviceImage = false,
bool deviceTracking = false )

Configures which timestamp source to use for image and tracking streams.

Parameters
deviceImageUse device timestamp in ImageStreamRecorder if true, arrival time otherwise.
deviceTrackingUse device timestamp in TrackingStreamRecorder if true, arrival time otherwise.

◆ allTrackingDevices()

std::vector< TrackingInstrument > allTrackingDevices ( )

Returns a copy of all tracking instruments.

Deprecated
"Method was renamed. Use allTrackingInstruments() instead."

◆ setSaveToFile()

void setSaveToFile ( bool save)

Enables automatic saving of recorded data to m_savePath after recording ends.

Saving occurs in a background thread.

◆ setCompression()

void setCompression ( bool compress)

Deprecated: Enables compression before saving. Default is off.

Deprecated
"Use method setCompressSave() instead."

◆ setStopOnImageSizeChanged()

void setStopOnImageSizeChanged ( bool flag)

Enables or disables stopping when the image size changes.

Deprecated
"The possibility to continue recording when the image size changes will be removed in the future. An image stream with its image size changing will stop the recording automatically."

◆ isStopOnImageSizeChanged()

bool isStopOnImageSizeChanged ( ) const

Returns true if recording stops when the image size changes.

Deprecated
"The possibility to continue recording when the image size changes will be removed in the future. An image stream with its image size changing will stop the recording automatically."

◆ setStopOnDeviceListChanged()

void setStopOnDeviceListChanged ( bool flag)

Specify whether to stop when the device list of a tracking stream changes.

Deprecated
"Method was renamed. Use setStopOnInsturmentsChanged() instead."

◆ isStopOnDeviceListChanged()

bool isStopOnDeviceListChanged ( ) const

Returns if the recording stops when the device list of a tracking stream changes.

Deprecated
"Method was renamed. Use stopOnInsturmentsChanged() instead."

◆ setStopOnInstrumentsChanged()

void setStopOnInstrumentsChanged ( bool flag)

Sets whether recording stops when currently recorded instrument is removed in a TrackingStream.

If false, the resulting TrackingSequences may vary in length and recording duration.

◆ setRecordBothTimestamps()

void setRecordBothTimestamps ( bool x)

Sets whether both arrival and device timestamps are recorded.

If true, the recorded data contains elementwise TimestampDataComponents.

Note
This setting does not affect the timestamp returned by Data::timestamp, but only the value provided to setTimestampSource.

◆ setCaptureMode()

void setCaptureMode ( StreamRecorder::CaptureMode captureMode)

Sets the capture mode.

Note
Has no effect while recording is active.

◆ setCaptureNextSample()

void setCaptureNextSample ( )

Enables capturing the next sample.

Note
Only used when capture mode is set to CaptureMode::OnRequest.

◆ outputInternal()

virtual OwningDataList outputInternal ( std::function< std::unique_ptr< TrackedSharedImageSet >()> containerFactory)
protectedvirtual

Combines recorded data based on the configured combination mode using a container factory.

Parameters
containerFactoryFactory function for creating TrackedSharedImageSet instances. Override output() to use this method with custom data container types (e.g., ultrasound sweeps).

Reimplemented in SweepRecorderAlgorithm.

◆ saveRecordedDataAsync()

virtual std::future< void > saveRecordedDataAsync ( const DataList & dataList,
const std::vector< std::string > & paths )
protectedvirtual

Asynchronously saves data. Override in derived classes for custom saving behavior.

Reimplemented in SweepRecorderAlgorithm.

◆ saveRecordedDataBlocking()

virtual void saveRecordedDataBlocking ( const DataList & dataList,
const std::vector< std::string > & paths )
protectedvirtual

Synchronously saves data. Override in derived classes for custom saving behavior.

Reimplemented in SweepRecorderAlgorithm.

Member Data Documentation

◆ m_stopOnImageSizeChanged

bool m_stopOnImageSizeChanged = true
protected

Stops recording when image dimensions change in the stream.

Deprecated
"Support for recording with changing image sizes will be removed in a future release. Recording will automatically stop if image size changes."

◆ m_saveStreamingFramesKeptInMemory

int m_saveStreamingFramesKeptInMemory
protected
Initial value:
=
-1

Number of image frames retained in memory during live recording. -1 indicates unlimited retention.


The documentation for this class was generated from the following file:
Search Tab / S to search, Esc to close