iVS3D v2.0.9
Loading...
Searching...
No Matches
GeoDistance Class Reference

Selects images based on traveled geographic distance between frames. More...

#include <geodistance.h>

Inheritance diagram for GeoDistance:
PLUG::IBase PLUG::ISelection

Public Member Functions

PLUG::SettingsWidgetResult getSettingsWidget () override
 getSettingsWidget creates and returns a settings QWidget for this plugin.
 
QString getName () const override
 getName returns the name of the plugin which will be displayed in the iVS3D interface.
 
QMap< QString, QVariant > getSettings () const override
 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.
 
PLUG::ApplySettingsResult applySettings (const QMap< QString, QVariant > &settings) override
 applySettings applies the provided settings to the plugin. This method is used to restore plugin configurations from the history within iVS3D.
 
PLUG::InputLoadedResult onInputLoaded (const PLUG::InputData &input) override
 onInputLoaded is called when a new input video or image set is loaded.
 
PLUG::MetaDataLoadedResult onMetaDataLoaded (const PLUG::InputMetaData &inputMetaData) override
 onMetaDataLoaded is called whenever metadata was loaded or refreshed for the currently active input.
 
void onSelectedImagesChanged (const std::vector< uint > &selectedImages) override
 onSelectedImagesChanged is called when the current keyframe / selected-image list changed.
 
PLUG::SelectionResult selectImages (const PLUG::SelectionData &data, volatile bool &cancelFlag) override
 Selects images based on the provided selection data.
 
- Public Member Functions inherited from PLUG::IBase
virtual QString getSettingsString () const
 getSettingsString is a helper method that converts the plugin settings into a human-readable string format.
 
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 void onIndexChanged (uint index)
 onIndexChanged is called when the currently displayed frame index changes in the viewer.
 

Additional Inherited Members

- Signals inherited from PLUG::IBase
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.
 

Detailed Description

Selects images based on traveled geographic distance between frames.

Author
Daniel Brommer
Dominik Wüst
Boitumelo Ruf

Member Function Documentation

◆ applySettings()

ApplySettingsResult GeoDistance::applySettings ( const QMap< QString, QVariant > &  settings)
overridevirtual

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.

Implements PLUG::IBase.

◆ getName()

QString GeoDistance::getName ( ) const
overridevirtual

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

Returns
The name of the plugin as a QString.

Implements PLUG::IBase.

◆ getSettings()

QMap< QString, QVariant > GeoDistance::getSettings ( ) const
overridevirtual

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.

Implements PLUG::IBase.

◆ getSettingsWidget()

SettingsWidgetResult GeoDistance::getSettingsWidget ( )
overridevirtual

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.

Implements PLUG::IBase.

◆ onInputLoaded()

InputLoadedResult GeoDistance::onInputLoaded ( const PLUG::InputData input)
overridevirtual

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.

Implements PLUG::IBase.

◆ onMetaDataLoaded()

MetaDataLoadedResult GeoDistance::onMetaDataLoaded ( const PLUG::InputMetaData inputMetaData)
overridevirtual

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.

Implements PLUG::IBase.

◆ onSelectedImagesChanged()

void GeoDistance::onSelectedImagesChanged ( const std::vector< uint > &  selectedImages)
overridevirtual

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.

Implements PLUG::IBase.

◆ selectImages()

SelectionResult GeoDistance::selectImages ( const PLUG::SelectionData data,
volatile bool &  cancelFlag 
)
overridevirtual

Selects images based on the provided selection data.

This method should be implemented by the plugin to select images according to the specified criteria in SelectionData.

Parameters
dataThe SelectionData containing selected indices, working resolution, and ROI.
cancelFlagA volatile boolean flag that can be set to true to cancel the selection process.
Returns
A SelectionResult containing either the selected image indices or an Error if the selection failed.

Implements PLUG::ISelection.


The documentation for this class was generated from the following files: