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

#include <ImFusion/LiveUS/SweepRecorderAlgorithm.h>

Algorithm for recording an ImageStream with modality ULTRASOUND and zero, one, or multiple TrackingStreams into an UltrasoundSweep. More...

Inheritance diagram for ImFusion::US::SweepRecorderAlgorithm:

Detailed Description

Algorithm for recording an ImageStream with modality ULTRASOUND and zero, one, or multiple TrackingStreams into an UltrasoundSweep.

The algorithm calibrates the sweep, sets the FrameGeometry, and selects the TrackingSequence (optionally relative to another one). Data can be stored either during or after the recording process.

The algorithm returns the recorded UltrasoundSweep.

Public Member Functions

 SweepRecorderAlgorithm (std::vector< Stream * > inputStreams, DataGroup *imageStreamGroup=nullptr)
 Constructor that initializes recorders for each input stream.
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.
void updateAlgorithmInputs ()
 Updates the input data list of the base Algorithm class.
void setReferenceCoordinateSystem (const mat4 &mat)
 Sets an optional reference coordinate system (e.g., center of data).
void setRegistration (const mat4 &mat)
 Sets the registration matrix and emits signalRegistrationChanged.
void setTemporalOffset (double val)
 Defines the temporal offset (lag) in seconds.
mat4 referenceCoordinateSystem () const
 Returns the reference coordinate system (e.g., center of data).
mat4 registration () const
 Returns the registration matrix.
double temporalOffset () const
 Returns the temporal offset (lag) in seconds.
void moveTracking (mat4 refPos, mat4 lastPos)
 Applies a transformation to the tracking registration matrix to align lastPos with refPos.
std::shared_ptr< SweepCalibratorsweepCalibrator ()
 Provides access to the ultrasound sweep calibrator instance.
void setTrackingRefPos (const mat4 &mat)
 Sets the reference tracking position.
mat4 trackingRefPos () const
 Returns the reference tracking position.
void setProbeModelReg (const mat4 &mat)
 Sets the probe model registration matrix.
mat4 probeModelReg () const
 Returns the probe model registration matrix.
const std::stringprobeModelPath () const
 Returns the custom path to the probe model mesh file or resource.
mat4 initialRefPos () const
 Returns the initial reference position matrix.
int probeMeshTrackingDeviceIndex () const
 Returns the index of the tracking device used for visualizing the probe mesh.
void setProbeMeshTrackingDeviceIndex (int i)
 Sets the index of the tracking device used for visualizing the probe mesh.
void setRelativeTracking (bool useRelative, const std::string &trackerName="")
void setRelativeTracking (const std::optional< TrackerID > &trackerID)
 Sets the relative tracking flag. If true, relative tracking is enabled for the recorded sweep based on its tracker ID.
bool relativeTracking () const
 Returns the relative tracking flag.
const std::stringrelativeTrackingName () const
const std::stringrelativeTrackingID () const
 Returns the relative tracker ID.
void setDeviceName (const std::string &name)
 Sets the device name to be added to UltrasoundMetadata (unless one already exists).
std::string deviceName () const
 Returns the device name to be added to UltrasoundMetadata.
vec3 computeCurrentBoundingBox () const
 Computes the bounding box of the sweep currently being recorded.
bool reconnect ()
 Calls Stream::restart() on all recorded streams.
void appendToPatientLog (std::string text)
 Appends a log entry to the patient log file, saved as <patient-name>.txt next to the recorded sweeps.
void removeLastRecordedFiles ()
 Removes the last recorded sweep and all associated data (substream recordings, raw data file) from disk, and adds a log entry to the patient log.
Public Member Functions inherited from ImFusion::StreamRecorderAlgorithm
 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.
bool isCompressSupported () const
 Returns true if compression is supported for the current input streams.
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 stopOnInstrumentsChanged () 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.
Filesystem::Path lastRecordedFile () const
 Returns the path to the last recorded file.
Public Member Functions inherited from ImFusion::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 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
Public Member Functions inherited from ImFusion::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 ImFusion::StreamRecorderAlgorithm
static bool createCompatible (const DataList &data, Algorithm **a=nullptr)
Static Public Member Functions inherited from ImFusion::Algorithm
static bool createCompatible (const DataList &data, Algorithm **a=nullptr)
 Factory function to check algorithm compatibility with input data and optionally instantiate it.

