36 #if defined __WXGTK__ && wxCHECK_VERSION(3,1,1)
42 #include <pano13/filter.h>
47 #if defined __WXGTK__ && wxCHECK_VERSION(3,1,1)
48 CheckConfigFilename();
50 wxConfig config(wxT(
"hugin"));
53 cpdetector_config.
Read(&config);
55 cpdetector_config.
Write(&config);
58 if(m_setting<0 || m_setting>=cpdetector_config.
settings.size())
75 parser.AddSwitch(wxT(
"h"),wxT(
"help"),wxT(
"shows this help message"));
76 parser.AddOption(wxT(
"s"),wxT(
"setting"),wxT(
"used setting"),wxCMD_LINE_VAL_NUMBER);
77 parser.AddOption(wxT(
"m"),wxT(
"matches"),wxT(
"number of matches"),wxCMD_LINE_VAL_NUMBER);
78 parser.AddOption(wxT(
"o"),wxT(
"output"),wxT(
"output project"),wxCMD_LINE_VAL_STRING,wxCMD_LINE_OPTION_MANDATORY);
79 parser.AddParam(wxT(
"input.pto"),wxCMD_LINE_VAL_STRING,wxCMD_LINE_OPTION_MANDATORY);
119 std::cerr <<
"could not open script : " << file.GetFullPath().char_str() << std::endl;
124 std::cerr <<
"could not parse script: " << file.GetFullPath().char_str() << std::endl;
137 PT_setProgressFcn(NULL);
138 PT_setInfoDlgFcn(NULL);
143 for(
unsigned i=0;i<cps.size();i++)
150 outputFile.MakeAbsolute();
154 std::cout << std::endl <<
"Written output to " << output << std::endl;
160 IMPLEMENT_APP_CONSOLE(
iCPApp)
void ReadDetectorConfig()
read the CPDetectorConfig from file/registry
void setMemento(const PanoramaMemento &memento)
set the internal state
void Read(wxConfigBase *config=wxConfigBase::Get(), wxString loadFromFile=wxEmptyString)
read the settings of different cp generators from config
virtual HuginBase::CPVector automatch(CPDetectorSetting &setting, HuginBase::Panorama &pano, const HuginBase::UIntSet &imgs, int nFeatures, int &ret_value, wxWindow *parent=NULL)
Do cp matching, calles the right routines, based on the matcher selected.
static int ptinfoDlg(int command, char *argument)
static int ptProgress(int command, char *argument)
CPDetectorSetting m_cpsetting
Base class for control point creators.
std::set< unsigned int > UIntSet
ArraySettings settings
array which stores the different autopano settings
unsigned int addCtrlPoint(const ControlPoint &point)
add a new control point.
std::string getPathPrefix(const std::string &filename)
Get the path to a filename.
bool loadPTScript(std::istream &i, int &ptoVersion, const std::string &prefix="")
load a Hugin file
std::size_t getNrOfImages() const
number of images.
virtual int OnRun()
the main procedure of iCPApp
virtual void OnInitCmdLine(wxCmdLineParser &parser)
set the parameters for the command line parser
Memento class for a Panorama object.
unsigned int GetDefaultGenerator()
return index of default generator (this one is used for assistent)
std::vector< ControlPoint > CPVector
bool WritePTOFile(const std::string &filename, const std::string &prefix="")
write data to given pto file
void fill_set(_Container &c, typename _Container::key_type begin, typename _Container::key_type end)
void Write(wxConfigBase *config=wxConfigBase::Get())
writes the settings of different cp generators to config
#define HUGIN_ASS_NCONTROLPOINTS
class for storing settings of different control point generators
virtual bool OnCmdLineParsed(wxCmdLineParser &parser)
processes the command line parameters