USGS

Isis 3.0 Object Programmers' Reference

Home

ProcessRubberSheet.h
Go to the documentation of this file.
1 #ifndef ProcessRubberSheet_h
2 #define ProcessRubberSheet_h
3 
25 #include "Process.h"
26 #include "Buffer.h"
27 #include "Transform.h"
28 #include "Interpolator.h"
29 #include "Portal.h"
30 #include "TileManager.h"
31 
32 namespace Isis {
33  class Brick;
34 
118  class ProcessRubberSheet : public Process {
119  public:
120 
121  ProcessRubberSheet(int startSize = 128, int endSize = 8);
122 
124  virtual ~ProcessRubberSheet() {};
125 
126  // Output driven processing method for one input and output cube
127  virtual void StartProcess(Transform &trans, Interpolator &interp);
128 
129  // Input driven processing method for one input and output cube
130  void processPatchTransform(Transform &trans, Interpolator &interp);
131 
132  // Register a function to be called when the band number changes
133  void BandChange(void (*funct)(const int band));
134 
135  void ForceTile(double Samp, double Line) {
136  p_forceSamp = Samp;
137  p_forceLine = Line;
138  }
139 
148  void SetTiling(int start, int end) {
149  p_startQuadSize = start;
150  p_endQuadSize = end;
151  }
152 
153  void setPatchParameters(int startSample, int startLine,
154  int samples, int lines,
155  int sampleIncrement, int lineIncrement);
156 
157 
158  private:
159 
165  class Quad {
166  public:
167  int slineTile;
168  int ssampTile;
169  int sline;
170  int ssamp;
171  int eline;
172  int esamp;
173  };
174 
175  void ProcessQuad(std::vector<Quad *> &quadTree, Transform &trans,
176  std::vector< std::vector<double> > &lineMap,
177  std::vector< std::vector<double> > &sampMap);
178 
179  void SplitQuad(std::vector<Quad *> &quadTree);
180  void SlowQuad(std::vector<Quad *> &quadTree, Transform &trans,
181  std::vector< std::vector<double> > &lineMap,
182  std::vector< std::vector<double> > &sampMap);
183  double Det4x4(double m[4][4]);
184  double Det3x3(double m[3][3]);
185 
186  // SlowGeom method is never used but saved for posterity
187  void SlowGeom(TileManager &otile, Portal &iportal,
188  Transform &trans, Interpolator &interp);
189  void QuadTree(TileManager &otile, Portal &iportal,
190  Transform &trans, Interpolator &interp,
191  bool useLastTileMap);
192 
193  bool TestLine(Transform &trans, int ssamp, int esamp, int sline,
194  int eline, int increment);
195 
196  void (*p_bandChangeFunct)(const int band);
197 
198  void transformPatch (double startingSample, double endingSample,
199  double startingLine, double endingLine,
200  Brick &obrick, Portal &iportal,
201  Transform &trans, Interpolator &interp);
202 
203  void splitPatch (double startingSample, double endingSample,
204  double startingLine, double endingLine,
205  Brick &obrick, Portal &iportal,
206  Transform &trans, Interpolator &interp);
207 #if 0
208  void transformPatch (double startingSample, double endingSample,
209  double startingLine, double endingLine);
210 
211  void splitPatch (double startingSample, double endingSample,
212  double startingLine, double endingLine);
213 #endif
214 
215  std::vector< std::vector<double> > p_sampMap;
216  std::vector< std::vector<double> > p_lineMap;
217 
218  double p_forceSamp;
219  double p_forceLine;
220 
221  int p_startQuadSize;
222  int p_endQuadSize;
223 
224  int m_patchStartSample;
225  int m_patchStartLine;
226  int m_patchSamples;
227  int m_patchLines;
228  int m_patchSampleIncrement;
229  int m_patchLineIncrement;
230 
231 #if 0
232  Portal *m_iportal;
233  Brick *m_obrick;
234  Transform *m_transform;
235  Interpolator *m_interpolator;
236 #endif
237  };
238 };
239 
240 #endif