Skip to content
Snippets Groups Projects
Commit bf6a6be0 authored by Julien Michel's avatar Julien Michel
Browse files

ENH: Adding image filename command-line option

parent 2de7db6d
No related branches found
No related tags found
No related merge requests found
......@@ -32,6 +32,7 @@
// Monteverdi includes (sorted by alphabetic order)
#include "mvdApplication.h"
#include "mvdMainWindow.h"
#include "mvdDatasetModel.h"
//
// OTB includes (sorted by alphabetic order)
......@@ -53,6 +54,26 @@ main( int argc, char* argv[] )
mvd::MainWindow mainWindow;
mainWindow.show();
// Handle passing image filename from command-line
if(argc>1)
{
try
{
// TODO: Replace with complex model (list of DatasetModel) when implemented.
mvd::DatasetModel* model = mvd::Application::LoadDatasetModel(
argv[1],
// TODO: Remove width and height from dataset model loading.
mainWindow.centralWidget()->width(),
mainWindow.centralWidget()->height());
mvd::Application::Instance()->SetModel( model );
}
catch( std::exception& exc )
{
// TODO: Report something usefull here
}
}
return application.exec();
}
......
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