USGS

Isis 3.0 Developer's Reference (API)

Home

Process.h

Go to the documentation of this file.
00001 #ifndef Process_h
00002 #define Process_h
00003 
00025 #include "Preference.h"
00026 
00027 #include "Cube.h"
00028 #include "Progress.h"
00029 #include "CubeAttribute.h"
00030 #include "Statistics.h"
00031 
00032 namespace Isis {
00033   const int SizeMatch = 1;
00034   const int SpatialMatch = 2;
00035   const int OneBand = 16;
00036   const int BandMatchOrOne = 32;
00037   const int ReadWrite = 64;
00038   const int AllMatchOrOne = 128;
00039 };
00040 
00041 namespace Isis {
00042   class UserInterface;
00043 
00144   class Process {
00145     protected:
00146       Isis::Progress *p_progress;  
00147 
00150       bool p_propagateLabels;
00154       bool p_propagateTables;
00158       bool p_propagatePolygons;
00162       bool p_propagateHistory;
00166       bool p_propagateOriginalLabel;
00167 
00173       std::vector< std::vector< Isis::Statistics * > > p_bandStats;
00174 
00180       std::vector< Isis::Statistics * > p_cubeStats;
00181 
00186       std::vector<Isis::Cube *> InputCubes;
00187 
00192       std::vector<Isis::Cube *> OutputCubes;
00193 
00194     public:
00195       Process();
00196       virtual ~Process();
00197 
00206       void StartProcess(void funct()) {
00207         funct();
00208       };
00209       virtual void EndProcess();
00210 
00211       Isis::Cube *SetInputCube(const std::string &parameter,
00212                                const int requirements = 0);
00213       Isis::Cube *SetInputCube(const std::string &fname,
00214                                const Isis::CubeAttributeInput &att,
00215                                int requirements = 0);
00216       void SetInputCube(Isis::Cube *inCube);
00217       void ClearInputCubes();
00218 
00219       Isis::Cube *SetOutputCube(const std::string &parameter);
00220       Isis::Cube *SetOutputCube(const std::string &parameter, const int nsamps,
00221                                 const int nlines, const int nbands = 1);
00222       Isis::Cube *SetOutputCube(const std::string &fname,
00223                                 const Isis::CubeAttributeOutput &att,
00224                                 const int nsamps, const int nlines,
00225                                 const int nbands = 1);
00226       void ClearOutputCubes();
00227  
00228       void PropagateLabels(const bool prop);
00229       void PropagateLabels(const std::string &cube);
00230       void PropagateTables(const bool prop);
00231       void PropagatePolygons(const bool prop);
00232       void PropagateHistory(const bool prop);
00233       void PropagateOriginalLabel(const bool prop);
00234 
00240       Isis::Progress *Progress() {
00241         return p_progress;
00242       };
00243 
00244       std::string MissionData(const std::string &mission, const std::string &file,
00245                               bool highestVersion = false);
00246 
00247       void WriteHistory(Cube &cube);
00248 
00249       void CalculateStatistics();
00250 
00260       inline std::vector<Isis::Statistics *> BandStatistics(
00261         const unsigned index) {
00262         return p_bandStats[index];
00263       }
00264 
00274       inline Isis::Statistics *CubeStatistics(
00275         const unsigned index) {
00276         return p_cubeStats[index];
00277       }
00278   };
00279 }
00280 
00281 #endif