Isis 3 Developer Reference
Portal.h
Go to the documentation of this file.
1 #ifndef Portal_h
2 #define Portal_h
3 
26 #include <cmath>
27 #include "PixelType.h"
28 #include "Buffer.h"
29 
30 namespace Isis {
52  class Portal : public Isis::Buffer {
53 
54  private:
55  double p_hotSample;
58  double p_hotLine;
62  public:
63  // Constructors and Destructors
64 
88  Portal(const int bufSamps, const int bufLines, const Isis::PixelType type,
89  const double hotSamp = -0.5, const double hotLine = -0.5) :
90  Isis::Buffer(bufSamps, bufLines, 1, type) {
91  p_hotSample = hotSamp;
92  p_hotLine = hotLine;
93  };
94 
96  ~Portal() {};
97 
109  inline void SetPosition(const double sample, const double line,
110  const int band) {
111  Isis::Buffer::SetBasePosition((int)floor(sample - p_hotSample),
112  (int)floor(line - p_hotLine), band);
113  };
114 
128  inline void SetHotSpot(const double sample = -0.5, const double line = -0.5) {
129  p_hotSample = sample;
130  p_hotLine = line;
131  };
132  };
133 };
134 
135 #endif
136 
Buffer for reading and writing cube data.
Definition: Buffer.h:69
Buffer for containing a two dimensional section of an image.
Definition: Portal.h:52
void SetBasePosition(const int start_sample, const int start_line, const int start_band)
This method is used to set the base position of the shape buffer.
Definition: Buffer.cpp:122
Portal(const int bufSamps, const int bufLines, const Isis::PixelType type, const double hotSamp=-0.5, const double hotLine=-0.5)
Constructs a Portal object.
Definition: Portal.h:88
PixelType
Enumerations for Isis Pixel Types.
Definition: PixelType.h:43
~Portal()
Destroys the Portal object.
Definition: Portal.h:96
void SetPosition(const double sample, const double line, const int band)
Sets the line and sample position of the buffer.
Definition: Portal.h:109
void SetHotSpot(const double sample=-0.5, const double line=-0.5)
Sets the line and sample offsets for the buffer.
Definition: Portal.h:128
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31