23 #include "IsisDebug.h"
34 BufferManager::BufferManager() {
61 BufferManager::BufferManager(
int maxsamps,
int maxlines,
62 int maxbands,
int bufsamps,
63 int buflines,
int bufbands,
65 Isis::
Buffer(bufsamps, buflines, bufbands, type),
66 p_maxSamps(maxsamps), p_maxLines(maxlines),
67 p_maxBands(maxbands) {
75 p_maxSamps(other.p_maxSamps), p_maxLines(other.p_maxLines),
76 p_maxBands(other.p_maxBands), p_sinc(other.p_sinc), p_linc(other.p_linc),
77 p_binc(other.p_binc), p_soff(other.p_soff), p_loff(other.p_loff),
78 p_boff(other.p_boff), p_currentSample(other.p_currentSample),
79 p_currentLine(other.p_currentLine), p_currentBand(other.p_currentBand),
80 p_nmaps(other.p_nmaps), p_currentMap(other.p_currentMap),
81 p_reverse(other.p_reverse) {
85 void BufferManager::swap(BufferManager &other) {
89 std::swap(
p_sinc, other.p_sinc);
90 std::swap(
p_linc, other.p_linc);
91 std::swap(
p_binc, other.p_binc);
92 std::swap(
p_soff, other.p_soff);
93 std::swap(
p_loff, other.p_loff);
94 std::swap(
p_boff, other.p_boff);
98 std::swap(
p_nmaps, other.p_nmaps);
104 BufferManager &BufferManager::operator=(
const BufferManager &rhs) {
105 BufferManager copy(rhs);
226 map /= sampDimension;
233 map /= lineDimension;
243 map /= bandDimension;
250 map /= lineDimension;
260 string message =
"Invalid value for argument [map]";
Buffer for reading and writing cube data.
void SetOffsets(const int soff, const int loff, const int boff)
Sets the offset of the buffer.
bool p_reverse
If true the axies are processed in Band, Line, Sample order (e.g., BIL).
int p_sinc
Sample increment.
bool end() const
Returns true if the shape buffer has accessed the end of the cube.
int p_maxLines
Maximum lines to map.
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.
int p_binc
Band increment.
This error is for when a programmer made an API call that was illegal.
int p_maxSamps
Maximum samples to map.
PixelType
Enumerations for Isis Pixel Types.
int p_currentSample
Current sample.
Manages a Buffer over a cube.
#define _FILEINFO_
Macro for the filename and line number.
bool setpos(BigInt map)
Sets the position of the shape in the cube.
int p_linc
Line increment.
BigInt p_currentMap
Current buffer map position.
int p_currentBand
Current band.
void SetIncrements(const int sinc, const int linc, const int binc)
Sets how the shape is incremented through the cube.
int p_maxBands
Maximum bands to map.
int p_currentLine
Current line.
BigInt p_nmaps
Total number of objects to map.