Commit 2528e083 authored by d.kilic's avatar d.kilic
Browse files

Merge branch 'master' into 269-make-shortcut-export

parents 119a42bf e153f743
Pipeline #71930 passed with stages
in 31 minutes and 30 seconds
......@@ -20,7 +20,7 @@
# Project setup
################################################################################
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
project(petrack LANGUAGES CXX VERSION 0.9.1)
project(petrack LANGUAGES CXX VERSION 0.9.2)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
......@@ -132,6 +132,8 @@ endif()
set(DUMMY ${BUILD_SHARED_LIBS})
set(BUILD_SHARED_LIBS FALSE CACHE BOOL "Choose if build should be a dynamic or static library")
add_subdirectory(ezc3d/ EXCLUDE_FROM_ALL)
# disbale warnings for ezc3d on MSVC
target_compile_options(ezc3d PRIVATE $<$<CXX_COMPILER_ID:MSVC>:/w>)
set(BUILD_SHARED_LIBS ${DUMMY})
# if win32 and mingw use in 3rd party
......
......@@ -143,7 +143,7 @@ public:
void setCalibTAUYMax(double d);
double getCalibReprErrorValue() const;
void setCalibReprErrorValue(double d);
void setNewModelChecked(bool b);
void setExtModelChecked(bool b);
double getCalibExtrRot1();
void setCalibExtrRot1(double d);
......@@ -513,7 +513,7 @@ private slots:
void on_quadAspectRatio_stateChanged(int i);
void on_fixCenter_stateChanged(int i);
void on_tangDist_stateChanged(int i);
void on_newModelCheckBox_stateChanged(int i);
void on_extModelCheckBox_stateChanged(int i);
void on_autoCalib_clicked();
void on_calibFiles_clicked();
......
......@@ -292,7 +292,7 @@ inline clock_t getElapsedTime()
lastTime = clock();
return diffTime;
}
bool lessThanVersion(const QString &q1, const QString &q2);
bool newerThanVersion(const QString &q1, const QString &q2);
/**
......
......@@ -30,7 +30,7 @@ public:
bool selectTrackPoint(
const QPointF &pos,
const PersonStorage &personStore,
const QSet<int> &peds,
const QSet<size_t> &peds,
const FrameRange &range);
void moveTrackPoint(const QPointF &pos, PersonStorage &personStore) const;
void setTrackPoint();
......
......@@ -48,15 +48,15 @@ public:
explicit PersonStorage(Petrack &mainWindow, Autosave &autosave) : mMainWindow(mainWindow), mAutosave(autosave) {}
void splitPerson(size_t pers, int frame);
bool splitPersonAt(const Vec2F &p, int frame, const QSet<int> &onlyVisible);
bool splitPersonAt(const Vec2F &p, int frame, const QSet<size_t> &onlyVisible);
bool delPointOf(int pers, int direction, int frame);
bool delPoint(const Vec2F &p, int direction, int frame, const QSet<int> &onlyVisible);
bool delPoint(const Vec2F &p, int direction, int frame, const QSet<size_t> &onlyVisible);
void delPointAll(Direction direction, int frame);
void delPointROI();
void delPointInsideROI();
bool editTrackPersonComment(const Vec2F &p, int frame, const QSet<int> &onlyVisible);
bool setTrackPersonHeight(const Vec2F &p, int frame, const QSet<int> &onlyVisible);
bool resetTrackPersonHeight(const Vec2F &p, int frame, QSet<int> onlyVisible);
bool editTrackPersonComment(const Vec2F &p, int frame, const QSet<size_t> &onlyVisible);
bool setTrackPersonHeight(const Vec2F &p, int frame, const QSet<size_t> &onlyVisible);
bool resetTrackPersonHeight(const Vec2F &p, int frame, const QSet<size_t> &onlyVisible);
void moveTrackPoint(int personID, int frame, const Vec2F &newPosition);
size_t nbPersons() const { return mPersons.size(); }
......@@ -74,7 +74,7 @@ public:
bool addPoint(
TrackPoint &p,
int frame,
const QSet<int> &onlyVisible,
const QSet<size_t> &onlyVisible,
reco::RecognitionMethod method,
int *pers = nullptr);
......@@ -84,8 +84,9 @@ public:
int largestFirstFrame() const;
int largestLastFrame() const;
int smallestFirstFrame() const;
[[nodiscard]] std::vector<PersonFrame>
getProximalPersons(const QPointF &pos, QSet<int> selected, const FrameRange &frameRange) const;
std::vector<PersonFrame>
getProximalPersons(const QPointF &pos, QSet<size_t> selected, const FrameRange &frameRange) const;
void recalcHeight(float altitude);
void clear() { mPersons.clear(); }
......@@ -123,7 +124,7 @@ public:
// rueckgabewert false wenn keine hoeheninformationen in tracker datensatz vorliegt
bool printHeightDistribution();
void setMarkerHeights(const std::unordered_map<int, float> &heights);
void setMarkerID(int person, int markerIDs, bool manual = false);
void setMarkerID(size_t personIndex, int markerIDs, bool manual = false);
void setMarkerIDs(const std::unordered_map<int, int> &markerIDs);
void purge(int frame);
......
......@@ -166,37 +166,37 @@ public slots:
void skipToFrameFromTrajectory(QPointF pos);
public:
void updateControlWidget();
void dragEnterEvent(QDragEnterEvent *event);
void dropEvent(QDropEvent *event);
void updateSceneRect();
double getStatusPosRealHeight();
void setStatusStereo(float x, float y, float z);
void setStatusTime();
void setStatusFPS();
void setShowFPS(double fps);
void updateShowFPS(bool skipped = false);
void setStatusPosReal(const QPointF &pos);
void setStatusPos(const QPoint &pos);
void setStatusColor(const QRgb &col);
void setStatusColor();
void setMousePosOnImage(QPointF pos);
void updateControlImage(cv::Mat &img);
int calculateRealTracker();
void exportTracker(QString dest = "");
void importTracker(QString dest = "");
void testTracker();
void trackAll();
void playAll();
int winSize(QPointF *pos = nullptr, int pers = -1, int frame = -1, int level = -1);
void updateImage(bool imageChanged = false);
void updateImage(const cv::Mat &img);
void updateSequence();
QSet<int> getPedestrianUserSelection();
QSet<int> getPedestriansToTrack();
double getCmPerPixel() const;
void setHeadSize(double hS = -1);
double getHeadSize(QPointF *pos = nullptr, int pers = -1, int frame = -1);
void updateControlWidget();
void dragEnterEvent(QDragEnterEvent *event);
void dropEvent(QDropEvent *event);
void updateSceneRect();
double getStatusPosRealHeight();
void setStatusStereo(float x, float y, float z);
void setStatusTime();
void setStatusFPS();
void setShowFPS(double fps);
void updateShowFPS(bool skipped = false);
void setStatusPosReal(const QPointF &pos);
void setStatusPos(const QPoint &pos);
void setStatusColor(const QRgb &col);
void setStatusColor();
void setMousePosOnImage(QPointF pos);
void updateControlImage(cv::Mat &img);
int calculateRealTracker();
void exportTracker(QString dest = "");
void importTracker(QString dest = "");
void testTracker();
void trackAll();
void playAll();
int winSize(QPointF *pos = nullptr, int pers = -1, int frame = -1, int level = -1);
void updateImage(bool imageChanged = false);
void updateImage(const cv::Mat &img);
void updateSequence();
QSet<size_t> getPedestrianUserSelection();
QSet<size_t> getPedestriansToTrack();
double getCmPerPixel() const;
void setHeadSize(double hS = -1);
double getHeadSize(QPointF *pos = nullptr, int pers = -1, int frame = -1);
//------------------------------
// inline function
......
......@@ -242,13 +242,13 @@ public:
void resize(cv::Size size);
size_t calcPrevFeaturePoints(
int prevFrame,
cv::Rect &rect,
int frame,
bool reTrack,
int reQual,
int borderSize,
QSet<int> onlyVisible);
int prevFrame,
cv::Rect &rect,
int frame,
bool reTrack,
int reQual,
int borderSize,
QSet<size_t> onlyVisible);
int insertFeaturePoints(int frame, size_t count, cv::Mat &img, int borderSize, float errorScale);
......@@ -262,7 +262,7 @@ public:
int borderSize,
reco::RecognitionMethod recoMethod,
int level = 3,
QSet<int> onlyVisible = QSet<int>(),
QSet<size_t> onlyVisible = QSet<size_t>(),
int errorScaleExponent = 0);
private:
......
......@@ -47,8 +47,8 @@ AboutDialog::AboutDialog(
for(std::size_t i = 0; i < authors.size(); ++i)
{
int row = i / 2ul;
int col = i % 2ul;
int row = static_cast<int>(i / 2ul);
int col = static_cast<int>(i % 2ul);
auto *label = new QLabel();
label->setText(QString::fromStdString(authors[i]));
mUi->lytAuthors->addWidget(label, row, col, 1, 1);
......
......@@ -256,7 +256,7 @@ void AutoCalib::autoCalib()
{
flags |= CV_CALIB_ZERO_TANGENT_DIST;
}
if(mControlWidget->newModelCheckBox->isChecked())
if(mControlWidget->extModelCheckBox->isChecked())
{
flags |= CV_CALIB_RATIONAL_MODEL + CV_CALIB_THIN_PRISM_MODEL + CV_CALIB_TILTED_MODEL;
}
......
......@@ -164,7 +164,7 @@ Control::Control(
// will be done by designer: colorPlot->setParent(colorBox); //because it is just integrated via frame in designer
connect(newModelCheckBox, &QCheckBox::stateChanged, this, &Control::on_newModelCheckBox_stateChanged);
connect(extModelCheckBox, &QCheckBox::stateChanged, this, &Control::on_extModelCheckBox_stateChanged);
colorPlot->setControlWidget(this);
mIndexChanging = false;
......@@ -639,15 +639,15 @@ void Control::setCalibReprErrorValue(double d)
{
intrError->setText(QString("%1").arg(d));
}
void Control::setNewModelChecked(bool b)
void Control::setExtModelChecked(bool b)
{
if(b)
{
newModelCheckBox->setChecked(true);
extModelCheckBox->setChecked(true);
}
else
{
newModelCheckBox->setChecked(false);
extModelCheckBox->setChecked(false);
}
}
......@@ -2476,7 +2476,7 @@ void Control::on_tangDist_stateChanged(int i)
intrError->setText(QString("invalid"));
}
void Control::on_newModelCheckBox_stateChanged(int i)
void Control::on_extModelCheckBox_stateChanged(int i)
{
if(i == Qt::Checked)
{
......@@ -3044,6 +3044,7 @@ void Control::setXml(QDomElement &elem)
subSubElem.setAttribute("QUAD_ASPECT_RATIO", quadAspectRatio->isChecked());
subSubElem.setAttribute("FIX_CENTER", fixCenter->isChecked());
subSubElem.setAttribute("TANG_DIST", tangDist->isChecked());
subSubElem.setAttribute("EXT_MODEL_ENABLED", extModelCheckBox->isChecked());
// in dateiname darf kein , vorkommen - das blank ", " zur uebersich - beim einlesen wird nur ","
// genommen und blanks rundherum abgeschnitten, falls von hand editiert wurde
QStringList fl = mMainWindow->getAutoCalib()->getCalibFiles();
......@@ -3612,6 +3613,11 @@ void Control::getXml(QDomElement &elem)
tangDist->setCheckState(
subSubElem.attribute("TANG_DIST").toInt() ? Qt::Checked : Qt::Unchecked);
}
if(subSubElem.hasAttribute("EXT_MODEL_ENABLED"))
{
extModelCheckBox->setCheckState(
subSubElem.attribute("EXT_MODEL_ENABLED").toInt() ? Qt::Checked : Qt::Unchecked);
}
if(subSubElem.hasAttribute("CALIB_FILES"))
{
QStringList fl = (subSubElem.attribute("CALIB_FILES")).split(",");
......
......@@ -196,46 +196,54 @@ cv::Mat getRoi(cv::Mat &img, const QRect &roi, cv::Rect &rect, bool evenPixelNum
* @throws std::invalid_argument Thrown if one of the input strings is not in the right format
* @return boolean, whether the first version is higher than the second one
*/
bool lessThanVersion(const QString &q1, const QString &q2)
bool newerThanVersion(const QString &q1, const QString &q2)
{
QStringList version1 = q1.split(QLatin1Char('.'));
QStringList version2 = q2.split(QLatin1Char('.'));
std::vector<int> version1_digits;
std::vector<int> version2_digits;
std::vector<int> version1_parts;
std::vector<int> version2_parts;
constexpr int amountOfVersionParts = 3;
for(int i = 0; i < version1.length(); ++i)
for(const auto &versionPart : version1)
{
if(version1[i].length() == 1 && version1[i][0].isDigit())
bool ok;
int part = versionPart.toInt(&ok, 10);
if(ok)
{
version1_digits.push_back(version1[i].toInt());
version1_parts.push_back(part);
}
else
{
throw std::invalid_argument("Invalid Input String!");
throw std::invalid_argument("Invalid PeTrack version string: Version is non-numeric!");
}
}
for(int i = 0; i < version2.length(); ++i)
for(const auto &versionPart : version2)
{
if(version2[i].length() == 1 && version2[i][0].isDigit())
bool ok;
int part = versionPart.toInt(&ok, 10);
if(ok)
{
version2_digits.push_back(version2[i].toInt());
version2_parts.push_back(part);
}
else
{
throw std::invalid_argument("Invalid Input String!");
throw std::invalid_argument("Invalid PeTrack version string: Version is non-numeric!");
}
}
int length = std::min(version1_digits.size(), version2_digits.size());
for(int i = 0; i < length; ++i)
if(!(version1_parts.size() == amountOfVersionParts && version2_parts.size() == amountOfVersionParts))
{
if(version1_digits[i] > version2_digits[i])
throw std::invalid_argument("Invalid PeTrack version string: Amount of version parts is wrong!");
}
for(int i = 0; i < amountOfVersionParts; ++i)
{
if(version1_parts[i] > version2_parts[i])
{
return true;
}
else if(version1_digits[i] < version2_digits[i])
else if(version1_parts[i] < version2_parts[i])
{
return false;
}
}
return version1_digits.size() > version2_digits.size();
return false;
}
......@@ -25,7 +25,7 @@
bool ManualTrackpointMover::selectTrackPoint(
const QPointF &pos,
const PersonStorage &personStore,
const QSet<int> &peds,
const QSet<size_t> &peds,
const FrameRange &range)
{
auto res = personStore.getProximalPersons(pos, peds, range);
......
......@@ -66,14 +66,15 @@ void PersonStorage::splitPerson(size_t pers, int frame)
* @param onlyVisible set of people for whom to do it (empty means everyone)
* @return true if a trajectory was split
*/
bool PersonStorage::splitPersonAt(const Vec2F &point, int frame, const QSet<int> &onlyVisible)
bool PersonStorage::splitPersonAt(const Vec2F &point, int frame, const QSet<size_t> &onlyVisible)
{
mAutosave.trackPersonModified();
for(size_t i = 0; i < mPersons.size(); ++i)
{ // ueber TrackPerson
if(((onlyVisible.empty()) || (onlyVisible.contains(i))) &&
(mPersons.at(i).trackPointExist(frame) && (mPersons.at(i).trackPointAt(frame).distanceToPoint(point) <
mMainWindow.getHeadSize(nullptr, i, frame) / 2.)))
(mPersons.at(i).trackPointExist(frame) &&
(mPersons.at(i).trackPointAt(frame).distanceToPoint(point) <
mMainWindow.getHeadSize(nullptr, static_cast<int>(i), frame) / 2.)))
{
splitPerson(i, frame);
......@@ -127,7 +128,7 @@ bool PersonStorage::delPointOf(int pers, int direction, int frame)
* @param onlyVisible set of people whose points could be deleted; empty means everyone
* @return true if deletion occured
*/
bool PersonStorage::delPoint(const Vec2F &point, int direction, int frame, const QSet<int> &onlyVisible)
bool PersonStorage::delPoint(const Vec2F &point, int direction, int frame, const QSet<size_t> &onlyVisible)
{
mAutosave.trackPersonModified();
for(int i = 0; i < static_cast<int>(mPersons.size()); ++i)
......@@ -264,7 +265,7 @@ void PersonStorage::delPointROI()
* @param onlyVisible list of visible persons
* @return if a comment has been saved
*/
bool PersonStorage::editTrackPersonComment(const Vec2F &point, int frame, const QSet<int> &onlyVisible)
bool PersonStorage::editTrackPersonComment(const Vec2F &point, int frame, const QSet<size_t> &onlyVisible)
{
mAutosave.trackPersonModified();
for(int i = 0; i < static_cast<int>(mPersons.size()); ++i) // ueber TrackPerson
......@@ -319,7 +320,7 @@ bool PersonStorage::editTrackPersonComment(const Vec2F &point, int frame, const
* @param onlyVisible Set of people which could be selected (empty means everyone can be selected)
* @return whether the height of a TrackPerson was successfully changed
*/
bool PersonStorage::setTrackPersonHeight(const Vec2F &point, int frame, const QSet<int> &onlyVisible)
bool PersonStorage::setTrackPersonHeight(const Vec2F &point, int frame, const QSet<size_t> &onlyVisible)
{
mAutosave.trackPersonModified();
for(int i = 0; i < static_cast<int>(mPersons.size()); ++i) // ueber TrackPerson
......@@ -387,7 +388,7 @@ bool PersonStorage::setTrackPersonHeight(const Vec2F &point, int frame, const QS
* @param onlyVisible Set of people which could be selected (empty means everyone can be selected)
* @return true if height was successfully reset
*/
bool PersonStorage::resetTrackPersonHeight(const Vec2F &point, int frame, QSet<int> onlyVisible)
bool PersonStorage::resetTrackPersonHeight(const Vec2F &point, int frame, const QSet<size_t> &onlyVisible)
{
mAutosave.trackPersonModified();
for(int i = 0; i < static_cast<int>(mPersons.size()); ++i) // ueber TrackPerson
......@@ -498,7 +499,7 @@ int PersonStorage::calcPosition(int /*frame*/)
bool PersonStorage::addPoint(
TrackPoint &point,
int frame,
const QSet<int> &onlyVisible,
const QSet<size_t> &onlyVisible,
reco::RecognitionMethod method,
int *pers)
{
......@@ -667,7 +668,7 @@ void PersonStorage::addPoints(QList<TrackPoint> &pL, int frame, reco::Recognitio
// ueberprufen ob identisch mit einem Punkt in liste
for(auto &point : pL) // ueber PointList
{
addPoint(point, frame, QSet<int>(), method);
addPoint(point, frame, QSet<size_t>(), method);
}
}
......@@ -730,7 +731,7 @@ int PersonStorage::smallestFirstFrame() const
* @return list of the id of all proximal persons with the frame at which they are nearest to pos
*/
std::vector<PersonFrame>
PersonStorage::getProximalPersons(const QPointF &pos, QSet<int> selected, const FrameRange &frameRange) const
PersonStorage::getProximalPersons(const QPointF &pos, QSet<size_t> selected, const FrameRange &frameRange) const
{
std::vector<PersonFrame> result;
for(int i = 0; i < static_cast<int>(mPersons.size()); ++i)
......@@ -1107,16 +1108,16 @@ void PersonStorage::setMarkerHeights(const std::unordered_map<int, float> &heigh
/**
* Sets/Overwrites the markerID for a specific person and all trackpaints belonging to that person
* @param personID internal id of persons (0 based)
* @param personIndex internal id of persons (0 based)
* @param markerIDs new marker ID
*/
void PersonStorage::setMarkerID(int personID, int markerID, bool manual)
void PersonStorage::setMarkerID(size_t personIndex, int markerID, bool manual)
{
if(manual)
{
mAutosave.trackPersonModified();
}
auto &person = mPersons.at(personID);
auto &person = mPersons.at(personIndex);
person.setMarkerID(markerID);
for(auto &trackPoint : person) // over TrackPoints
{
......@@ -1138,7 +1139,7 @@ void PersonStorage::setMarkerIDs(const std::unordered_map<int, int> &markerIDs)
if(markerIDs.find(personID) != std::end(markerIDs))
{
int markerID = markerIDs.at(personID);
setMarkerID(personID, markerID);
setMarkerID(i, markerID);
}
else
{
......
......@@ -664,14 +664,26 @@ void Petrack::openProject(QString fileName, bool openSeq) // default fileName=""
openXml(doc, openSeq);
mLastTrackerExport = mTrcFileName;
if(!lessThanVersion(root.attribute("VERSION"), QString("0.9.0")))
if(newerThanVersion(QString("0.9.0"), root.attribute("VERSION")))
{
PWarning(
this,
tr("PeTrack"),
tr("You are using a project version lower than 0.9: Therefore, the extended intrinsic calibration "
"model is disabled."));
mControlWidget->setNewModelChecked(false);
mControlWidget->setExtModelChecked(false);
}
else if(newerThanVersion(QString("0.9.2"), root.attribute("VERSION")))
{
// only checking one parameter because if the ext. model is used all parameters are not equal to zero
if(mControlWidget->getCalibS1Value() == 0.)
{
mControlWidget->setExtModelChecked(false);
}
else
{
mControlWidget->setExtModelChecked(true);
}
}
updateWindowTitle();
......@@ -2767,7 +2779,7 @@ void Petrack::importTracker(QString dest) // default = ""
}
mControlWidget->trackNumberAll->setText(QString("%1").arg(mPersonStorage.nbPersons()));
mControlWidget->trackShowOnlyNr->setMaximum(MAX(mPersonStorage.nbPersons(), 1));
mControlWidget->trackShowOnlyNr->setMaximum(static_cast<int>(MAX(mPersonStorage.nbPersons(), 1)));
mControlWidget->trackNumberVisible->setText(
QString("%1").arg(mPersonStorage.visible(mAnimation->getCurrentFrameNum())));
mControlWidget->colorPlot->replot();
......@@ -2897,7 +2909,7 @@ void Petrack::importTracker(QString dest) // default = ""
}
mControlWidget->trackNumberAll->setText(QString("%1").arg(mPersonStorage.nbPersons()));
mControlWidget->trackShowOnlyNr->setMaximum(MAX(mPersonStorage.nbPersons(), 1));
mControlWidget->trackShowOnlyNr->setMaximum(static_cast<int>(MAX(mPersonStorage.nbPersons(), 1)));
mControlWidget->trackNumberVisible->setText(
QString("%1").arg(mPersonStorage.visible(mAnimation->getCurrentFrameNum())));
mControlWidget->colorPlot->replot();
......@@ -3010,7 +3022,8 @@ void Petrack::exportTracker(QString dest) // default = ""
PCritical(this, tr("PeTrack"), tr("Cannot open %1:\n%2.").arg(dest).arg(file.errorString()));
return;
}
QProgressDialog progress("Export TRC-File", nullptr, 0, mPersonStorage.nbPersons() + 1, this->window());
QProgressDialog progress(
"Export TRC-File", nullptr, 0, static_cast<int>(mPersonStorage.nbPersons() + 1), this->window());
progress.setWindowTitle("Export .trc-File");
progress.setWindowModality(Qt::WindowModal);
progress.setVisible(true);
......@@ -3033,7 +3046,7 @@ void Petrack::exportTracker(QString dest) // default = ""
qApp->processEvents();
progress.setLabelText(
QString("Export person %1 of %2 ...").arg(i + 1).arg(mPersonStorage.nbPersons()));
progress.setValue(i + 1);
progress.setValue(static_cast<int>(i + 1));
out << persons[i] << Qt::endl;
}
file.flush();
......@@ -3067,7 +3080,7 @@ void Petrack::exportTracker(QString dest) // default = ""
statusBar()->showMessage(tr("Saved tracking data to %1.").arg(dest), 5000);
}
progress.setValue(mPersonStorage.nbPersons() + 1);
progress.setValue(static_cast<int>(mPersonStorage.nbPersons() + 1));
std::cout << " finished " << std::endl;
mAutosave.resetTrackPersonCounter();
......@@ -3816,7 +3829,7 @@ void Petrack::updateImage(bool imageChanged) // default = false (only true for n
mControlWidget->trackNumberAll->setText(
QString("%1").arg(mPersonStorage.nbPersons())); // kann sich durch reco und tracker aendern
mControlWidget->trackShowOnlyNr->setMaximum(
MAX(mPersonStorage.nbPersons(), 1)); // kann sich durch reco und tracker aendern
static_cast<int>(MAX(mPersonStorage.nbPersons(), 1))); // kann sich durch reco und tracker aendern
mControlWidget->trackNumberVisible->setText(
QString("%1").arg(mPersonStorage.visible(frameNum))); // kann sich durch reco und tracker aendern
......@@ -4025,11 +4038,11 @@ void Petrack::setProFileName(const QString &fileName)
*
* @return All user selected pedestrian (empty for all pedestrians)
*/
QSet<int> Petrack::getPedestrianUserSelection()
QSet<size_t> Petrack::getPedestrianUserSelection()
{
if(mControlWidget->trackShowOnly->checkState() == Qt::Checked)
{
QSet<int> onlyVisible;
QSet<size_t> onlyVisible;
// subtraction needed as in UI ID start at 1 and internally at 0
onlyVisible.insert(mControlWidget->trackShowOnlyNr->value() - 1);
return onlyVisible;
......@@ -4039,7 +4052,7 @@ QSet<int> Petrack::getPedestrianUserSelection()
auto enteredIDs = util::splitStringToInt(mControlWidget->trackShowOnlyNrList->text());
if(enteredIDs.has_value())
{
QSet<int> selectedIDs;
QSet<size_t> selectedIDs;
for(auto id : enteredIDs.value())
{
// subtraction needed as in UI ID start at 1 and internally at 0
......@@ -4053,7 +4066,7 @@ QSet<int> Petrack::getPedestrianUserSelection()
mControlWidget->trackShowOnlyNrList->setStyleSheet("border: 1px solid red");
}
}
return QSet<int>();
return QSet<size_t>();
}
/**
......@@ -4124,14 +4137,14 @@ std::optional<QSet<int>> util::splitStringToInt(const QString &input)
*
* @return all trajectories which should be evaluated; empty when all should be evaluated
*/
QSet<int> Petrack::getPedestriansToTrack()
QSet<size_t> Petrack::getPedestriansToTrack()
{
if(mControlWidget->trackOnlySelected->checkState() == Qt::Checked)