Isis Developer Reference
Portal.h
Go to the documentation of this file.
1 #ifndef Portal_h
2 #define Portal_h
3 
8 /* SPDX-License-Identifier: CC0-1.0 */
9 
10 #include <cmath>
11 #include "PixelType.h"
12 #include "Buffer.h"
13 
14 namespace Isis {
36  class Portal : public Isis::Buffer {
37 
38  private:
39  double p_hotSample;
42  double p_hotLine;
46  public:
47  // Constructors and Destructors
48 
72  Portal(const int bufSamps, const int bufLines, const Isis::PixelType type,
73  const double hotSamp = -0.5, const double hotLine = -0.5) :
74  Isis::Buffer(bufSamps, bufLines, 1, type) {
75  p_hotSample = hotSamp;
76  p_hotLine = hotLine;
77  };
78 
80  ~Portal() {};
81 
93  inline void SetPosition(const double sample, const double line,
94  const int band) {
95  Isis::Buffer::SetBasePosition((int)floor(sample - p_hotSample),
96  (int)floor(line - p_hotLine), band);
97  };
98 
112  inline void SetHotSpot(const double sample = -0.5, const double line = -0.5) {
113  p_hotSample = sample;
114  p_hotLine = line;
115  };
116  };
117 };
118 
119 #endif
120 
Isis::Portal
Buffer for containing a two dimensional section of an image.
Definition: Portal.h:36
Isis::Portal::SetHotSpot
void SetHotSpot(const double sample=-0.5, const double line=-0.5)
Sets the line and sample offsets for the buffer.
Definition: Portal.h:112
Isis::Buffer
Buffer for reading and writing cube data.
Definition: Buffer.h:53
Buffer.h
PixelType.h
Isis::Buffer::SetBasePosition
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:106
Isis::Portal::Portal
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:72
Isis::PixelType
PixelType
Enumerations for Isis Pixel Types.
Definition: PixelType.h:27
Isis::Portal::~Portal
~Portal()
Destroys the Portal object.
Definition: Portal.h:80
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
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16