Improve batch mode with Locallab

Batch mode is now correctly managed by Locallab. It works only if the
pictures have the same control spot number with coherent id

Other improvements:
- If there is no control spot, all Locallab tools are now disabled
This commit is contained in:
Pandagrapher
2018-12-26 10:31:57 +01:00
parent 23b0836603
commit 39c53119eb
16 changed files with 2190 additions and 1394 deletions

View File

@@ -1030,54 +1030,6 @@ struct LocallabParams {
bool operator ==(const LocallabParams& other) const;
bool operator !=(const LocallabParams& other) const;
template <typename T>
bool compareSpotsByElem(const std::vector<LocallabSpot>& other, T LocallabSpot::*elem) const
{
if (spots.size() != other.size()) {
return false;
}
for (int i = 0; i < (int)spots.size(); i++) {
if (spots.at(i).*elem != other.at(i).*elem) {
return false;
}
}
return true;
}
template <typename T>
bool compareSpotsByElemArray(const std::vector<LocallabSpot>& other, T LocallabSpot::*elem, int index) const
{
if (spots.size() != other.size()) {
return false;
}
for (int i = 0; i < (int)spots.size(); i++) {
if ((spots.at(i).*elem)[index] != (other.at(i).*elem)[index]) {
return false;
}
}
return true;
}
template <typename T>
void setSpotsByElem(const std::vector<LocallabSpot>& other, T LocallabSpot::*elem)
{
for (int i = 0; i < (int)spots.size() && i < (int)other.size(); i++) {
spots.at(i).*elem = other.at(i).*elem;
}
}
template <typename T>
void setSpotsByElemArray(const std::vector<LocallabSpot>& other, T LocallabSpot::*elem, int index)
{
for (int i = 0; i < (int)spots.size() && i < (int)other.size(); i++) {
(spots.at(i).*elem)[index] = (other.at(i).*elem)[index];
}
}
};
/**