small example demonstrating the ProjectionParametersSpherical
- Author
- ischiller 10/2009
#include <Geometry/ProjectionParametersSpherical.hh>
#include <Base/Image/Image.hh>
#include <Base/Image/ImageIO.hh>
using namespace BIAS;
using namespace std;
int main(int argc, char *argv[])
{
int ImgWidth=800, ImgHeight=800;
std::vector<double> corrX, corrY;
double maxAngle = 180;
corrX.push_back(0.0);
corrX.push_back(M_PI*maxAngle/90.0);
corrY.push_back(0.0);
corrY.push_back(M_PI*maxAngle/180.0);
std::vector<double> coeffs(4);
coeffs[0] = 1.0;
coeffs[1] = 0.0;
coeffs[2] = 0.0;
coeffs[3] = 0.0;
#ifdef BIAS_HAVE_XML2
string fname = "ProjParSphericalExample01.xml";
if (res!=0)
{
cerr << "error writing "<< fname << endl;
return -3;
}
cout << "XMLWrite wrote "<< fname << endl;
if (res!=0)
{
cerr << "error reading "<< fname << endl;
return -3;
}
cout << "XMLWrite read "<< fname << endl;
cout<<pps<<endl;
#else
cout<<"did not XMLWrite because BIAS_HAVE_XML2 not available."<<endl;
#endif
return 0;
}