iVS3D v2.0.9
Loading...
Searching...
No Matches
PLUG::IBase Interface Referenceabstract

The IBase interface provides a base class for all plugin interfaces in iVS3D. It inherits from QObject to enable signal-slot communication and common functionality across all plugins. All plugin signals need to be declared in this interface to ensure they are available in derived plugin classes. More...

#include <ibase.h>

Inheritance diagram for PLUG::IBase:
Blur CameraMovement GeoDistance GeoMap NthFrame SegmentationPlugin StationaryCamera VisualSimilarity

Signals

void updatePreview (bool clearOldPreview=true)
 [signal] updatePreview(bool clearOldPreview) can be emitted when the plugin requests an update of the preview visualization.
 
void updateSelectedImages (std::vector< uint > selectedImages)
 [signal] updateSelectedImages(std::vector<uint> selectedImages) can be emitted when the plugin wants to update the selection of images in the video player. iVS3D will only handle this signal if the plugin is currently active.
 
void updateProgress (int progress, QString message=QString())
 [signal] updateProgress(int progress, QString message) can be emitted to inform iVS3D about the progress of a long-running operation.
 

Public Member Functions

virtual QString getName () const =0
 getName returns the name of the plugin which will be displayed in the iVS3D interface.
 
virtual SettingsWidgetResult getSettingsWidget ()=0
 getSettingsWidget creates and returns a settings QWidget for this plugin.
 
virtual QMap< QString, QVariant > getSettings () const =0
 getSettings retrieves the current settings of the plugin as a map of key-value pairs. The settings are stored in the history within iVS3D and in combination with applySettings allow for saving and restoring plugin configurations.
 
virtual QString getSettingsString () const
 getSettingsString is a helper method that converts the plugin settings into a human-readable string format.
 
virtual ApplySettingsResult applySettings (const QMap< QString, QVariant > &settings)=0
 applySettings applies the provided settings to the plugin. This method is used to restore plugin configurations from the history within iVS3D.
 
virtual void activate ()
 activate is called when the plugin is activated in iVS3D. Plugins can override this method to perform any necessary setup when they become active.
 
virtual void deactivate ()
 deactivate is called when the plugin is deactivated in iVS3D. Plugins can override this method to perform any necessary cleanup when they are no longer active.
 
virtual void onCudaChanged (bool enabled)
 onCudaChanged is called when the CUDA usage setting is changed in iVS3D.
 
virtual InputLoadedResult onInputLoaded (const InputData &input)
 onInputLoaded is called when a new input video or image set is loaded.
 
virtual MetaDataLoadedResult onMetaDataLoaded (const InputMetaData &inputMetaData)
 onMetaDataLoaded is called whenever metadata was loaded or refreshed for the currently active input.
 
virtual void onIndexChanged (uint index)
 onIndexChanged is called when the currently displayed frame index changes in the viewer.
 
virtual void onSelectedImagesChanged (const std::vector< uint > &selectedImages)
 onSelectedImagesChanged is called when the current keyframe / selected-image list changed.
 

Detailed Description

The IBase interface provides a base class for all plugin interfaces in iVS3D. It inherits from QObject to enable signal-slot communication and common functionality across all plugins. All plugin signals need to be declared in this interface to ensure they are available in derived plugin classes.

For usage and extension guidance see PluginInterface.md.

Date
2025/12/05
Author
Dominik Wüst

Member Function Documentation

◆ applySettings()

virtual ApplySettingsResult PLUG::IBase::applySettings ( const QMap< QString, QVariant > &  settings)
pure virtual

applySettings applies the provided settings to the plugin. This method is used to restore plugin configurations from the history within iVS3D.

See also
getSettings
Parameters
settingsA QMap containing the plugin settings as key-value pairs.

Implemented in Blur, GeoDistance, GeoMap, NthFrame, SegmentationPlugin, CameraMovement, StationaryCamera, and VisualSimilarity.

◆ getName()

virtual QString PLUG::IBase::getName ( ) const
pure virtual

getName returns the name of the plugin which will be displayed in the iVS3D interface.

Returns
The name of the plugin as a QString.

Implemented in Blur, GeoDistance, GeoMap, NthFrame, SegmentationPlugin, CameraMovement, StationaryCamera, and VisualSimilarity.

◆ getSettings()

virtual QMap< QString, QVariant > PLUG::IBase::getSettings ( ) const
pure virtual

getSettings retrieves the current settings of the plugin as a map of key-value pairs. The settings are stored in the history within iVS3D and in combination with applySettings allow for saving and restoring plugin configurations.

See also
applySettings
Returns
A QMap containing the plugin settings as key-value pairs.

Implemented in Blur, GeoDistance, GeoMap, NthFrame, SegmentationPlugin, CameraMovement, StationaryCamera, and VisualSimilarity.

◆ getSettingsString()

virtual QString PLUG::IBase::getSettingsString ( ) const
inlinevirtual

getSettingsString is a helper method that converts the plugin settings into a human-readable string format.

This is used to display the settings in the iVS3D interface and to store them in the history. The default implementation converts the settings map into a semicolon-separated list of key=value pairs.

Implemented in SegmentationPlugin.

◆ getSettingsWidget()

virtual SettingsWidgetResult PLUG::IBase::getSettingsWidget ( )
pure virtual

getSettingsWidget creates and returns a settings QWidget for this plugin.