Public Attributes

Signal signalRegistrationChanged
 Emitted when the registration matrix changes.
Public Attributes inherited from ImFusion::StreamRecorderAlgorithm
Parameter< std::optional< int > > p_numberOfDataToKeepLimit {"numberOfDataToKeepLimit", 1, this}
 Number of recent recordings retained in data widget (default: 1).
Public Attributes inherited from ImFusion::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 ImFusion::Configurable
Signal signalParametersChanged
 Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted.

Protected Member Functions

OwningDataList outputInternal (std::function< std::unique_ptr< TrackedSharedImageSet >()> containerFactory) override
 Takes the output from StreamRecorderAlgorithm::outputInternal and calls initializeAndValidateSweep() on all output sweeps to create a valid sweep.
bool initializeAndValidateSweep (UltrasoundSweep *sweep)
 Ensures correct tracking, calibration, and frame geometry settings.
std::future< void > saveRecordedDataAsync (const DataList &dataList, const std::vector< std::string > &paths) override
 Saves all UltrasoundSweeps in dataList asynchronously and returns a future for the saving task.
void saveRecordedDataBlocking (const DataList &dataList, const std::vector< std::string > &paths) override
 Saves all UltrasoundSweeps in dataList in a blocking operation.
void dropFramesWithoutTracking (UltrasoundSweep *us)
 Drops frames at beginning and end, if no tracking available.
Protected Member Functions inherited from ImFusion::StreamRecorderAlgorithm
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.
void saveRecordedData (const OwningDataList &odl)
 Saves recorded data. Uses blocking or asynchronous saving depending on m_saveRecordingsAsync.
virtual void extractRecordedData ()
 Collects recorded data from internal recorders and stores it in m_lastRecordedData.
Protected Member Functions inherited from ImFusion::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 ImFusion::SignalReceiver
void disconnectAll ()
 Disconnects all existing connections.

Protected Attributes

std::shared_ptr< SweepCalibratorm_usCalibrator
 Calculates calibrations for recorded sweeps and live visualization.
mat4 m_refCoord = mat4::Identity()
 Optional reference coordinate system (e.g. center of data).
mat4 m_calibration = mat4::Identity()
 Calibration matrix - deprecated, please use SweepCalibrator directly.
mat4 m_registration = mat4::Identity()
 Registration matrix (applied left of the tracking).
double m_temporalOfs = 0.0
 Temporal offset (lag) in seconds.
bool m_relativeTracking = false
 If true, relative tracking is set for the recorded sweep based on the tracker name.
std::string m_relativeTrackingID = ""
 Unique ID of the relative tracking target.
mat4 m_trackingRefPos
 Reference position for the tracking stream which is used for manual registration, must be configured otherwise Identity matrix is used.
mat4 m_initialRefPos
 Reference position which is configured by workspace file, used to reset the reference position.
mat4 m_probeModelReg = mat4::Identity()
 Transformation matrix to position the probe mesh model on top of the live US frame.
std::string m_probeModelPath = ""
 Custom path to file or resource for the probe model mesh.
int m_probeMeshTrackingDevice
 Index of tracking device that should be used for visualizing the probe mesh.
std::string m_deviceName = ""
 Will be added as UltrasoundMetadata::m_device, unless one already exists.
Protected Attributes inherited from ImFusion::StreamRecorderAlgorithm
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.
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 ImFusion::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 ImFusion::Configurable
std::vector< Paramm_params
 List of all registered Parameter and SubProperty instances.

Additional Inherited Members

Public Types inherited from ImFusion::StreamRecorderAlgorithm
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 ImFusion::Algorithm
enum  Status {
  Unknown = -1 , Success = 0 , Error = 1 , InvalidInput ,
  IncompleteInput , OutOfMemoryHost , OutOfMemoryGPU , UnsupportedGPU ,
  UnknownAction , AbortedByUser , User = 1000
}
 Status codes. More...

Constructor & Destructor Documentation

◆ SweepRecorderAlgorithm()

ImFusion::US::SweepRecorderAlgorithm::SweepRecorderAlgorithm ( std::vector< Stream * > inputStreams,
DataGroup * imageStreamGroup = nullptr )

