Hugin trunk 0.1
Loading...
Searching...
No Matches
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
45
48{
49public:
53 virtual ~CPDetectorSetting() {};
56 bool Read(wxConfigBase* config, wxString path);
58 void Write(wxConfigBase* config, wxString path);
60 const wxString GetCPDetectorDesc() {return desc; };
64 const CPDetectorType GetType() {return type; };
68 const wxString GetProg() {return prog; };
72 const wxString GetArgs() {return 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); };
107private:
108 void CheckValues();
118 bool option;
119};
120
121#if defined _WIN32 && defined Hugin_shared
123#else
125#endif
126
129{
130public:
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);
163private:
164 unsigned int default_generator;
165 void ReadIndex(wxConfigBase* config, int i);
166 void WriteIndex(wxConfigBase* config, int i);
167};
168
169#endif
CPDetectorType
@ CPDetector_AutoPanoSiftMultiRow
@ CPDetector_AutoPanoSiftStack
@ CPDetector_AutoPanoSiftMultiRowStack
@ CPDetector_AutoPanoSift
@ CPDetector_AutoPanoSiftPreAlign
@ CPDetector_AutoPano
WX_DECLARE_OBJARRAY(CPDetectorSetting, ArraySettings)
class for storing settings of different control point generators
CPDetectorConfig()
constructor
unsigned int GetCount()
return counts of cp detector settings
unsigned int default_generator
unsigned int GetDefaultGenerator()
return index of default generator (this one is used for assistent)
ArraySettings settings
array which stores the different autopano settings
virtual ~CPDetectorConfig()
destructor
class, which stores all settings of one cp detector
const wxString GetProg()
return program for one step detector or feature descriptor
const bool GetOption()
gets options, used in multi-row and prealigned cp detectors
void SetArgsStack(wxString new_args)
sets arguments of program for detection of cp in stacks
const CPDetectorType GetType()
return type of this setting
void SetArgsCleanup(wxString new_args)
sets arguments for the cleanup step
void SetCPDetectorDesc(wxString new_desc)
sets description of this setting
const bool IsCleanupPossible()
const wxString GetProgMatcher()
return program for feature matcher
const wxString GetCPDetectorDesc()
return description of this setting
virtual ~CPDetectorSetting()
destructor
void SetArgs(wxString new_args)
sets arguments of one step detector or feature descriptor
void SetOption(bool new_option)
set options, used in multi-row cp and prealigned detectors
const wxString GetProgStack()
return program name, which works on stacks
void SetProgMatcher(wxString new_prog)
sets program for feature matcher
CPDetectorType type
void SetArgsMatcher(wxString new_args)
sets arguments for feature matcher
void SetProg(wxString new_prog)
sets program for one step detector or feature descriptor
const wxString GetArgsCleanup()
return arguments for the cleanup step
const wxString GetArgsMatcher()
return arguments for feature matcher
const wxString GetArgs()
return arguments of one step detector or feature descriptor
void SetProgStack(wxString new_prog)
sets program for detecting cp in stacks
const bool IsTwoStepDetector()
returns true, if setting is suitable for two step detector otherwise false
const bool ContainsStacks()
void SetType(CPDetectorType new_type)
sets type of this setting
const wxString GetArgsStack()
return arguments of program for detection of cp in stacks
#define ICPIMPEX
include file for the hugin project
include file for the hugin project
std::vector< deghosting::BImagePtr > threshold(const std::vector< deghosting::FImagePtr > &inputImages, const double threshold, const uint16_t flags)
Threshold function used for creating alpha masks for images.
Definition threshold.h:41