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
LineManager.cpp
1
5
6/* SPDX-License-Identifier: CC0-1.0 */
7#include "LineManager.h"
8
9#include "IException.h"
10#include "IString.h"
11
12using namespace std;
13
14namespace Isis {
15
26
27 LineManager::LineManager(const Isis::Cube &cube, const bool reverse) :
28 Isis::BufferManager(cube.sampleCount(), cube.lineCount(),
29 cube.bandCount(), cube.sampleCount(), 1, 1,
30 cube.pixelType(), reverse) {
31 }
32
43
44 bool LineManager::SetLine(const int line, const int band) {
45 if(line < 1) {
46 QString message = "LineManager is unable to set the line to ["
47 + toString(line) + "]. Minimum line value is 1.";
48 throw IException(IException::Programmer, message, _FILEINFO_);
49 }
50
51 if(band < 1) {
52 string message = "LineManager is unable to set the line for band ["
53 + IString(band) + "]. Minimum band value is 1.";
54 throw IException(IException::Programmer, message, _FILEINFO_);
55 }
56
57 int map = (band - 1) * MaxLines() + line - 1;
58 return setpos(map);
59 }
60
61} // end namespace isis
int MaxLines() const
Returns the number of lines in the cube.
bool setpos(BigInt map)
Sets the position of the shape in the cube.
IO Handler for Isis Cubes.
Definition Cube.h:168
bool SetLine(const int line, const int band=1)
Positions the buffer at the requested line and returns a status indicator if the set was succesful or...
LineManager(const Isis::Cube &cube, const bool reverse=false)
Constructs a LineManager object.
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16
QString toString(const LinearAlgebra::Vector &vector, int precision)
A global function to format LinearAlgebra::Vector as a QString with the given precision.
Namespace for the standard library.