Example for mapping an image with BIAS::CylinderMapping
- Author
- MIP
#include <string>
#include <iostream>
#include <Utils/Param.hh>
#include <Base/Image/ImageIO.hh>
#include <Image/CylinderMapping.hh>
#include <Base/Debug/TimeMeasure.hh>
using namespace BIAS;
using namespace std;
int main(int args, char **arg)
{
param.
AddParamBool(
"help",
"prints info about all parameters",
false,
'h');
std::vector<int> vecMethodIDs;
std::vector<string> vecMethodNames;
vecMethodNames.push_back("bi");
vecMethodNames.push_back("tri");
param.
AddParamEnum(
"method",
"interpolation method (bi, tri)",
vecMethodNames, (int)MapTrilinear, &vecMethodIDs, 'm');
cout << endl;
exit(0);
}
cout << "no input image specified (try --help)" << endl;
return 0;
}
if ( r != 0 ) {
}
cout <<
"image width = " << image.
GetWidth() << endl;
cout <<
"image height = " << image.
GetHeight() << endl;
if (hx > 0) cout << "Setting hx to " << hx << endl;
if (hy > 0) cout << "Setting hy to " << hy << endl;
mapping.
Map(image, target, method);
cout<<
"Time consumed for mapping: "<<1e-3*timer.
GetRealTime()<<
" ms\n";
cout<<"Mapped image written to ExampleCylinderMapping.mip"<<endl;
}