// This example displays two images in a deck. // Images are loaded from the two filenames // on the command line. #include #ifdef _MSC_VER # include "vcl_msvc_warnings.h" #endif #include "vil/vil_load.h" #include "vil/vil_resample_bilin.h" //cvg includes #include //vgui includes #include "vgui/vgui.h" #include "vgui/vgui_image_tableau.h" #include "vgui/vgui_viewer2D_tableau.h" #include "vgui/vgui_shell_tableau.h" //executable args #include "vul/vul_arg.h" int main(int argc, char **argv) { //init vgui (should choose/determine toolkit) vgui::init(argc, argv); vul_arg imgdir("-img", "image directory", ""); vul_arg_parse(argc, argv); //read sphere vsph_view_sphere > isphere; std::string sphere_path = imgdir() + "/sphere.bin"; vsl_b_ifstream sphere_os(sphere_path); if (!sphere_os) { std::cout<<"cannot open "<second.metadata(); std::cout<<"first_img "<<(*first_img)<c_str()); if ( !im ) { std::cerr << "Could not load " << first_img->c_str() << '\n'; return 1; } //scale your image... //get first one and put it in image vil_image_view_base_sptr first = im->get_view(); double min_scale = std::pow(PYRAMID_SCALE, PYRAMID_MAX_LEVEL); std::cout<<"Min scale: "<ni()); int snj = (int) (min_scale * first->nj()); std::cout<<"Min size = "<* firstb = static_cast* >(first.ptr()); vil_image_view* scaled = new vil_image_view(sni, snj); vil_resample_bilin(*firstb, *scaled, sni, snj); // Load image (given in the first command line param) into an image tableau. cvg_hemisphere_tableau_new image(*first, isphere); // Put the image tableau inside a 2D viewer tableau (for zoom, etc). vgui_viewer2D_tableau_new viewer(image); // Put a shell tableau at the top of our tableau tree. vgui_shell_tableau_new shell(viewer); // Create a window, add the tableau and show it on screen. return vgui::run(shell, sni, snj); }