Isis 3.0 Application Source Code Reference |
Home |
00001 //************************************************************************ 00002 // See Full documentation in raw2isis.xml 00003 //************************************************************************ 00004 #include "Isis.h" 00005 #include "ProcessImport.h" 00006 00007 #include "UserInterface.h" 00008 #include "Filename.h" 00009 00010 using namespace std; 00011 using namespace Isis; 00012 00013 // Line-by-Line from raw file 00014 void raw2isis(Buffer &out); 00015 00016 void IsisMain() { 00017 ProcessImport p; 00018 00019 UserInterface &ui = Application::GetUserInterface(); 00020 p.SetDimensions(ui.GetInteger("SAMPLES"), ui.GetInteger("LINES"), 00021 ui.GetInteger("BANDS")); 00022 p.SetFileHeaderBytes(ui.GetInteger("SKIP")); 00023 p.SetPixelType(PixelTypeEnumeration(ui.GetString("BITTYPE"))); 00024 p.SetByteOrder(ByteOrderEnumeration(ui.GetString("BYTEORDER"))); 00025 p.SetInputFile(ui.GetFilename("FROM")); 00026 p.SetOutputCube("TO"); 00027 00028 if(ui.GetBoolean("SETNULLRANGE")) { 00029 p.SetNull(ui.GetDouble("NULLMIN"), ui.GetDouble("NULLMAX")); 00030 } 00031 if(ui.GetBoolean("SETHRSRANGE")) { 00032 p.SetHRS(ui.GetDouble("HRSMIN"), ui.GetDouble("HRSMAX")); 00033 } 00034 if(ui.GetBoolean("SETLRSRANGE")) { 00035 p.SetLRS(ui.GetDouble("LRSMIN"), ui.GetDouble("LRSMAX")); 00036 } 00037 00038 p.StartProcess(); 00039 p.EndProcess(); 00040 00041 return; 00042 } 00043