Isis Developer Reference
ProcessRubberSheet.h
Go to the documentation of this file.
1 #ifndef ProcessRubberSheet_h
2 #define ProcessRubberSheet_h
3 
8 /* SPDX-License-Identifier: CC0-1.0 */
9 #include "Process.h"
10 #include "Buffer.h"
11 #include "Transform.h"
12 #include "Interpolator.h"
13 #include "Portal.h"
14 #include "TileManager.h"
15 
16 namespace Isis {
17  class Brick;
18 
104  class ProcessRubberSheet : public Process {
105  public:
106 
107  ProcessRubberSheet(int startSize = 128, int endSize = 8);
108 
110  virtual ~ProcessRubberSheet() {};
111 
113  // Output driven processing method for one input and output cube
114  virtual void StartProcess(Transform &trans, Interpolator &interp);
115 
116  // Input driven processing method for one input and output cube
117  virtual void processPatchTransform(Transform &trans, Interpolator &interp);
118 
119  // Register a function to be called when the band number changes
120  virtual void BandChange(void (*funct)(const int band));
121 
122  virtual void ForceTile(double Samp, double Line) {
123  p_forceSamp = Samp;
124  p_forceLine = Line;
125  }
126 
135  virtual void SetTiling(long long start, long long end) {
136  p_startQuadSize = start;
137  p_endQuadSize = end;
138  }
139 
140  virtual void setPatchParameters(int startSample, int startLine,
141  int samples, int lines,
142  int sampleIncrement, int lineIncrement);
143 
144 
145  private:
146 
152  class Quad {
153  public:
154  int slineTile;
155  int ssampTile;
156  int sline;
157  int ssamp;
158  int eline;
159  int esamp;
160  };
161 
162  void ProcessQuad(std::vector<Quad *> &quadTree, Transform &trans,
163  std::vector< std::vector<double> > &lineMap,
164  std::vector< std::vector<double> > &sampMap);
165 
166  void SplitQuad(std::vector<Quad *> &quadTree);
167  void SlowQuad(std::vector<Quad *> &quadTree, Transform &trans,
168  std::vector< std::vector<double> > &lineMap,
169  std::vector< std::vector<double> > &sampMap);
170  double Det4x4(double m[4][4]);
171  double Det3x3(double m[3][3]);
172 
173  // SlowGeom method is never used but saved for posterity
174  void SlowGeom(TileManager &otile, Portal &iportal,
175  Transform &trans, Interpolator &interp);
176  void QuadTree(TileManager &otile, Portal &iportal,
177  Transform &trans, Interpolator &interp,
178  bool useLastTileMap);
179 
180  bool TestLine(Transform &trans, int ssamp, int esamp, int sline,
181  int eline, int increment);
182 
183  void (*p_bandChangeFunct)(const int band);
184 
185  void transformPatch (double startingSample, double endingSample,
186  double startingLine, double endingLine,
187  Portal &iportal, Transform &trans, Interpolator &interp);
188 
189  void splitPatch (double startingSample, double endingSample,
190  double startingLine, double endingLine,
191  Portal &iportal, Transform &trans, Interpolator &interp);
192 #if 0
193  void transformPatch (double startingSample, double endingSample,
194  double startingLine, double endingLine);
195 
196  void splitPatch (double startingSample, double endingSample,
197  double startingLine, double endingLine);
198 #endif
199 
200  std::vector< std::vector<double> > p_sampMap;
201  std::vector< std::vector<double> > p_lineMap;
202 
203  double p_forceSamp;
204  double p_forceLine;
205 
206  long long p_startQuadSize;
207  long long p_endQuadSize;
208 
209  int m_patchStartSample;
210  int m_patchStartLine;
211  int m_patchSamples;
212  int m_patchLines;
213  int m_patchSampleIncrement;
214  int m_patchLineIncrement;
215 
216 #if 0
217  Portal *m_iportal;
218  Brick *m_obrick;
219  Transform *m_transform;
220  Interpolator *m_interpolator;
221 #endif
222  };
223 };
224 
225 #endif
Portal.h
F
#define F(x, y, z)
Definition: md5.cpp:62
Isis::Portal
Buffer for containing a two dimensional section of an image.
Definition: Portal.h:36
Isis::BoxcarCachingAlgorithm
This algorithm is designed for applications that jump around between a couple of spots in the cube wi...
Definition: BoxcarCachingAlgorithm.h:32
Isis::ProcessRubberSheet::ProcessRubberSheet
ProcessRubberSheet(int startSize=128, int endSize=8)
Constructs a ProcessRubberSheet class with the default tile size range.
Definition: ProcessRubberSheet.cpp:35
BoxcarCachingAlgorithm.h
Process.h
Isis::Buffer::DoubleBuffer
double * DoubleBuffer() const
Returns the value of the shape buffer.
Definition: Buffer.h:138
Isis::Process
Base class for all cube processing derivatives.
Definition: Process.h:143
Isis::ProcessRubberSheet::~ProcessRubberSheet
virtual ~ProcessRubberSheet()
Destroys the RubberSheet object.
Definition: ProcessRubberSheet.h:110
Isis::Interpolator::Lines
int Lines()
Returns the number of lines needed by the interpolator.
Definition: Interpolator.cpp:236
Isis::ProcessRubberSheet::StartProcess
virtual void StartProcess(Transform &trans, Interpolator &interp)
Applies a Transform and an Interpolator to every pixel in the output cube.
Definition: ProcessRubberSheet.cpp:132
Isis::TileManager
Buffer manager, for moving through a cube in tiles.
Definition: TileManager.h:39
Isis::TileManager::SetTile
bool SetTile(const int Tile, const int band=1)
Sets the current tile as requested.
Definition: TileManager.cpp:50
Isis::Process::StartProcess
virtual void StartProcess(void funct())
In the base class, this method will invoked a user-specified function exactly one time.
Definition: Process.h:213
Isis::BufferManager::begin
bool begin()
Moves the shape buffer to the first position.
Definition: BufferManager.h:96
Isis::Interpolator::HotSample
double HotSample()
Returns the sample coordinate of the center pixel in the buffer for the interpolator.
Definition: Interpolator.cpp:265
Isis::ProcessRubberSheet::setPatchParameters
virtual 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...
Definition: ProcessRubberSheet.cpp:102
Isis::BufferManager::end
bool end() const
Returns true if the shape buffer has accessed the end of the cube.
Definition: BufferManager.h:115
Isis::Transform
Pixel transformation.
Definition: Transform.h:72
Buffer.h
_FILEINFO_
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
TileManager.h
Isis::NULL8
const double NULL8
Definition: SpecialPixel.h:94
LeastSquares.h
Isis::Interpolator
Pixel interpolator.
Definition: Interpolator.h:34
Isis::IException
Isis exception class.
Definition: IException.h:91
Isis::ProcessRubberSheet::BandChange
virtual void BandChange(void(*funct)(const int band))
Registers a function to be called when the current output cube band number changes.
Definition: ProcessRubberSheet.cpp:232
Isis::ProcessRubberSheet::ForceTile
virtual void ForceTile(double Samp, double Line)
Definition: ProcessRubberSheet.h:122
Transform.h
Isis::Null
const double Null
Value for an Isis Null pixel.
Definition: SpecialPixel.h:95
Affine.h
Isis::Transform::Xform
virtual bool Xform(double &inSample, double &inLine, const double outSample, const double outLine)
Transforms the given output line and sample to the corresponding output line and sample.
Definition: Transform.h:123
BasisFunction.h
Isis::Buffer::Band
int Band(const int index=0) const
Returns the band position associated with a shape buffer index.
Definition: Buffer.cpp:162
Brick.h
std
Namespace for the standard library.
Isis::Interpolator::Interpolate
double Interpolate(const double isamp, const double iline, const double buf[])
Performs an interpolation on the data according to the parameters set in the constructor.
Definition: Interpolator.cpp:56
Isis::ProcessRubberSheet::processPatchTransform
virtual void processPatchTransform(Transform &trans, Interpolator &interp)
Applies a Transform and an Interpolator to small patches.
Definition: ProcessRubberSheet.cpp:787
Isis::E
const double E
Sets some basic constants for use in ISIS programming.
Definition: Constants.h:39
Isis::UniqueIOCachingAlgorithm
This algorithm is designed for applications that jump around between a couple of spots in the cube wi...
Definition: UniqueIOCachingAlgorithm.h:30
Isis::Buffer::size
int size() const
Returns the total number of pixels in the shape buffer.
Definition: Buffer.h:97
Isis::Interpolator::Samples
int Samples()
Returns the number of samples needed by the interpolator.
Definition: Interpolator.cpp:208
Isis::ProcessRubberSheet
Derivative of Process, designed for geometric transformations.
Definition: ProcessRubberSheet.h:104
QVector< double >
Isis::Buffer::Sample
int Sample(const int index=0) const
Returns the sample position associated with a shape buffer index.
Definition: Buffer.cpp:127
Isis::Interpolator::HotLine
double HotLine()
Returns the line coordinate of the center pixel in the buffer for the interpolator.
Definition: Interpolator.cpp:297
Interpolator.h
Isis::ProcessRubberSheet::SetTiling
virtual void SetTiling(long long start, long long end)
This sets the start and end tile sizes for the rubber sheet; numbers are inclusive and must be powers...
Definition: ProcessRubberSheet.h:135
Isis::Portal::SetPosition
void SetPosition(const double sample, const double line, const int band)
Sets the line and sample position of the buffer.
Definition: Portal.h:93
ProcessRubberSheet.h
UniqueIOCachingAlgorithm.h
Isis::Buffer::Line
int Line(const int index=0) const
Returns the line position associated with a shape buffer index.
Definition: Buffer.cpp:145
Isis::TileManager::Tiles
int Tiles()
Returns the number of Tiles in the cube.
Definition: TileManager.h:60
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16