Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

Isis 3 Programmer Reference
BandManager.cpp
1
5
6/* SPDX-License-Identifier: CC0-1.0 */
7#include "BandManager.h"
8#include "IException.h"
9
10using namespace std;
11namespace Isis {
12
23
24 BandManager::BandManager(const Isis::Cube &cube, const bool reverse) :
25 Isis::BufferManager(cube.sampleCount(), cube.lineCount(),
26 cube.bandCount(), 1, 1, cube.bandCount(),
27 cube.pixelType(), reverse) {
28 }
29
39
40 bool BandManager::SetBand(const int sample, const int line) {
41 if(sample < 1) {
42 string message = "Invalid value for argument [sample]";
43 throw IException(IException::Programmer, message, _FILEINFO_);
44 }
45
46 if(line < 1) {
47 string message = "Invalid value for argument [line]";
48 throw IException(IException::Programmer, message, _FILEINFO_);
49 }
50
51 int map = (line - 1) * MaxBands() + sample - 1;
52 return setpos(map);
53 }
54
55} // end namespace isis
bool SetBand(const int sample, const int line=1)
Positions the buffer at the requested line and returns a status indicator if the set was succesful or...
BandManager(const Isis::Cube &cube, const bool reverse=false)
Constructs a BandManager object.
bool setpos(BigInt map)
Sets the position of the shape in the cube.
int MaxBands() const
Returns the number of bands in the cube.
IO Handler for Isis Cubes.
Definition Cube.h:168
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16
Namespace for the standard library.