Ownership contract:

  • The plugin must allocate and return a std::unique_ptr<QWidget>.
  • Returning the unique_ptr transfers ownership to the caller.
  • The plugin must NOT keep ownership of, or store a pointer to, the returned widget.
  • The caller (core application) owns the widget and may assign a QObject/QWidget parent.

Threading contract:

  • The widget is part of the UI and must only be accessed from the UI thread.
  • Plugins may run in worker threads and therefore must not directly access the widget after handing it over.

If a plugin needs to reflect state changes in the UI later (e.g. from applySettings), it must do so via Qt signals/slots connected during widget creation.

Returns
A unique_ptr to the created settings QWidget or an Error if the widget could not be created.

Implemented in Blur, GeoDistance, GeoMap, NthFrame, SegmentationPlugin, CameraMovement, StationaryCamera, and VisualSimilarity.

◆ onCudaChanged()

virtual void PLUG::IBase::onCudaChanged ( bool  enabled)
inlinevirtual

onCudaChanged is called when the CUDA usage setting is changed in iVS3D.

Parameters
enabledIndicates whether CUDA is enabled (true) or disabled (false).

Plugins can override this method to adjust their behavior based on the CUDA setting.

Implemented in Blur, NthFrame, SegmentationPlugin, CameraMovement, StationaryCamera, and VisualSimilarity.

◆ onIndexChanged()

virtual void PLUG::IBase::onIndexChanged ( uint  index)
inlinevirtual

onIndexChanged is called when the currently displayed frame index changes in the viewer.

Plugins can use this notification to update index-dependent internal state (for example temporal caches, active-frame labels, or lazy loading windows).

Threading contract:

  • Called on the plugin worker thread.
Parameters
indexNew current frame index.

Implemented in Blur, and GeoMap.

◆ onInputLoaded()

virtual InputLoadedResult PLUG::IBase::onInputLoaded ( const InputData input)
inlinevirtual

onInputLoaded is called when a new input video or image set is loaded.

Plugins can override this method to reset caches or initialize state that depends on the current input.

Implemented in Blur, GeoDistance, GeoMap, NthFrame, CameraMovement, StationaryCamera, and VisualSimilarity.

◆ onMetaDataLoaded()

virtual MetaDataLoadedResult PLUG::IBase::onMetaDataLoaded ( const InputMetaData inputMetaData)
inlinevirtual

onMetaDataLoaded is called whenever metadata was loaded or refreshed for the currently active input.

Typical use cases:

  • refresh plugin-internal caches that depend on metadata,
  • enable/disable metadata-dependent features,
  • precompute derived values from loaded metadata tracks.

Threading contract:

  • This callback is invoked on the plugin worker thread.
  • Implementations must not directly manipulate UI widgets here.

Error handling:

  • Return an Error if the plugin cannot consume the provided metadata.
  • iVS3D logs such errors and continues operating.
Parameters
inputMetaDataMetadata context for the currently loaded input.
Returns
MetaDataLoadedResult indicating success or failure.

Implemented in GeoDistance, and GeoMap.

◆ onSelectedImagesChanged()

virtual void PLUG::IBase::onSelectedImagesChanged ( const std::vector< uint > &  selectedImages)
inlinevirtual

onSelectedImagesChanged is called when the current keyframe / selected-image list changed.

This keeps plugins synchronized with interactive edits, sampling results, and undo/redo restores that modify the selected image set.

Threading contract:

  • Called on the plugin worker thread.
Parameters
selectedImagesUpdated sorted list of selected image indices.

Implemented in GeoDistance, and GeoMap.

◆ updatePreview

void PLUG::IBase::updatePreview ( bool  clearOldPreview = true)
signal

[signal] updatePreview(bool clearOldPreview) can be emitted when the plugin requests an update of the preview visualization.

This signal notifies the system that the preview needs to be regenerated, typically due to changes in plugin settings or data. Plugins implementing preview functionality should emit this signal whenever the preview visualization needs to be updated.

The optional parameter clearOldPreview indicates whether the existing preview should be cleared before generating a new one. If set to false, the old preview will be retained until the new preview is ready to be displayed, this can reduce flickering in some scenarios.

◆ updateProgress

void PLUG::IBase::updateProgress ( int  progress,
QString  message = QString() 
)
signal

[signal] updateProgress(int progress, QString message) can be emitted to inform iVS3D about the progress of a long-running operation.

This signal allows the plugin to communicate its current progress to the iVS3D interface, which can then display this information to the user. The progress value should be in the range of 0 to 100, representing the percentage of completion. An optional message can provide additional context about the operation's status.

This signal is only effective when the plugin is active.

See also
activate, deactivate
Parameters
progressAn integer value between 0 and 100 indicating the percentage of completion.
messageAn optional QString providing additional information about the progress status.

◆ updateSelectedImages

void PLUG::IBase::updateSelectedImages ( std::vector< uint >  selectedImages)
signal

[signal] updateSelectedImages(std::vector<uint> selectedImages) can be emitted when the plugin wants to update the selection of images in the video player. iVS3D will only handle this signal if the plugin is currently active.

This signal notifies the system to change the currently selected images in the video player to the specified list of image indices.

See also
activate, deactivate
Parameters
selectedImagesA vector containing the indices of the images to be selected in the video player.

The documentation for this interface was generated from the following file: