USGS

Isis 3.0 Developer's Reference (API)

Home

ProcessMosaic.h

Go to the documentation of this file.
00001 #ifndef ProcessMosaic_h
00002 #define ProcessMosaic_h
00003 
00025 #include "Process.h"
00026 #include "Buffer.h"
00027 #include "Portal.h"
00032 enum BandCriteria {
00033   Lesser, Greater
00034 };
00038 enum FileType {
00039   inFile, outFile
00040 };
00041 
00042 namespace Isis {
00043 
00047 #define SRC_IMAGE_TBL  "InputImages"
00048 #define FLOAT_MAX      16777216       
00049 #define FLOAT_MIN      -16777215      
00050 
00051 
00188   class ProcessMosaic : public Isis::Process {
00189 
00190     public:
00191 
00197       typedef struct {
00198         bool bTrack;   
00199         bool bCreate;  
00200         int  iBandNum; 
00201         std::string  sKeyName;  
00202         std::string  sKeyValue; 
00203         BandCriteria eCriteria; 
00204         int  iInBand;  
00205         int  iOutBand; 
00206       }MosaicOptions;
00207 
00212       enum MosaicPriority {
00213         input,  
00214         mosaic, 
00215         band,   
00216         average 
00217       };
00218 
00220       ProcessMosaic();
00221 
00223       ~ProcessMosaic();
00224 
00226       void StartProcess(const int &piOutSample, const int &piOutLine, const int &piOutBand);
00227 
00230       Isis::Cube *SetInputCube(const std::string &parameter,
00231                                const int ss = 1, const int sl = 1,
00232                                const int sb = 1,
00233                                const int ns = 0, const int nl = 0,
00234                                const int nb = 0);
00235 
00238       Isis::Cube *SetInputCube(const std::string &fname,
00239                                Isis::CubeAttributeInput &att,
00240                                const int ss = 1, const int sl = 1,
00241                                const int sb = 1,
00242                                const int ns = 0, const int nl = 0,
00243                                const int nb = 0);
00244 
00246       Isis::Cube *SetOutputCube(const std::string &psParameter);
00247 
00255       void SetBandBinMatch(bool pbFlag) {
00256         mbBandbinMatch = pbFlag;
00257       };
00258 
00263       void SetMosaicOrigin(int &piIndex);
00264 
00266       int GetIndexOffsetByPixelType(void);
00267 
00269       void ResetOriginBand(void);
00270 
00273       void BandComparison(int piIndex, int piIns, int piInl, int piIss, 
00274                           int piIsl, int piOss, int piOsl);
00275 
00277       int GetOriginDefaultByPixelType(void);
00278 
00280       int GetBandIndex(const FileType &peFileType);
00281 
00283       bool GetTrackStatus(void);
00284 
00292       MosaicPriority GetPriority(void){
00293         return mePriority;
00294       };
00295       
00297       void AddBandBinGroup(int piIsb, int piOsb);
00298 
00300       void AddDefaultBandBinGroup(void);
00301 
00303       void MatchBandBinGroup(const int piIsb, const int piOsb, int &piInb);
00304       
00306       bool ProcessAveragePriority(int piPixel, Portal& pInPortal, Portal& pOutPortal, Portal& pOrigPortal);
00307 
00309       void ResetCountBands(void);
00323        void SetHighSaturationFlag(bool pbFlag) {
00324          mbHighSat = pbFlag;
00325        } ;
00326        
00334        void SetLowSaturationFlag(bool pbFlag) {
00335          mbLowSat  = pbFlag;
00336        } ;
00337        
00345        void SetNullFlag(bool pbFlag) {
00346          mbNull    = pbFlag;
00347        } ;
00348        
00356        bool GetHighSaturationFlag(void) {
00357          return mbHighSat;
00358        } ;
00359 
00367        bool GetLowSaturationFlag(void) {
00368          return mbLowSat;
00369        };
00370        
00378        bool GetNullFlag(void) {
00379          return mbNull;
00380        };
00381 
00389       void SetPriority(MosaicPriority pePriority) {
00390         mePriority = pePriority;
00391       };
00392 
00400       void SetMatchDEM(bool pbMatchDEM) {
00401         mbMatchDEM = pbMatchDEM;
00402       }
00403       
00405       void MatchDEMShapeModel(void);
00406       
00414       void SetTrackFlag(bool pbFlag) {
00415         mMosaicOptions.bTrack = pbFlag;
00416       };
00417       
00419       bool GetTrackFlag(void) {
00420         return mMosaicOptions.bTrack;
00421       };
00422 
00431       void SetCreateFlag(bool pbFlag) {
00432         mMosaicOptions.bCreate  = pbFlag;
00433       };
00434 
00442       void SetBandNumber(int piBandNum) {
00443         mMosaicOptions.iBandNum = piBandNum;
00444       };
00445 
00454       void SetBandKeyWord(std::string psKeyName, std::string psKeyValue) {
00455         mMosaicOptions.sKeyName = psKeyName;
00456         mMosaicOptions.sKeyValue = psKeyValue;
00457       };
00458 
00466       void SetBandCriteria(BandCriteria peCriteria) {
00467         mMosaicOptions.eCriteria = peCriteria;
00468       };
00469 
00471       void Test(void);
00472 
00474       int GetInputStartLineInMosaic(void) {
00475         return miOsl;
00476       };
00477       
00479       int GetInputStartSampleInMosaic(void) {
00480         return miOss;
00481       };
00482       
00484       int GetInputStartBandInMosaic(void) {
00485         return miOsb;
00486       };
00487 
00488     private:
00489       int p_iss; 
00490       int p_isl; 
00491       int p_isb; 
00492       int p_ins; 
00493       int p_inl; 
00494       int p_inb; 
00495 
00496       int miOss; 
00497       int miOsl; 
00498       int miOsb; 
00499 
00503       bool mbBandbinMatch;
00504 
00506       bool mbMatchDEM;
00507       
00509       MosaicPriority mePriority;
00510 
00516       bool mbHighSat; 
00517       bool mbLowSat;  
00518       bool mbNull;    
00519 
00520       MosaicOptions mMosaicOptions; 
00521   };
00522 };
00523 
00524 #endif
00525