USGS

Isis 3.0 Developer's Reference (API)

Home

ProcessRubberSheet.h

Go to the documentation of this file.
00001 #ifndef ProcessRubberSheet_h
00002 #define ProcessRubberSheet_h
00003 
00025 #include "Process.h"
00026 #include "Buffer.h"
00027 #include "Transform.h"
00028 #include "Interpolator.h"
00029 #include "Portal.h"
00030 #include "TileManager.h"
00031 
00032 namespace Isis {
00098   class ProcessRubberSheet : public Isis::Process {
00099     public:
00101       ProcessRubberSheet(int startSize = 128, int endSize = 8) {
00102         p_bandChangeFunct = NULL;
00103         p_forceSamp = Isis::Null;
00104         p_forceLine = Isis::Null;
00105         p_startQuadSize = startSize;
00106         p_endQuadSize = endSize;
00107       };
00108 
00110       ~ProcessRubberSheet() {};
00111 
00112       // Line Processing method for one input and output cube
00113       void StartProcess(Isis::Transform &trans, Isis::Interpolator &interp);
00114 
00115       // Register a function to be called when the band number changes
00116       void BandChange(void (*funct)(const int band));
00117 
00118       void ForceTile(double Samp, double Line) {
00119         p_forceSamp = Samp;
00120         p_forceLine = Line;
00121       }
00122 
00131       void SetTiling(int start, int end) {
00132         p_startQuadSize = start;
00133         p_endQuadSize = end;
00134       }
00135 
00136     private:
00137 
00143       class Quad {
00144         public:
00145           int slineTile; 
00146           int ssampTile; 
00147           int sline;     
00148           int ssamp;     
00149           int eline;     
00150           int esamp;     
00151       };
00152 
00153       void ProcessQuad(std::vector<Quad *> &quadTree, Isis::Transform &trans,
00154                        std::vector< std::vector<double> > &lineMap,
00155                        std::vector< std::vector<double> > &sampMap);
00156 
00157       void SplitQuad(std::vector<Quad *> &quadTree);
00158       void SlowQuad(std::vector<Quad *> &quadTree, Isis::Transform &trans,
00159                     std::vector< std::vector<double> > &lineMap, 
00160                     std::vector< std::vector<double> > &sampMap);
00161       double Det4x4(double m[4][4]);
00162       double Det3x3(double m[3][3]);
00163 
00164       // SlowGeom method is never used but saved for posterity
00165       void SlowGeom(Isis::TileManager &otile, Isis::Portal &iportal,
00166                     Isis::Transform &trans, Isis::Interpolator &interp);
00167       void QuadTree(Isis::TileManager &otile, Isis::Portal &iportal,
00168                     Isis::Transform &trans, Isis::Interpolator &interp,
00169                     bool useLastTileMap);
00170 
00171       bool TestLine(Isis::Transform &trans, int ssamp, int esamp, int sline, 
00172                     int eline, int increment);
00173 
00174       void (*p_bandChangeFunct)(const int band);
00175 
00176       std::vector< std::vector<double> > p_sampMap; 
00177       std::vector< std::vector<double> > p_lineMap; 
00178 
00179       double p_forceSamp; 
00180       double p_forceLine; 
00181 
00182       int p_startQuadSize; 
00183       int p_endQuadSize;   
00184   };
00185 };
00186 
00187 #endif