Hugin trunk 0.1
Loading...
Searching...
No Matches
TranslatePanorama.cpp
Go to the documentation of this file.
1// -*- c-basic-offset: 4 -*-
22#include "TranslatePanorama.h"
23
24
25namespace HuginBase {
26
28void TranslatePanorama::translatePano(PanoramaData& panorama, const double x, const double y, const double z)
29{
30
31 for (unsigned int i = 0; i < panorama.getNrOfImages(); i++)
32 {
33 const SrcPanoImage & image = panorama.getImage(i);
34 double ix = image.getX();
35 double iy = image.getY();
36 double iz = image.getZ();
37
38 // Don't update a variable linked to a variable we already updated.
39 SrcPanoImage copy = image;
40 #define conditional_set(variable, value) \
41 if (image.variable##isLinked())\
42 {\
43 unsigned int j = 0;\
44 while (j < i && !image.variable##isLinkedWith(panorama.getImage(j)))\
45 {\
46 j++;\
47 }\
48 if (j == i) copy.set##variable(value);\
49 } else {\
50 copy.set##variable(value);\
51 }
55
56 panorama.setImage(i, copy);
57 panorama.imageChanged(i);
58 }
59}
60
61
62} //namespace
#define conditional_set(variable, value)
Model for a panorama.
All variables of a source image.
static void translatePano(PanoramaData &panorama, const double x, const double y, const double z)
double Z
double X
double Y
mainly consists of wrapper around the pano tools library, to assist in ressource management and to pr...
Definition wxcms.cpp:39
std::vector< deghosting::BImagePtr > threshold(const std::vector< deghosting::FImagePtr > &inputImages, const double threshold, const uint16_t flags)
Threshold function used for creating alpha masks for images.
Definition threshold.h:41