From 8dd1160890e8a396b07dde680c8dcf2e6833f87e Mon Sep 17 00:00:00 2001 From: Julien Michel <julien.michel@c-s.fr> Date: Mon, 18 Jun 2007 16:03:11 +0000 Subject: [PATCH] ImageViewerManager --- ViewerManager/otbImageViewerManager.cxx | 48 +++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 ViewerManager/otbImageViewerManager.cxx diff --git a/ViewerManager/otbImageViewerManager.cxx b/ViewerManager/otbImageViewerManager.cxx new file mode 100644 index 0000000000..0c797c13d6 --- /dev/null +++ b/ViewerManager/otbImageViewerManager.cxx @@ -0,0 +1,48 @@ +/*========================================================================= + +Program: ORFEO Toolbox +Language: C++ +Date: $Date$ +Version: $Revision$ + + +Copyright (c) Centre National d'Etudes Spatiales. All rights reserved. +See OTBCopyright.txt for details. + + +This software is distributed WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "otbImageViewerManager.h" + +int main(int argc, char* argv[]) +{ + try + { + typedef double PixelType; + typedef otb::ImageViewerManager<PixelType> ManagerType; + ManagerType::Pointer manager = ManagerType::New(); + manager->Show(); + + return Fl::run(); + } + catch( itk::ExceptionObject & err ) + { + std::cout << "Following otbException catch :" << std::endl; + std::cout << err << std::endl; + return EXIT_FAILURE; + } + catch( std::bad_alloc & err ) + { + std::cout << "Exception bad_alloc : "<<(char*)err.what()<< std::endl; + return EXIT_FAILURE; + } + catch( ... ) + { + std::cout << "Unknown Exception found !" << std::endl; + return EXIT_FAILURE; + } + return EXIT_SUCCESS; +} -- GitLab