Commit 4b3aa72aaed374b57ad385237ed6e32d1e3cb11e

Authored by David Mayerich
1 parent 4d6d4d8b

throw an error if the ENVI file couldn't be opened

Showing 2 changed files with 4 additions and 1 deletions   Show diff stats
mainwindow.cpp
... ... @@ -17,7 +17,10 @@ void MainWindow::loadImage(QString fileName){
17 17  
18 18 std::string file = fileName.toUtf8().constData();
19 19 //load a dummy hyperspectral image for debugging
20   - hsi.open(file, file + ".hdr");
  20 + if(!hsi.open(file, file + ".hdr")){
  21 + std::cout<<"ERROR opening file "<<file<<std::endl;
  22 + exit(1);
  23 + }
21 24  
22 25 //initialize the size of the main window
23 26 //resize(hsi.header.samples+2, hsi.header.lines + ui->menuBar->size().height());
... ...
win32/hsiview.exe
No preview for this file type