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 bool IsEnabled(HuginBase::Panorama& pano, HuginBase::UIntSet images, GuiLevel guiLevel);
00046     virtual PanoCommand::PanoCommand* GetCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images, GuiLevel guiLevel);
00047     virtual wxString GetLabel();
00048 protected:
00050     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images)=0;
00051     GuiLevel m_guiLevel;
00052 };
00053 
00055 class PanoSingleImageOperation : public PanoOperation
00056 {
00057 public:
00059     virtual bool IsEnabled(HuginBase::Panorama& pano, HuginBase::UIntSet images, GuiLevel guiLevel);
00060 };
00061 
00063 class PanoMultiImageOperation : public PanoOperation
00064 {
00065 public:
00067     virtual bool IsEnabled(HuginBase::Panorama& pano, HuginBase::UIntSet images, GuiLevel guiLevel);
00068 };
00069 
00071 class AddImageOperation : public PanoOperation
00072 {
00073 public:
00074     virtual wxString GetLabel();
00075 protected:
00076     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00077 };
00078 
00080 class AddImagesSeriesOperation : public PanoOperation
00081 {
00082 public:
00083     virtual wxString GetLabel();
00084 protected:
00085     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00086 };
00087 
00089 class RemoveImageOperation : public PanoMultiImageOperation
00090 {
00091 public:
00092     virtual wxString GetLabel();
00093 protected:
00094     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00095 };
00096 
00098 class ChangeAnchorImageOperation : public PanoSingleImageOperation
00099 {
00100 public:
00101     virtual wxString GetLabel();
00102 protected:
00103     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00104 };
00105 
00107 class ChangeColorAnchorImageOperation : public PanoSingleImageOperation
00108 {
00109 public:
00110     virtual wxString GetLabel();
00111 protected:
00112     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00113 };
00114 
00116 class NewLensOperation : public PanoOperation
00117 {
00118 public:
00120     virtual bool IsEnabled(HuginBase::Panorama& pano, HuginBase::UIntSet images, GuiLevel guiLevel);
00121     virtual wxString GetLabel();
00122 protected:
00123     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00124 };
00125 
00127 class ChangeLensOperation : public PanoOperation
00128 {
00129 public:
00131     virtual bool IsEnabled(HuginBase::Panorama& pano, HuginBase::UIntSet images, GuiLevel guiLevel);
00132     virtual wxString GetLabel();
00133 protected:
00134     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00135 };
00136 
00138 class LoadLensOperation : public PanoMultiImageOperation
00139 {
00140 public:
00141     LoadLensOperation(bool fromDatabase);
00142     virtual wxString GetLabel();
00143 protected:
00144     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00145 private:
00146     bool m_fromDatabase;
00147 };
00148 
00150 class SaveLensOperation : public PanoSingleImageOperation
00151 {
00152 public:
00153     SaveLensOperation(bool toDatabase);
00154     virtual wxString GetLabel();
00155 protected:
00156     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00157 private:
00158     // if true: save to database, false: save to ini
00159     bool m_database;
00160 };
00161 
00163 class RemoveControlPointsOperation : public PanoOperation
00164 {
00165 public:
00167     virtual bool IsEnabled(HuginBase::Panorama& pano, HuginBase::UIntSet images, GuiLevel guiLevel);
00168     virtual wxString GetLabel();
00169 protected:
00170     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00171 };
00172 
00174 class CleanControlPointsOperation : public PanoOperation
00175 {
00176 public:
00178     virtual bool IsEnabled(HuginBase::Panorama& pano, HuginBase::UIntSet images, GuiLevel guiLevel);
00179     virtual wxString GetLabel();
00180 protected:
00181     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00182 };
00183 
00185 class ResetOperation : public PanoOperation
00186 {
00187 public:
00188     enum ResetMode
00189     {
00190         RESET_DIALOG=0,
00191         RESET_POSITION,
00192         RESET_TRANSLATION,
00193         RESET_LENS,
00194         RESET_PHOTOMETRICS,
00195         RESET_DIALOG_LENS,
00196         RESET_DIALOG_PHOTOMETRICS,
00197     };
00198     ResetOperation(ResetMode newResetMode);
00200     virtual bool IsEnabled(HuginBase::Panorama& pano, HuginBase::UIntSet images, GuiLevel guiLevel);
00201     virtual wxString GetLabel();
00202 protected:
00203     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00204 private:
00205     bool ShowDialog(wxWindow* parent);
00206     ResetMode m_resetMode;
00207     bool m_resetPos;
00208     bool m_resetTranslation;
00209     bool m_resetHFOV;
00210     bool m_resetLens;
00211     int m_resetExposure;
00212     bool m_resetVignetting;
00213     int m_resetColor;
00214     bool m_resetCameraResponse;
00215 };
00216 
00218 class CelesteOperation : public CleanControlPointsOperation
00219 {
00220 public:
00221     virtual wxString GetLabel();
00222 protected:
00223     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00224 };
00225 
00227 class NewStackOperation : public PanoOperation
00228 {
00229 public:
00231     virtual bool IsEnabled(HuginBase::Panorama& pano, HuginBase::UIntSet images, GuiLevel guiLevel);
00232     virtual wxString GetLabel();
00233 protected:
00234     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00235 };
00236 
00238 class ChangeStackOperation : public PanoOperation
00239 {
00240 public:
00242     virtual bool IsEnabled(HuginBase::Panorama& pano, HuginBase::UIntSet images, GuiLevel guiLevel);
00243     virtual wxString GetLabel();
00244 protected:
00245     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00246 };
00247 
00249 class AssignStacksOperation : public PanoOperation
00250 {
00251 public:
00253     virtual bool IsEnabled(HuginBase::Panorama& pano, HuginBase::UIntSet images, GuiLevel guiLevel);
00254     virtual wxString GetLabel();
00255 protected:
00256     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00257 };
00258 
00259 typedef std::vector<PanoOperation*> PanoOperationVector;
00260 
00262 void GeneratePanoOperationVector();
00264 void CleanPanoOperationVector();
00265 
00267 PanoOperationVector* GetImagesOperationVector();
00269 PanoOperationVector* GetLensesOperationVector();
00271 PanoOperationVector* GetStacksOperationVector();
00273 PanoOperationVector* GetControlPointsOperationVector();
00275 PanoOperationVector* GetResetOperationVector();
00276 
00277 } //namespace
00278 #endif

Generated on 31 Jul 2015 for Hugintrunk by  doxygen 1.4.7