example for using the pyramid images
- Author
- MIP
#include <Base/Debug/Debug.hh>
#include <Base/Image/ImageConvert.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Debug/TimeMeasure.hh>
#include <Image/PyramidImage.hh>
#include <Utils/Param.hh>
using namespace BIAS;
using namespace std;
int main(int argc, char *argv[])
{
param.
AddParamBool(
"help",
"prints info about all parameters",
false,
'h');
param.
AddParamInt(
"size",
"pyramid size", 4, 1, 256,
's');
param.
AddParamDouble(
"factor",
"resampling factor per step", 2.0, 1.0, 1e6,
'f');
cout << endl;
exit(0);
}
if (imageName.empty()) {
cout << "no input image specified (try --help)" << endl;
return 0;
}
if (res != 0) {
BIASERR("error loading image " << imageName);
return -1;
} else {
cout << "loaded image " << imageName << endl;
}
}
*pyramid[0] = image;
cout <<
"calculation of pyramid image with size " << pyramid.
size()
<<
" for image with size " << image.
GetWidth() <<
"x"
<< " ms" << endl;
if (!outputPrefix.empty())
{
if (res != 0) {
BIASERR("error writing pyramid image " << outputPrefix);
} else {
cout << "saved pyramid image to " << outputPrefix << "-pl*.mip" << endl;
}
} else {
cout << "use --output to save output images to disk" << endl;
}
return 0;
}