USGS

Isis 3.0 Application Source Code Reference

Home

catlab.cpp

Go to the documentation of this file.
00001 #include "Isis.h"
00002 
00003 #include <iostream>
00004 
00005 #include "Pvl.h"
00006 
00007 using namespace Isis;
00008 using namespace std;
00009 
00010 
00011 void IsisMain() {
00012 
00013   // Get filename provided by the user
00014   UserInterface &ui = Application::GetUserInterface();
00015   string file = ui.GetFilename("FROM");
00016 
00017   // Extract label from file
00018   Pvl label(file);
00019 
00020   // Output to file if entered
00021   if(ui.WasEntered("TO")) {
00022     label.Write( ui.GetFilename("TO") );
00023   }
00024 
00025   // Print label to the gui log if it is interactive
00026   else if (ui.IsInteractive()) {
00027     Application::GuiLog(label);
00028   }
00029 
00030   // Print label to the screen if it is not
00031   else {
00032     cout << label << endl;
00033   }
00034 
00035 }
00036        
00037