7#include "BufferManager.h"
12#include "IException.h"
17 BufferManager::BufferManager() {
44 BufferManager::BufferManager(
int maxsamps,
int maxlines,
45 int maxbands,
int bufsamps,
46 int buflines,
int bufbands,
48 Isis::
Buffer(bufsamps, buflines, bufbands, type),
49 p_maxSamps(maxsamps), p_maxLines(maxlines),
50 p_maxBands(maxbands) {
64 p_maxSamps(other.p_maxSamps), p_maxLines(other.p_maxLines),
65 p_maxBands(other.p_maxBands), p_sinc(other.p_sinc), p_linc(other.p_linc),
66 p_binc(other.p_binc), p_soff(other.p_soff), p_loff(other.p_loff),
67 p_boff(other.p_boff), p_currentSample(other.p_currentSample),
68 p_currentLine(other.p_currentLine), p_currentBand(other.p_currentBand),
69 p_nmaps(other.p_nmaps), p_currentMap(other.p_currentMap),
70 p_reverse(other.p_reverse) {
84 std::swap(
p_sinc, other.p_sinc);
85 std::swap(
p_linc, other.p_linc);
86 std::swap(
p_binc, other.p_binc);
87 std::swap(
p_soff, other.p_soff);
88 std::swap(
p_loff, other.p_loff);
89 std::swap(
p_boff, other.p_boff);
93 std::swap(
p_nmaps, other.p_nmaps);
228 map /= sampDimension;
235 map /= lineDimension;
245 map /= bandDimension;
252 map /= lineDimension;
262 string message =
"Invalid value for argument [map]";
Buffer for reading and writing cube data.
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.
Manages a Buffer over a cube.
BufferManager & operator=(const BufferManager &rhs)
Creates a new BufferManager with the same values as another.
int p_currentSample
Current sample.
void swap(BufferManager &other)
Swaps the values of this BufferManager with that of another.
int p_currentBand
Current band.
int p_linc
Line increment.
int p_maxBands
Maximum bands to map.
int p_currentLine
Current line.
void SetOffsets(const int soff, const int loff, const int boff)
Sets the offset of the buffer.
int p_maxSamps
Maximum samples to map.
bool p_reverse
If true the axies are processed in Band, Line, Sample order (e.g., BIL).
int p_sinc
Sample increment.
bool setpos(BigInt map)
Sets the position of the shape in the cube.
bool end() const
Returns true if the shape buffer has accessed the end of the cube.
BigInt p_currentMap
Current buffer map position.
void SetIncrements(const int sinc, const int linc, const int binc)
Sets how the shape is incremented through the cube.
int p_maxLines
Maximum lines to map.
BigInt p_nmaps
Total number of objects to map.
int p_binc
Band increment.
@ Programmer
This error is for when a programmer made an API call that was illegal.
This is free and unencumbered software released into the public domain.
long long int BigInt
Big int.
PixelType
Enumerations for Isis Pixel Types.
Namespace for the standard library.