Constructor that initializes recorders for each input stream.

Parameters
inputStreamsInput streams to record.
imageStreamGroupIf provided, this group will be monitored for substream addition/removal, allowing the respective recorders to be added or removed dynamically.
Note
Passing a data group to this class only establishes signal listeners to detect stream additions and removals. All streams belonging to the group must also be included in inputStreams. The group elements are never iterated over.

Member Function Documentation

◆ configure()

void ImFusion::US::SweepRecorderAlgorithm::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::StreamRecorderAlgorithm.

◆ configuration()

void ImFusion::US::SweepRecorderAlgorithm::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::StreamRecorderAlgorithm.

◆ updateAlgorithmInputs()

void ImFusion::US::SweepRecorderAlgorithm::updateAlgorithmInputs ( )

Updates the input data list of the base Algorithm class.

This list is typically populated by the algorithm controller when the algorithm is created by the framework. If the algorithm is instantiated by an SDK user, this list is considered when data is deleted, ensuring that dependent algorithms are also removed. Since the algorithm supports data groups, only the group's main stream should be included in the input list. Otherwise, the framework would delete the recorder whenever substreams are updated.

◆ setRelativeTracking()

void ImFusion::US::SweepRecorderAlgorithm::setRelativeTracking ( bool useRelative,
const std::string & trackerName = "" )
Deprecated
"Use setRelativeTracking(bool useRelative, const TrackerID&)"

◆ relativeTrackingName()

const std::string & ImFusion::US::SweepRecorderAlgorithm::relativeTrackingName ( ) const
Deprecated
"Use relativeTrackingID()"

◆ appendToPatientLog()

void ImFusion::US::SweepRecorderAlgorithm::appendToPatientLog ( std::string text)

Appends a log entry to the patient log file, saved as <patient-name>.txt next to the recorded sweeps.

The log entry follows the format 22-12-02 08:09:10 <text>.

◆ outputInternal()

OwningDataList ImFusion::US::SweepRecorderAlgorithm::outputInternal ( std::function< std::unique_ptr< TrackedSharedImageSet >()> containerFactory)
overrideprotectedvirtual

Takes the output from StreamRecorderAlgorithm::outputInternal and calls initializeAndValidateSweep() on all output sweeps to create a valid sweep.

Reimplemented from ImFusion::StreamRecorderAlgorithm.

◆ saveRecordedDataAsync()

std::future< void > ImFusion::US::SweepRecorderAlgorithm::saveRecordedDataAsync ( const DataList & dataList,
const std::vector< std::string > & paths )
overrideprotectedvirtual

Saves all UltrasoundSweeps in dataList asynchronously and returns a future for the saving task.

Called from StreamRecorderAlgorithm::saveRecordedData when saving in async mode is selected. See StreamRecorderAlgorithm::setSaveRecordingsAsync(bool flag).

Reimplemented from ImFusion::StreamRecorderAlgorithm.

◆ saveRecordedDataBlocking()

void ImFusion::US::SweepRecorderAlgorithm::saveRecordedDataBlocking ( const DataList & dataList,
const std::vector< std::string > & paths )
overrideprotectedvirtual

Saves all UltrasoundSweeps in dataList in a blocking operation.

Called from StreamRecorderAlgorithm::saveRecordedData when saving in async mode is selected. See StreamRecorderAlgorithm::setSaveRecordingsAsync(bool flag)

Reimplemented from ImFusion::StreamRecorderAlgorithm.

Member Data Documentation

◆ m_trackingRefPos

mat4 ImFusion::US::SweepRecorderAlgorithm::m_trackingRefPos
protected
Initial value:
=
mat4::Identity()

Reference position for the tracking stream which is used for manual registration, must be configured otherwise Identity matrix is used.

◆ m_initialRefPos

mat4 ImFusion::US::SweepRecorderAlgorithm::m_initialRefPos
protected
Initial value:
=
mat4::Identity()

Reference position which is configured by workspace file, used to reset the reference position.

◆ m_probeMeshTrackingDevice

int ImFusion::US::SweepRecorderAlgorithm::m_probeMeshTrackingDevice
protected
Initial value:
=
-1

Index of tracking device that should be used for visualizing the probe mesh.

Useful for wobbler probes, where the US frame wobbles around put the transducer remains static.


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