Isis 3 Programmer Reference
HiLab.cpp
1
20
#include "
HiLab.h
"
21
#include "
IException.h
"
22
23
using namespace
std
;
24
25
namespace
Isis
{
30
HiLab::HiLab(
Cube
*cube) {
31
PvlGroup
group = cube->
group
(
"Instrument"
);
32
p_cpmmNumber = group[
"CpmmNumber"
];
33
p_channel = group[
"ChannelNumber"
];
34
35
if
(group.
hasKeyword
(
"Summing"
)) {
36
p_bin = group[
"Summing"
];
37
}
38
else
{
39
std::string msg =
"Cannot find required Summing keyword in label"
;
40
throw
IException
(IException::Io, msg,
_FILEINFO_
);
41
}
42
43
if
(group.
hasKeyword
(
"Tdi"
)) {
44
p_tdi = group[
"Tdi"
];
45
}
46
else
{
47
std::string msg =
"Cannot find required Tdi keyword in label"
;
48
throw
IException
(IException::Io, msg,
_FILEINFO_
);
49
}
50
}
51
52
int
HiLab::getCcd() {
53
const
int
cpmm2ccd[] = {0, 1, 2, 3, 12, 4, 10, 11, 5, 13, 6, 7, 8, 9};
54
return
cpmm2ccd[p_cpmmNumber];
55
}
56
}
Isis::PvlContainer::hasKeyword
bool hasKeyword(const QString &name) const
Check to see if a keyword exists.
Definition:
PvlContainer.cpp:175
std
Namespace for the standard library.
Isis::Cube::group
PvlGroup & group(const QString &group) const
Read a group from the cube into a Label.
Definition:
Cube.cpp:1636
Isis::PvlGroup
Contains multiple PvlContainers.
Definition:
PvlGroup.h:57
_FILEINFO_
#define _FILEINFO_
Macro for the filename and line number.
Definition:
IException.h:40
IException.h
Isis::IException
Isis exception class.
Definition:
IException.h:107
Isis
Namespace for ISIS/Bullet specific routines.
Definition:
Apollo.h:31
HiLab.h
Isis::Cube
IO Handler for Isis Cubes.
Definition:
Cube.h:170
src
mro
objs
HiLab
HiLab.cpp