Example for using the ProjectionGUI
- Author
- MIP
#include <wx/wx.h>
#include <Base/Common/BIASpragma.hh>
#include <Gui/wxProjectionDialog.hh>
#include <Gui/StringConv.hh>
#include <Utils/Param.hh>
#include <iostream>
#include <vector>
#include <string>
using namespace BIAS;
using namespace std;
class MyApp : public wxApp
{
public:
virtual bool OnInit();
};
DECLARE_APP(MyApp)
class MyFrame : public wxFrame
{
public:
MyFrame();
~MyFrame();
void ShowDialog();
};
IMPLEMENT_APP(MyApp)
bool MyApp::OnInit()
{
MyFrame *frame = new MyFrame();
frame->Show(TRUE);
SetTopWindow(frame);
frame->ShowDialog();
return true;
}
MyFrame::MyFrame()
: wxFrame(NULL, -1, _T("ProjectionGUI"), wxDefaultPosition, wxSize(400,600) )
{
if(wxTheApp->argc > 1)
proj.XMLRead(WxToAscii(wxTheApp->argv[1]));
else{
K[0][0]=K[1][1] = 200;
K[0][2]=400;K[1][2]=300;
proj.CreatePerspective (pose,K, 800, 600);
}
}
void MyFrame::ShowDialog()
{
dlg.ShowModal();
dlg.Destroy();
}
MyFrame::~MyFrame()
{
}