Isis 3.0 Object Programmers' Reference
Home
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
LineManager.cpp
Go to the documentation of this file.
1
23
#include "
LineManager.h
"
24
25
#include "
IException.h
"
26
#include "
IString.h
"
27
28
using namespace
std;
29
30
namespace
Isis {
31
43
LineManager::LineManager(
const
Isis::Cube
&cube,
const
bool
reverse) :
44
Isis::
BufferManager
(cube.sampleCount(), cube.lineCount(),
45
cube.bandCount(), cube.sampleCount(), 1, 1,
46
cube.pixelType(), reverse) {
47
}
48
60
bool
LineManager::SetLine
(
const
int
line,
const
int
band) {
61
if
(line < 1) {
62
QString message =
"LineManager is unable to set the line to ["
63
+
toString
(line) +
"]. Minimum line value is 1."
;
64
throw
IException
(
IException::Programmer
, message,
_FILEINFO_
);
65
}
66
67
if
(band < 1) {
68
string
message =
"LineManager is unable to set the line for band ["
69
+
IString
(band) +
"]. Minimum band value is 1."
;
70
throw
IException
(
IException::Programmer
, message,
_FILEINFO_
);
71
}
72
73
int
map = (band - 1) *
MaxLines
() + line - 1;
74
return
setpos
(map);
75
}
76
77
}
// end namespace isis