Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CPDetectorConfig.h
Go to the documentation of this file.
1 // -*- c-basic-offset: 4 -*-
11  /* This is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public
13  * License as published by the Free Software Foundation; either
14  * version 2 of the License, or (at your option) any later version.
15  *
16  * This software is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  * Lesser General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public
22  * License along with this software. If not, see
23  * <http://www.gnu.org/licenses/>.
24  *
25  */
26 
27 #ifndef _CPDETECTORCONFIG_H
28 #define _CPDETECTORCONFIG_H
29 
30 #include <hugin_shared.h>
31 #include "panoinc.h"
32 #include "panoinc_WX.h"
33 
34 #include <wx/dynarray.h>
35 
37 {
44 };
45 
48 {
49 public:
53  virtual ~CPDetectorSetting() {};
56  bool Read(wxConfigBase* config, wxString path);
58  void Write(wxConfigBase* config, wxString path);
60  const wxString GetCPDetectorDesc() {return desc; };
62  void SetCPDetectorDesc(wxString new_desc) { desc=new_desc; };
64  const CPDetectorType GetType() {return type; };
66  void SetType(CPDetectorType new_type) { type=new_type;};
68  const wxString GetProg() {return prog; };
70  void SetProg(wxString new_prog) { prog=new_prog; };
72  const wxString GetArgs() {return args; };
74  void SetArgs(wxString new_args) { args=new_args; };
76  const wxString GetArgsCleanup() {return args_cleanup; };
78  void SetArgsCleanup(wxString new_args) { args_cleanup=new_args; };
80  const wxString GetProgMatcher() {return prog_matcher; };
82  void SetProgMatcher(wxString new_prog) { prog_matcher=new_prog; };
84  const wxString GetArgsMatcher() {return args_matcher; };
86  void SetArgsMatcher(wxString new_args) { args_matcher=new_args; };
88  const wxString GetProgStack() {return prog_stack; };
90  void SetProgStack(wxString new_prog) { prog_stack=new_prog; };
92  const wxString GetArgsStack() {return args_stack; };
94  void SetArgsStack(wxString new_args) { args_stack=new_args; };
96  const bool GetOption() { return option; }
98  void SetOption(bool new_option) { option=new_option; };
100  const bool IsTwoStepDetector() { return !prog_matcher.IsEmpty(); };
102  static const bool IsCleanupPossible(CPDetectorType _type);
103  const bool IsCleanupPossible() { return IsCleanupPossible(type); };
105  static const bool ContainsStacks(CPDetectorType _type);
106  const bool ContainsStacks() { return ContainsStacks(type); };
107 private:
108  void CheckValues();
110  wxString desc;
111  wxString prog;
112  wxString args;
113  wxString args_cleanup;
114  wxString prog_matcher;
115  wxString args_matcher;
116  wxString prog_stack;
117  wxString args_stack;
118  bool option;
119 };
120 
121 #if defined _WIN32 && defined Hugin_shared
122 WX_DECLARE_USER_EXPORTED_OBJARRAY(CPDetectorSetting,ArraySettings,ICPIMPEX);
123 #else
125 #endif
126 
129 {
130 public:
134  virtual ~CPDetectorConfig() {};
139  void Read(wxConfigBase* config=wxConfigBase::Get(),wxString loadFromFile=wxEmptyString);
141  void Write(wxConfigBase* config=wxConfigBase::Get());
143  void ReadFromFile(wxString filename);
145  void WriteToFile(wxString filename);
147  void ResetToDefault();
152  void FillControl(wxControlWithItems *control, bool select_default = false, bool show_default = false);
154  unsigned int GetCount() { return settings.GetCount(); };
156  void Swap(int index);
158  unsigned int GetDefaultGenerator() { return default_generator; };
160  void SetDefaultGenerator(unsigned int new_default_generator);
162  ArraySettings settings;
163 private:
164  unsigned int default_generator;
165  void ReadIndex(wxConfigBase* config, int i);
166  void WriteIndex(wxConfigBase* config, int i);
167 };
168 
169 #endif
virtual ~CPDetectorSetting()
destructor
const bool IsCleanupPossible()
const wxString GetCPDetectorDesc()
return description of this setting
const CPDetectorType GetType()
return type of this setting
#define ICPIMPEX
Definition: hugin_shared.h:42
CPDetectorType
void SetType(CPDetectorType new_type)
sets type of this setting
unsigned int GetCount()
return counts of cp detector settings
unsigned int default_generator
void SetArgs(wxString new_args)
sets arguments of one step detector or feature descriptor
include file for the hugin project
void SetProgStack(wxString new_prog)
sets program for detecting cp in stacks
ArraySettings settings
array which stores the different autopano settings
const wxString GetProgMatcher()
return program for feature matcher
void SetArgsMatcher(wxString new_args)
sets arguments for feature matcher
virtual ~CPDetectorConfig()
destructor
class, which stores all settings of one cp detector
const wxString GetArgsMatcher()
return arguments for feature matcher
void SetProg(wxString new_prog)
sets program for one step detector or feature descriptor
CPDetectorConfig()
constructor
const wxString GetArgs()
return arguments of one step detector or feature descriptor
WX_DECLARE_OBJARRAY(wxTreeListColumnInfo, wxArrayTreeListColumnInfo)
const wxString GetArgsCleanup()
return arguments for the cleanup step
const wxString GetProgStack()
return program name, which works on stacks
void SetArgsCleanup(wxString new_args)
sets arguments for the cleanup step
const wxString GetArgsStack()
return arguments of program for detection of cp in stacks
const bool GetOption()
gets options, used in multi-row and prealigned cp detectors
void SetCPDetectorDesc(wxString new_desc)
sets description of this setting
void SetProgMatcher(wxString new_prog)
sets program for feature matcher
const bool IsTwoStepDetector()
returns true, if setting is suitable for two step detector otherwise false
include file for the hugin project
unsigned int GetDefaultGenerator()
return index of default generator (this one is used for assistent)
void SetArgsStack(wxString new_args)
sets arguments of program for detection of cp in stacks
void SetOption(bool new_option)
set options, used in multi-row cp and prealigned detectors
class for storing settings of different control point generators
const bool ContainsStacks()
CPDetectorType type
const wxString GetProg()
return program for one step detector or feature descriptor