USGS

Isis 3.0 Developer's Reference (API)

Home

Portal.h

Go to the documentation of this file.
00001 #if !defined(Portal_h)
00002 #define Portal_h
00003 
00026 #include <cmath>
00027 #include "PixelType.h"
00028 #include "Buffer.h"
00029 
00030 namespace Isis {
00052   class Portal : public Isis::Buffer {
00053 
00054     private:
00055       double p_hotSample;  
00058       double p_hotLine;    
00062     public:
00063       // Constructors and Destructors
00064 
00088       Portal(const int bufSamps, const int bufLines, const Isis::PixelType type,
00089              const double hotSamp = -0.5, const double hotLine = -0.5) :
00090         Isis::Buffer(bufSamps, bufLines, 1, type) {
00091         p_hotSample = hotSamp;
00092         p_hotLine = hotLine;
00093       };
00094 
00096       ~Portal() {};
00097 
00109       inline void SetPosition(const double sample, const double line,
00110                               const int band) {
00111         Isis::Buffer::SetBasePosition((int)floor(sample - p_hotSample),
00112                                       (int)floor(line - p_hotLine), band);
00113       };
00114 
00128       inline void SetHotSpot(const double sample = -0.5, const double line = -0.5) {
00129         p_hotSample = sample;
00130         p_hotLine = line;
00131       };
00132   };
00133 };
00134 
00135 #endif
00136