33 #include <Geometry/ProjectionParametersSpherical.hh>
34 #include <Base/Image/Image.hh>
35 #include <Base/Image/ImageIO.hh>
40 int main(
int argc,
char *argv[])
42 int ImgWidth=800, ImgHeight=800;
46 std::vector<double> corrX, corrY;
47 double maxAngle = 180;
49 corrX.push_back(M_PI*maxAngle/90.0);
51 corrY.push_back(M_PI*maxAngle/180.0);
56 std::vector<double> coeffs(4);
66 string fname =
"ProjParSphericalExample01.xml";
73 cerr <<
"error writing "<< fname << endl;
76 cout <<
"XMLWrite wrote "<< fname << endl;
82 cerr <<
"error reading "<< fname << endl;
85 cout <<
"XMLWrite read "<< fname << endl;
88 cout<<
"did not XMLWrite because BIAS_HAVE_XML2 not available."<<endl;
virtual void SetPrincipal(const double x, const double y)
Set principal point (in pixels relative to top left corner).
int XMLRead(const std::string &Filename)
derived classes must implement the function XMLIn which is called by this function XMLRead to read ev...
virtual void SetImageSize(const unsigned int w, const unsigned int h)
Set image dimensions (in pixels).
int XMLWrite(const std::string &Filename, int CompressionLevel=0, bool AutoAddCompressionSuffix=true, std::string encoding="UTF-8") const
call this to add the class to a new xml tree and write it to the file Filename.