00001
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
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
00033 namespace PanoOperation
00034 {
00038 class PanoOperation
00039 {
00040 public:
00042 virtual bool IsEnabled(PT::Panorama& pano, HuginBase::UIntSet images, GuiLevel guiLevel);
00045 virtual PT::PanoCommand* GetCommand(wxWindow* parent, PT::Panorama& pano, HuginBase::UIntSet images, GuiLevel guiLevel);
00046 virtual wxString GetLabel();
00047 protected:
00049 virtual PT::PanoCommand* GetInternalCommand(wxWindow* parent, PT::Panorama& pano, HuginBase::UIntSet images)=0;
00050 GuiLevel m_guiLevel;
00051 };
00052
00054 class PanoSingleImageOperation : public PanoOperation
00055 {
00056 public:
00058 virtual bool IsEnabled(PT::Panorama& pano, HuginBase::UIntSet images, GuiLevel guiLevel);
00059 };
00060
00062 class PanoMultiImageOperation : public PanoOperation
00063 {
00064 public:
00066 virtual bool IsEnabled(PT::Panorama& pano, HuginBase::UIntSet images, GuiLevel guiLevel);
00067 };
00068
00070 class AddImageOperation : public PanoOperation
00071 {
00072 public:
00073 virtual wxString GetLabel();
00074 protected:
00075 virtual PT::PanoCommand* GetInternalCommand(wxWindow* parent, PT::Panorama& pano, HuginBase::UIntSet images);
00076 };
00077
00079 class AddImagesSeriesOperation : public PanoOperation
00080 {
00081 public:
00082 virtual wxString GetLabel();
00083 protected:
00084 virtual PT::PanoCommand* GetInternalCommand(wxWindow* parent, PT::Panorama& pano, HuginBase::UIntSet images);
00085 };
00086
00088 class RemoveImageOperation : public PanoMultiImageOperation
00089 {
00090 public:
00091 virtual wxString GetLabel();
00092 protected:
00093 virtual PT::PanoCommand* GetInternalCommand(wxWindow* parent, PT::Panorama& pano, HuginBase::UIntSet images);
00094 };
00095
00097 class ChangeAnchorImageOperation : public PanoSingleImageOperation
00098 {
00099 public:
00100 virtual wxString GetLabel();
00101 protected:
00102 virtual PT::PanoCommand* GetInternalCommand(wxWindow* parent, PT::Panorama& pano, HuginBase::UIntSet images);
00103 };
00104
00106 class ChangeColorAnchorImageOperation : public PanoSingleImageOperation
00107 {
00108 public:
00109 virtual wxString GetLabel();
00110 protected:
00111 virtual PT::PanoCommand* GetInternalCommand(wxWindow* parent, PT::Panorama& pano, HuginBase::UIntSet images);
00112 };
00113
00115 class NewLensOperation : public PanoOperation
00116 {
00117 public:
00119 virtual bool IsEnabled(PT::Panorama& pano, HuginBase::UIntSet images, GuiLevel guiLevel);
00120 virtual wxString GetLabel();
00121 protected:
00122 virtual PT::PanoCommand* GetInternalCommand(wxWindow* parent, PT::Panorama& pano, HuginBase::UIntSet images);
00123 };
00124
00126 class ChangeLensOperation : public PanoOperation
00127 {
00128 public:
00130 virtual bool IsEnabled(PT::Panorama& pano, HuginBase::UIntSet images, GuiLevel guiLevel);
00131 virtual wxString GetLabel();
00132 protected:
00133 virtual PT::PanoCommand* GetInternalCommand(wxWindow* parent, PT::Panorama& pano, HuginBase::UIntSet images);
00134 };
00135
00137 class LoadLensOperation : public PanoMultiImageOperation
00138 {
00139 public:
00140 LoadLensOperation(bool fromLensfunDB);
00141 virtual wxString GetLabel();
00142 protected:
00143 virtual PT::PanoCommand* GetInternalCommand(wxWindow* parent, PT::Panorama& pano, HuginBase::UIntSet images);
00144 private:
00145 bool m_fromLensfunDB;
00146 };
00147
00149 class SaveLensOperation : public PanoSingleImageOperation
00150 {
00151 public:
00152 SaveLensOperation(int lensInfo);
00153 virtual wxString GetLabel();
00154 protected:
00155 virtual PT::PanoCommand* GetInternalCommand(wxWindow* parent, PT::Panorama& pano, HuginBase::UIntSet images);
00156 private:
00157 int m_lensInfo;
00158 };
00159
00161 class RemoveControlPointsOperation : public PanoOperation
00162 {
00163 public:
00165 virtual bool IsEnabled(PT::Panorama& pano, HuginBase::UIntSet images, GuiLevel guiLevel);
00166 virtual wxString GetLabel();
00167 protected:
00168 virtual PT::PanoCommand* GetInternalCommand(wxWindow* parent, PT::Panorama& pano, HuginBase::UIntSet images);
00169 };
00170
00172 class CleanControlPointsOperation : public PanoOperation
00173 {
00174 public:
00176 virtual bool IsEnabled(PT::Panorama& pano, HuginBase::UIntSet images, GuiLevel guiLevel);
00177 virtual wxString GetLabel();
00178 protected:
00179 virtual PT::PanoCommand* GetInternalCommand(wxWindow* parent, PT::Panorama& pano, HuginBase::UIntSet images);
00180 };
00181
00183 class ResetOperation : public PanoOperation
00184 {
00185 public:
00186 enum ResetMode
00187 {
00188 RESET_DIALOG=0,
00189 RESET_POSITION,
00190 RESET_TRANSLATION,
00191 RESET_LENS,
00192 RESET_PHOTOMETRICS,
00193 RESET_DIALOG_LENS,
00194 RESET_DIALOG_PHOTOMETRICS,
00195 };
00196 ResetOperation(ResetMode newResetMode);
00198 virtual bool IsEnabled(PT::Panorama& pano, HuginBase::UIntSet images, GuiLevel guiLevel);
00199 virtual wxString GetLabel();
00200 protected:
00201 virtual PT::PanoCommand* GetInternalCommand(wxWindow* parent, PT::Panorama& pano, HuginBase::UIntSet images);
00202 private:
00203 bool ShowDialog(wxWindow* parent);
00204 ResetMode m_resetMode;
00205 bool m_resetPos;
00206 bool m_resetTranslation;
00207 bool m_resetHFOV;
00208 bool m_resetLens;
00209 int m_resetExposure;
00210 bool m_resetVignetting;
00211 bool m_resetColor;
00212 bool m_resetCameraResponse;
00213 };
00214
00216 class CelesteOperation : public CleanControlPointsOperation
00217 {
00218 public:
00219 virtual wxString GetLabel();
00220 protected:
00221 virtual PT::PanoCommand* GetInternalCommand(wxWindow* parent, PT::Panorama& pano, HuginBase::UIntSet images);
00222 };
00223
00225 class NewStackOperation : public PanoOperation
00226 {
00227 public:
00229 virtual bool IsEnabled(PT::Panorama& pano, HuginBase::UIntSet images, GuiLevel guiLevel);
00230 virtual wxString GetLabel();
00231 protected:
00232 virtual PT::PanoCommand* GetInternalCommand(wxWindow* parent, PT::Panorama& pano, HuginBase::UIntSet images);
00233 };
00234
00236 class ChangeStackOperation : public PanoOperation
00237 {
00238 public:
00240 virtual bool IsEnabled(PT::Panorama& pano, HuginBase::UIntSet images, GuiLevel guiLevel);
00241 virtual wxString GetLabel();
00242 protected:
00243 virtual PT::PanoCommand* GetInternalCommand(wxWindow* parent, PT::Panorama& pano, HuginBase::UIntSet images);
00244 };
00245
00247 class AssignStacksOperation : public PanoOperation
00248 {
00249 public:
00251 virtual bool IsEnabled(PT::Panorama& pano, HuginBase::UIntSet images, GuiLevel guiLevel);
00252 virtual wxString GetLabel();
00253 protected:
00254 virtual PT::PanoCommand* GetInternalCommand(wxWindow* parent, PT::Panorama& pano, HuginBase::UIntSet images);
00255 };
00256
00257 typedef std::vector<PanoOperation*> PanoOperationVector;
00258
00260 void GeneratePanoOperationVector();
00262 void CleanPanoOperationVector();
00263
00265 PanoOperationVector* GetImagesOperationVector();
00267 PanoOperationVector* GetLensesOperationVector();
00269 PanoOperationVector* GetStacksOperationVector();
00271 PanoOperationVector* GetControlPointsOperationVector();
00273 PanoOperationVector* GetResetOperationVector();
00274
00275 }
00276 #endif