PanoOperation.h

Go to the documentation of this file.
00001 // -*- c-basic-offset: 4 -*-
00008 /*  This is free software; you can redistribute it and/or
00009  *  modify it under the terms of the GNU General Public
00010  *  License as published by the Free Software Foundation; either
00011  *  version 2 of the License, or (at your option) any later version.
00012  *
00013  *  This software is distributed in the hope that it will be useful,
00014  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016  *  Lesser General Public License for more details.
00017  *
00018  *  You should have received a copy of the GNU General Public
00019  *  License along with this software. If not, see
00020  *  <http://www.gnu.org/licenses/>.
00021  *
00022  */
00023 
00024 #ifndef PANOOPERATION_H
00025 #define PANOOPERATION_H
00026 
00027 #include "panoinc_WX.h"
00028 #include "panoinc.h"
00029 #include <vector>
00030 #include "icpfind/CPDetectorConfig.h"
00031 #include "GuiLevel.h"
00032 #include "base_wx/PanoCommand.h"
00033 
00034 namespace PanoOperation
00035 {
00039 class PanoOperation
00040 {
00041 public:
00043     virtual ~PanoOperation() {};
00045     virtual bool IsEnabled(HuginBase::Panorama& pano, HuginBase::UIntSet images, GuiLevel guiLevel);
00048     virtual PanoCommand::PanoCommand* GetCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images, GuiLevel guiLevel);
00049     virtual wxString GetLabel();
00050 protected:
00052     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images)=0;
00053     GuiLevel m_guiLevel;
00054 };
00055 
00057 class PanoSingleImageOperation : public PanoOperation
00058 {
00059 public:
00061     virtual bool IsEnabled(HuginBase::Panorama& pano, HuginBase::UIntSet images, GuiLevel guiLevel);
00062 };
00063 
00065 class PanoMultiImageOperation : public PanoOperation
00066 {
00067 public:
00069     virtual bool IsEnabled(HuginBase::Panorama& pano, HuginBase::UIntSet images, GuiLevel guiLevel);
00070 };
00071 
00073 class AddImageOperation : public PanoOperation
00074 {
00075 public:
00076     virtual wxString GetLabel();
00077 protected:
00078     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00079 };
00080 
00082 class AddImagesSeriesOperation : public PanoOperation
00083 {
00084 public:
00085     virtual wxString GetLabel();
00086 protected:
00087     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00088 };
00089 
00091 class RemoveImageOperation : public PanoMultiImageOperation
00092 {
00093 public:
00094     virtual wxString GetLabel();
00095 protected:
00096     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00097 };
00098 
00100 class ChangeAnchorImageOperation : public PanoSingleImageOperation
00101 {
00102 public:
00103     virtual wxString GetLabel();
00104 protected:
00105     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00106 };
00107 
00109 class ChangeColorAnchorImageOperation : public PanoSingleImageOperation
00110 {
00111 public:
00112     virtual wxString GetLabel();
00113 protected:
00114     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00115 };
00116 
00118 class NewLensOperation : public PanoOperation
00119 {
00120 public:
00122     virtual bool IsEnabled(HuginBase::Panorama& pano, HuginBase::UIntSet images, GuiLevel guiLevel);
00123     virtual wxString GetLabel();
00124 protected:
00125     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00126 };
00127 
00129 class ChangeLensOperation : public PanoOperation
00130 {
00131 public:
00133     virtual bool IsEnabled(HuginBase::Panorama& pano, HuginBase::UIntSet images, GuiLevel guiLevel);
00134     virtual wxString GetLabel();
00135 protected:
00136     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00137 };
00138 
00140 class LoadLensOperation : public PanoMultiImageOperation
00141 {
00142 public:
00143     LoadLensOperation(bool fromDatabase);
00144     virtual wxString GetLabel();
00145 protected:
00146     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00147 private:
00148     bool m_fromDatabase;
00149 };
00150 
00152 class SaveLensOperation : public PanoSingleImageOperation
00153 {
00154 public:
00155     SaveLensOperation(bool toDatabase);
00156     virtual wxString GetLabel();
00157 protected:
00158     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00159 private:
00160     // if true: save to database, false: save to ini
00161     bool m_database;
00162 };
00163 
00165 class RemoveControlPointsOperation : public PanoOperation
00166 {
00167 public:
00169     virtual bool IsEnabled(HuginBase::Panorama& pano, HuginBase::UIntSet images, GuiLevel guiLevel);
00170     virtual wxString GetLabel();
00171 protected:
00172     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00173 };
00174 
00176 class CleanControlPointsOperation : public PanoOperation
00177 {
00178 public:
00180     virtual bool IsEnabled(HuginBase::Panorama& pano, HuginBase::UIntSet images, GuiLevel guiLevel);
00181     virtual wxString GetLabel();
00182 protected:
00183     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00184 };
00185 
00187 class ResetOperation : public PanoOperation
00188 {
00189 public:
00190     enum ResetMode
00191     {
00192         RESET_DIALOG=0,
00193         RESET_POSITION,
00194         RESET_TRANSLATION,
00195         RESET_LENS,
00196         RESET_PHOTOMETRICS,
00197         RESET_DIALOG_LENS,
00198         RESET_DIALOG_PHOTOMETRICS,
00199     };
00200     ResetOperation(ResetMode newResetMode);
00202     virtual bool IsEnabled(HuginBase::Panorama& pano, HuginBase::UIntSet images, GuiLevel guiLevel);
00203     virtual wxString GetLabel();
00204 protected:
00205     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00206 private:
00207     bool ShowDialog(wxWindow* parent);
00208     ResetMode m_resetMode;
00209     bool m_resetPos;
00210     bool m_resetTranslation;
00211     bool m_resetHFOV;
00212     bool m_resetLens;
00213     int m_resetExposure;
00214     bool m_resetVignetting;
00215     int m_resetColor;
00216     bool m_resetCameraResponse;
00217 };
00218 
00220 class CelesteOperation : public CleanControlPointsOperation
00221 {
00222 public:
00223     virtual wxString GetLabel();
00224 protected:
00225     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00226 };
00227 
00229 class NewStackOperation : public PanoOperation
00230 {
00231 public:
00233     virtual bool IsEnabled(HuginBase::Panorama& pano, HuginBase::UIntSet images, GuiLevel guiLevel);
00234     virtual wxString GetLabel();
00235 protected:
00236     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00237 };
00238 
00240 class ChangeStackOperation : public PanoOperation
00241 {
00242 public:
00244     virtual bool IsEnabled(HuginBase::Panorama& pano, HuginBase::UIntSet images, GuiLevel guiLevel);
00245     virtual wxString GetLabel();
00246 protected:
00247     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00248 };
00249 
00251 class AssignStacksOperation : public PanoOperation
00252 {
00253 public:
00255     virtual bool IsEnabled(HuginBase::Panorama& pano, HuginBase::UIntSet images, GuiLevel guiLevel);
00256     virtual wxString GetLabel();
00257 protected:
00258     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00259 };
00260 
00261 typedef std::vector<PanoOperation*> PanoOperationVector;
00262 
00264 void GeneratePanoOperationVector();
00266 void CleanPanoOperationVector();
00267 
00269 PanoOperationVector* GetImagesOperationVector();
00271 PanoOperationVector* GetLensesOperationVector();
00273 PanoOperationVector* GetStacksOperationVector();
00275 PanoOperationVector* GetControlPointsOperationVector();
00277 PanoOperationVector* GetResetOperationVector();
00278 
00279 } //namespace
00280 #endif

Generated on 31 May 2016 for Hugintrunk by  doxygen 1.4.7