Isis 3.0 Programmer Reference
Back | 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 
127  // Output driven processing method for one input and output cube
128  virtual void StartProcess(Transform &trans, Interpolator &interp);
129 
130  // Input driven processing method for one input and output cube
131  void processPatchTransform(Transform &trans, Interpolator &interp);
132 
133  // Register a function to be called when the band number changes
134  void BandChange(void (*funct)(const int band));
135 
136  void ForceTile(double Samp, double Line) {
137  p_forceSamp = Samp;
138  p_forceLine = Line;
139  }
140 
149  void SetTiling(int start, int end) {
150  p_startQuadSize = start;
151  p_endQuadSize = end;
152  }
153 
154  void setPatchParameters(int startSample, int startLine,
155  int samples, int lines,
156  int sampleIncrement, int lineIncrement);
157 
158 
159  private:
160 
166  class Quad {
167  public:
168  int slineTile;
169  int ssampTile;
170  int sline;
171  int ssamp;
172  int eline;
173  int esamp;
174  };
175 
176  void ProcessQuad(std::vector<Quad *> &quadTree, Transform &trans,
177  std::vector< std::vector<double> > &lineMap,
178  std::vector< std::vector<double> > &sampMap);
179 
180  void SplitQuad(std::vector<Quad *> &quadTree);
181  void SlowQuad(std::vector<Quad *> &quadTree, Transform &trans,
182  std::vector< std::vector<double> > &lineMap,
183  std::vector< std::vector<double> > &sampMap);
184  double Det4x4(double m[4][4]);
185  double Det3x3(double m[3][3]);
186 
187  // SlowGeom method is never used but saved for posterity
188  void SlowGeom(TileManager &otile, Portal &iportal,
189  Transform &trans, Interpolator &interp);
190  void QuadTree(TileManager &otile, Portal &iportal,
191  Transform &trans, Interpolator &interp,
192  bool useLastTileMap);
193 
194  bool TestLine(Transform &trans, int ssamp, int esamp, int sline,
195  int eline, int increment);
196 
197  void (*p_bandChangeFunct)(const int band);
198 
199  void transformPatch (double startingSample, double endingSample,
200  double startingLine, double endingLine,
201  Brick &obrick, Portal &iportal,
202  Transform &trans, Interpolator &interp);
203 
204  void splitPatch (double startingSample, double endingSample,
205  double startingLine, double endingLine,
206  Brick &obrick, Portal &iportal,
207  Transform &trans, Interpolator &interp);
208 #if 0
209  void transformPatch (double startingSample, double endingSample,
210  double startingLine, double endingLine);
211 
212  void splitPatch (double startingSample, double endingSample,
213  double startingLine, double endingLine);
214 #endif
215 
216  std::vector< std::vector<double> > p_sampMap;
217  std::vector< std::vector<double> > p_lineMap;
218 
219  double p_forceSamp;
220  double p_forceLine;
221 
222  int p_startQuadSize;
223  int p_endQuadSize;
224 
225  int m_patchStartSample;
226  int m_patchStartLine;
227  int m_patchSamples;
228  int m_patchLines;
229  int m_patchSampleIncrement;
230  int m_patchLineIncrement;
231 
232 #if 0
233  Portal *m_iportal;
234  Brick *m_obrick;
235  Transform *m_transform;
236  Interpolator *m_interpolator;
237 #endif
238  };
239 };
240 
241 #endif
virtual void StartProcess(Transform &trans, Interpolator &interp)
Applies a Transform and an Interpolator to every pixel in the output cube.
void BandChange(void(*funct)(const int band))
Registers a function to be called when the current output cube band number changes.
void setPatchParameters(int startSample, int startLine, int samples, int lines, int sampleIncrement, int lineIncrement)
This method allows the programmer to override the default values for patch parameters used in the pat...
virtual ~ProcessRubberSheet()
Destroys the RubberSheet object.
Buffer for containing a two dimensional section of an image.
Definition: Portal.h:52
ProcessRubberSheet(int startSize=128, int endSize=8)
Constructs a ProcessRubberSheet class with the default tile size range.
void SetTiling(int start, int end)
This sets the start and end tile sizes for the rubber sheet; numbers are inclusive and must be powers...
Buffer for containing a three dimensional section of an image.
Definition: Brick.h:60
virtual void StartProcess(void funct())
In the base class, this method will invoked a user-specified function exactly one time...
Definition: Process.h:227
void processPatchTransform(Transform &trans, Interpolator &interp)
Applies a Transform and an Interpolator to small patches.
Derivative of Process, designed for geometric transformations.
bool TestLine(Transform &trans, int ssamp, int esamp, int sline, int eline, int increment)
This function walks a line (or rectangle) and tests a point every increment pixels.
Pixel interpolator.
Definition: Interpolator.h:51
Pixel transformation.
Definition: Transform.h:89
Buffer manager, for moving through a cube in tiles.
Definition: TileManager.h:55
Base class for all cube processing derivatives.
Definition: Process.h:157

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the ISIS Support Center
File Modified: 07/12/2023 23:26:36