![]() |
iVS3D v2.0.9
|
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>
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. | |
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.
|
pure virtual |
applySettings applies the provided settings to the plugin. This method is used to restore plugin configurations from the history within iVS3D.
| settings | A QMap containing the plugin settings as key-value pairs. |
Implemented in Blur, GeoDistance, GeoMap, NthFrame, SegmentationPlugin, CameraMovement, StationaryCamera, and VisualSimilarity.
|
pure virtual |
getName returns the name of the plugin which will be displayed in the iVS3D interface.
Implemented in Blur, GeoDistance, GeoMap, NthFrame, SegmentationPlugin, CameraMovement, StationaryCamera, and VisualSimilarity.
|
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.
Implemented in Blur, GeoDistance, GeoMap, NthFrame, SegmentationPlugin, CameraMovement, StationaryCamera, and VisualSimilarity.
|
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.
|
pure virtual |
getSettingsWidget creates and returns a settings QWidget for this plugin.
Ownership contract:
Threading contract:
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.
Implemented in Blur, GeoDistance, GeoMap, NthFrame, SegmentationPlugin, CameraMovement, StationaryCamera, and VisualSimilarity.
|
inlinevirtual |
onCudaChanged is called when the CUDA usage setting is changed in iVS3D.
| enabled | Indicates 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.
|
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:
| index | New current frame index. |
|
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.
|
inlinevirtual |
onMetaDataLoaded is called whenever metadata was loaded or refreshed for the currently active input.
Typical use cases:
Threading contract:
Error handling:
Error if the plugin cannot consume the provided metadata.| inputMetaData | Metadata context for the currently loaded input. |
MetaDataLoadedResult indicating success or failure. Implemented in GeoDistance, and GeoMap.
|
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:
| selectedImages | Updated sorted list of selected image indices. |
Implemented in GeoDistance, and GeoMap.
|
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.
|
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.
| progress | An integer value between 0 and 100 indicating the percentage of completion. |
| message | An optional QString providing additional information about the progress status. |
|
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.
| selectedImages | A vector containing the indices of the images to be selected in the video player. |