1#ifndef IVS3D_GEOMAPPLUGIN_H
2#define IVS3D_GEOMAPPLUGIN_H
10#include <QCoreApplication>
26#include "iselection.h"
28#include "maphandler.h"
30#define DESCRIPTION_STYLE "color: rgb(58, 58, 58); border-left: 6px solid rgb(58, 58, 58); " \
31 "border-top-right-radius: 5px; border-bottom-right-radius: 5px; " \
32 "background-color: lightblue;"
34#define NAME_Polygon "Polygon"
56 Q_PLUGIN_METADATA(IID
"iVS3D.IBase")
89 QString
getName()
const override;
91 QMap<QString, QVariant>
getSettings()
const override;
93 const QMap<QString, QVariant>& settings)
override;
98 const std::vector<uint>& selectedImages)
override;
102 volatile bool& cancelFlag)
override;
105 void syncMapData(
const GpsDataList& gpsData,
const QPolygonF& polygon);
106 void syncMapPointUpdates(
const GpsPointStateList& changedGpsData,
107 const QPolygonF& polygon);
108 void syncMapPolygon(
const QPolygonF& polygon);
109 void syncCurrentIndex(uint index);
110 void syncPartialSelectionMode(
bool enabled);
129 std::unique_ptr<QWidget> createSettingsWidget();
130 void loadPersistentSettings();
131 void savePersistentSettings()
const;
133 void readMetaData(
MetaData* metaData);
139 QPointF gpsHashToLatLong(
const QVariant& hash,
bool* ok =
nullptr)
const;
140 QGeoCoordinate gpsHashtoGeoCo(
const QVariant& hash)
const;
142 double distanceBetweenPoints(
int first,
int second)
const;
143 double greatCircleDistance(QPointF first, QPointF second)
const;
147 Reader* mReader =
nullptr;
159 bool mPartialSelectionEnabled = GEOMAP_ENABLE_PARTIAL_SELECTION != 0;
The GeoMapPlugin allows the user to select the images, which are to be used for the 3D reconstruction...
Definition geomap.h:52
void onGpsClicked(QPointF gpsPoint, bool used)
onGpsClicked slot triggered when gps point on the map is clicked
Definition geomap.cpp:244
std::vector< unsigned int > getKeyframesFromGps() const
these are the localy stored keyframes
Definition geomap.cpp:441
void onGpsSelected(QPolygonF polyF)
onGpsSelected Slot is triggered when a new user selcted polyogn is created
Definition geomap.cpp:264
void onIndexChanged(uint index) override
onIndexChanged is called when the currently displayed frame index changes in the viewer.
Definition geomap.cpp:271
bool mIsGpsAvailable
Flag indicating if GPS data is available.
Definition geomap.h:158
std::vector< unsigned int > getFramesInsidePolygon() const
these are all frames inside the user created polygon
Definition geomap.cpp:451
PLUG::SelectionResult selectImages(const PLUG::SelectionData &data, volatile bool &cancelFlag) override
Selects images based on the provided selection data.
Definition geomap.cpp:206
PLUG::SettingsWidgetResult getSettingsWidget() override
getSettingsWidget is provides an QWidget to display plugin specific settings to the user....
Definition geomap.cpp:48
QString getName() const override
getName returns the display name for the plugin. This name is presented to the user.
Definition geomap.cpp:58
GeoMap()
Construct and initialize plugin with default parameterization.
Definition geomap.cpp:35
PLUG::MetaDataLoadedResult onMetaDataLoaded(const PLUG::InputMetaData &inputMetaData) override
onMetaDataLoaded is called whenever metadata was loaded or refreshed for the currently active input.
Definition geomap.cpp:95
QList< QPair< QPointF, bool > > mGpsData
List of GPS data associated with the images.
Definition geomap.h:153
~GeoMap() override=default
Destroy object of GeoMapPlugin.
QList< QVariant > mMetaData
List of available meta data.
Definition geomap.h:150
QMap< QString, QVariant > getSettings() const override
getSettings retrieves the current settings of the plugin as a map of key-value pairs....
Definition geomap.cpp:60
void onSelectedImagesChanged(const std::vector< uint > &selectedImages) override
onSelectedImagesChanged is called when the current keyframe / selected-image list changed.
Definition geomap.cpp:108
PLUG::InputLoadedResult onInputLoaded(const PLUG::InputData &input) override
onInputLoaded is called when a new input video or image set is loaded.
Definition geomap.cpp:84
PLUG::ApplySettingsResult applySettings(const QMap< QString, QVariant > &settings) override
applySettings applies the provided settings to the plugin. This method is used to restore plugin conf...
Definition geomap.cpp:66
The IBase interface provides a base class for all plugin interfaces in iVS3D. It inherits from QObjec...
Definition ibase.h:102
Interface for keyframe/image-selection plugins in iVS3D.
Definition iselection.h:53
The Reader interface defines functions which are used for reading and parsing the import.
Definition reader.h:23
tl::expected< void, Error > InputLoadedResult
Type alias for the result of handling an input loaded event, which can be either a successful void re...
Definition ibase.h:58
tl::expected< void, Error > ApplySettingsResult
Type alias for the result of applying settings to a plugin, which can be either a successful void res...
Definition ibase.h:51
tl::expected< std::unique_ptr< QWidget >, Error > SettingsWidgetResult
Type alias for the result of a settings widget creation operation, which can be either a successful u...
Definition ibase.h:44
tl::expected< void, Error > MetaDataLoadedResult
Type alias for the result of handling a metadata-loaded event, either success (void) or an Error.
Definition ibase.h:65
Data available for image selection in ISelection plugins.
Definition iselection.h:31