diff --git a/ViewerManager/otbImageViewerManager.cxx b/ViewerManager/otbImageViewerManager.cxx new file mode 100644 index 0000000000000000000000000000000000000000..0c797c13d6dd91d9bf5cc4d5c69f80eed61c019f --- /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; +}