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 ImageVariablesExpressionOperation : public PanoOperation
00092 {
00093 public:
00094     virtual wxString GetLabel();
00095 protected:
00096     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00097     virtual bool IsEnabled(HuginBase::Panorama& pano, HuginBase::UIntSet images, GuiLevel guiLevel);
00098 };
00099 
00101 class RemoveImageOperation : public PanoMultiImageOperation
00102 {
00103 public:
00104     virtual wxString GetLabel();
00105 protected:
00106     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00107 };
00108 
00110 class ChangeAnchorImageOperation : public PanoSingleImageOperation
00111 {
00112 public:
00113     virtual wxString GetLabel();
00114 protected:
00115     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00116 };
00117 
00119 class ChangeColorAnchorImageOperation : public PanoSingleImageOperation
00120 {
00121 public:
00122     virtual wxString GetLabel();
00123 protected:
00124     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00125 };
00126 
00128 class NewLensOperation : public PanoOperation
00129 {
00130 public:
00132     virtual bool IsEnabled(HuginBase::Panorama& pano, HuginBase::UIntSet images, GuiLevel guiLevel);
00133     virtual wxString GetLabel();
00134 protected:
00135     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00136 };
00137 
00139 class ChangeLensOperation : public PanoOperation
00140 {
00141 public:
00143     virtual bool IsEnabled(HuginBase::Panorama& pano, HuginBase::UIntSet images, GuiLevel guiLevel);
00144     virtual wxString GetLabel();
00145 protected:
00146     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00147 };
00148 
00150 class LoadLensOperation : public PanoMultiImageOperation
00151 {
00152 public:
00153     LoadLensOperation(bool fromDatabase);
00154     virtual wxString GetLabel();
00155 protected:
00156     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00157 private:
00158     bool m_fromDatabase;
00159 };
00160 
00162 class SaveLensOperation : public PanoSingleImageOperation
00163 {
00164 public:
00165     SaveLensOperation(bool toDatabase);
00166     virtual wxString GetLabel();
00167 protected:
00168     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00169 private:
00170     // if true: save to database, false: save to ini
00171     bool m_database;
00172 };
00173 
00175 class RemoveControlPointsOperation : public PanoOperation
00176 {
00177 public:
00179     virtual bool IsEnabled(HuginBase::Panorama& pano, HuginBase::UIntSet images, GuiLevel guiLevel);
00180     virtual wxString GetLabel();
00181 protected:
00182     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00183 };
00184 
00186 class CleanControlPointsOperation : public PanoOperation
00187 {
00188 public:
00190     virtual bool IsEnabled(HuginBase::Panorama& pano, HuginBase::UIntSet images, GuiLevel guiLevel);
00191     virtual wxString GetLabel();
00192 protected:
00193     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00194 };
00195 
00197 class ResetOperation : public PanoOperation
00198 {
00199 public:
00200     enum ResetMode
00201     {
00202         RESET_DIALOG=0,
00203         RESET_POSITION,
00204         RESET_TRANSLATION,
00205         RESET_LENS,
00206         RESET_PHOTOMETRICS,
00207         RESET_DIALOG_LENS,
00208         RESET_DIALOG_PHOTOMETRICS,
00209     };
00210     ResetOperation(ResetMode newResetMode);
00212     virtual bool IsEnabled(HuginBase::Panorama& pano, HuginBase::UIntSet images, GuiLevel guiLevel);
00213     virtual wxString GetLabel();
00214 protected:
00215     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00216 private:
00217     bool ShowDialog(wxWindow* parent);
00218     ResetMode m_resetMode;
00219     bool m_resetPos;
00220     bool m_resetTranslation;
00221     bool m_resetHFOV;
00222     bool m_resetLens;
00223     int m_resetExposure;
00224     bool m_resetVignetting;
00225     int m_resetColor;
00226     bool m_resetCameraResponse;
00227 };
00228 
00230 class CelesteOperation : public CleanControlPointsOperation
00231 {
00232 public:
00233     virtual wxString GetLabel();
00234 protected:
00235     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00236 };
00237 
00239 class NewStackOperation : public PanoOperation
00240 {
00241 public:
00243     virtual bool IsEnabled(HuginBase::Panorama& pano, HuginBase::UIntSet images, GuiLevel guiLevel);
00244     virtual wxString GetLabel();
00245 protected:
00246     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00247 };
00248 
00250 class ChangeStackOperation : public PanoOperation
00251 {
00252 public:
00254     virtual bool IsEnabled(HuginBase::Panorama& pano, HuginBase::UIntSet images, GuiLevel guiLevel);
00255     virtual wxString GetLabel();
00256 protected:
00257     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00258 };
00259 
00261 class AssignStacksOperation : public PanoOperation
00262 {
00263 public:
00265     virtual bool IsEnabled(HuginBase::Panorama& pano, HuginBase::UIntSet images, GuiLevel guiLevel);
00266     virtual wxString GetLabel();
00267 protected:
00268     virtual PanoCommand::PanoCommand* GetInternalCommand(wxWindow* parent, HuginBase::Panorama& pano, HuginBase::UIntSet images);
00269 };
00270 
00271 typedef std::vector<PanoOperation*> PanoOperationVector;
00272 
00274 void GeneratePanoOperationVector();
00276 void CleanPanoOperationVector();
00277 
00279 PanoOperationVector* GetImagesOperationVector();
00281 PanoOperationVector* GetLensesOperationVector();
00283 PanoOperationVector* GetStacksOperationVector();
00285 PanoOperationVector* GetControlPointsOperationVector();
00287 PanoOperationVector* GetResetOperationVector();
00288 
00289 } //namespace
00290 #endif

Generated on 17 Nov 2017 for Hugintrunk by  doxygen 1.4.7