66 bool require_draw=
false;
72 for (
unsigned int img = 0; img < imgs; img++)
78 if (new_active !=
active[img])
103 for (std::map<VisualizationState*,bool>::iterator it =
vis_states.begin() ; it !=
vis_states.end() ; ++it) {
123 bool dirty_projection =
false;
125 for (std::map<VisualizationState*,bool>::iterator it =
vis_states.begin() ; it !=
vis_states.end() ; ++it) {
127 if (!(it->second))
continue;
139 for (
unsigned int img = 0; img < imgs; img++)
141 it->first->SetDirtyMesh(img);
144 dirty_projection =
true;
145 it->first->SetDirtyViewport();
146 it->first->ForceRequireRedraw();
152 it->first->SetDirtyViewport();
159 it->first->ForceRequireRedraw();
162 it->first->SetOptions(new_opts);
167 if (dirty_projection)
178 bool dirty_mesh =
false;
179 bool dirty_draw =
false;
191 if (new_img->getFilename() != img->getFilename())
198 if ( new_img->getRoll() != img->getRoll()
199 || new_img->getPitch() != img->getPitch()
200 || new_img->getYaw() != img->getYaw()
201 || new_img->getX() != img->getX()
202 || new_img->getY() != img->getY()
203 || new_img->getZ() != img->getZ()
204 || new_img->getHFOV() != img->getHFOV()
205 || new_img->getProjection() != img->getProjection()
206 || new_img->getShear() != img->getShear()
207 || new_img->getRadialDistortionCenterShift()
208 == img->getRadialDistortionCenterShift()
209 || new_img->getRadialDistortion() != img->getRadialDistortion()
210 || new_img->getCropRect() != img->getCropRect()
217 if (new_img->getHFOV() != img->getHFOV())
223 if ( new_img->getVigCorrMode() != img->getVigCorrMode()
224 || new_img->getRadialVigCorrCoeff() != img->getRadialVigCorrCoeff()
225 || new_img->getRadialVigCorrCenterShift() !=
226 img->getRadialVigCorrCenterShift()
227 || new_img->getExposureValue() != img->getExposureValue()
228 || new_img->getGamma() != img->getGamma()
229 || new_img->getWhiteBalanceRed() != img->getWhiteBalanceRed()
230 || new_img->getWhiteBalanceBlue() != img->getWhiteBalanceBlue()
231 || new_img->getResponseType() != img->getResponseType()
242 if(new_img->getActiveMasks() != img->getActiveMasks())
252 for (std::map<VisualizationState*,bool>::iterator it =
vis_states.begin() ; it !=
vis_states.end() ; ++it) {
253 if (!(it->second))
continue;
254 if (dirty_draw) it->first->ForceRequireRedraw();
255 if (dirty_mesh) it->first->SetDirtyMesh(image_nr);
256 it->first->SetSrcImage(image_nr, new_img);
266 for (std::map<VisualizationState*,bool>::iterator it =
vis_states.begin() ; it !=
vis_states.end() ; ++it) {
267 if (!(it->second))
continue;
268 it->first->ForceRequireRedraw();
348 for (std::map<VisualizationState*,bool>::iterator it =
vis_states.begin() ; it !=
vis_states.end() ; ++it) {
350 if (!(it->second))
continue;
392 if (difference > 1.25)
396 for (
unsigned int img = 0; img < number_of_images; img++)
424 if (number_of_images > image_nr)
499 const double offset = 0.5 /
m_zoom;
501 double offsetx = offset;
502 double offsety = offset;
HuginBase::PanoramaOptions opts
PanosphereOverviewVisualizationState(HuginBase::Panorama *pano, ViewState *view_state, GLViewer *viewer, void(*RefreshFunction)(void *), void *arg)
PanoramaOptions::ProjectionFormat getProjection() const
void SetScale(float scale)
double outputRangeCompression
OutputProjectionInfo * projection_info
void(* RefreshFunc)(void *)
SrcPanoImage getSrcImage(unsigned imgNr) const
get a description of a source image
vigra::Size2D m_canvasSize
void SetOptions(const HuginBase::PanoramaOptions *new_opts)
bool removeObserver(PanoramaObserver *observer)
remove a panorama observer.
std::map< unsigned int, bool > active
OutputProjectionInfo * GetProjectionInfo()
void SetOptions(const HuginBase::PanoramaOptions *new_opts)
~PanosphereOverviewVisualizationState()
void setInsideView(bool insideView)
void setFOV(double newFOV)
void ForceRequireRedraw()
HuginBase::Panorama * m_pano
void setAngX(double angx_in)
void SetCanvasSize(const vigra::Size2D &canvasSize)
include file for the hugin project
void ForceRequireRedraw()
hugin_utils::FDiff2D m_lookAt
void panoramaChanged(HuginBase::Panorama &pano)
Notification about a Panorama change.
MeshManager * m_mesh_manager
HuginBase::PanoramaOptions * GetOptions()
std::set< unsigned int > UIntSet
HuginBase::PanoramaOptions opts
const vigra::Rect2D & getROI() const
OutputProjectionInfo * GetProjectionInfo()
void SetSrcImage(unsigned int image_nr, HuginBase::SrcPanoImage *new_img)
virtual HuginBase::SrcPanoImage * GetSrcImage(unsigned int image_nr)
std::size_t getNrOfImages() const
number of images.
std::map< unsigned int, fbool > dirty_mesh
HuginBase::Panorama * m_pano
virtual OutputProjectionInfo * GetProjectionInfo()
bool RequireRecalculateViewport()
~PlaneOverviewVisualizationState()
HuginBase::PanoramaOptions opts
OutputProjectionInfo * GetProjectionInfo()
void SetViewingCenter(const hugin_utils::FDiff2D ¢er)
void setAngY(double angy_in)
void setHFOV(double h, bool keepView=true)
set the horizontal field of view.
void addObserver(PanoramaObserver *o)
add a panorama observer.
PlaneOverviewVisualizationState(HuginBase::Panorama *pano, ViewState *view_state, GLViewer *viewer, void(*RefreshFunction)(void *), void *arg)
include file for the hugin project
const PanoramaOptions & getOptions() const
returns the options for this panorama
bool RequireRecalculateMesh(unsigned int image_nr)
bool RequireRecalculateMasks(unsigned int image_nr)
const std::vector< double > & getProjectionParameters() const
Get the optional projection parameters.
bool RequireRecalculatePhotometric()
virtual HuginBase::PanoramaOptions * GetOptions()
virtual ~VisualizationState()
void SetOptions(const HuginBase::PanoramaOptions *new_opts)
HuginBase::PanoramaOptions * GetOptions()
TextureManager * m_tex_manager
T simpleClipPoint(const T &point, const T &min, const T &max)
clip a point to fit int [min, max] does not do a mathematical clipping, just sets p...
bool RequireRecalculateImageSizes()
OutputProjectionInfo * projection_info
const SrcPanoImage & getImage(std::size_t nr) const
get a panorama image, counting starts with 0
void panoramaImagesChanged(HuginBase::Panorama &, const HuginBase::UIntSet &)
notifies about changes to images
std::map< unsigned int, fbool > dirty_mask
HuginBase::SrcPanoImage * GetSrcImage(unsigned int image_nr)
All variables of a source image.
void setProjection(ProjectionFormat f)
set the Projection format and adjust the hfov/vfov if nessecary
void SetZoomLevel(const float new_zoom)
unsigned int GetMeshDisplayList(unsigned int image_nr)
vigra::Size2D getSize() const
get size of output image
std::map< VisualizationState *, bool > vis_states
unsigned int number_of_images
A wxWidget to display the fast preview.
std::map< unsigned int, HuginBase::SrcPanoImage > img_states
OutputProjectionInfo * projection_info
unsigned int GetDisplayList(unsigned int image_number) const
HuginBase::PanoramaOptions * GetOptions()
double outputExposureValue
ViewState(HuginBase::Panorama *pano, bool supportMultiTexture)