Skip to content
Snippets Groups Projects
Commit a867a8be authored by Thomas Feuvrier's avatar Thomas Feuvrier
Browse files

nomsg

parent 8c5ee22c
No related branches found
No related tags found
No related merge requests found
/*=========================================================================
Programme : OTB (ORFEO ToolBox)
Auteurs : CS - T.Feuvrier
Language : C++
Date : 11 janvier 2005
Version :
Role :
$Id$
=========================================================================*/
#include <stdlib.h>
#include "itkExceptionObject.h"
#include "otbImageFileReader.h"
#include "otbImageViewer.h"
int main( int argc, char ** argv )
{
try
{
const char * inputFilename = argv[1];
typedef otb::ImageViewer<unsigned char,double> ViewerType;
ViewerType::Pointer lViewer = ViewerType::New();
typedef ViewerType::ImageType ImageType;
typedef otb::ImageFileReader< ImageType > VolumeReaderType;
VolumeReaderType::Pointer lReader = VolumeReaderType::New();
lReader->SetFileName(inputFilename);
lReader->Update();
std::cout << " GetNumberOfComponentsPerPixel = "<<lReader->GetOutput()->GetNumberOfComponentsPerPixel()<<std::endl;
// lViewer->SetLabel( "Image" );
lViewer->SetImage( lReader->GetOutput() );
// lViewer->SetGrayLevelChannel(1);
lViewer->SetRGBChannels(1,2,3);
// lViewer->SetRedChannel(3);
// lViewer->SetGreenChannel(2);
// lViewer->SetBlueChannel(1);
// lViewer->Update();
lViewer->Show();
Fl::run();
}
catch( itk::ExceptionObject & err )
{
std::cout << "Exception itk::ExceptionObject levee !" << std::endl;
std::cout << err << std::endl;
return EXIT_FAILURE;
}
catch( ... )
{
std::cout << "Exception levee inconnue !" << std::endl;
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment