|
Isis 3.0 Object Programmers' Reference |
Home |
00001 00002 00025 #include "BandManager.h" 00026 00027 using namespace std; 00028 namespace Isis { 00029 00041 BandManager::BandManager(const Isis::Cube &cube, const bool reverse) : 00042 Isis::BufferManager(cube.Samples(),cube.Lines(), 00043 cube.Bands(),1,1,cube.Bands(), 00044 cube.PixelType(), reverse ) { 00045 } 00046 00057 bool BandManager::SetBand (const int sample, const int line) { 00058 if (sample < 1) { 00059 string message = "Invalid value for argument [sample]"; 00060 throw Isis::iException::Message(Isis::iException::Programmer,message,_FILEINFO_); 00061 } 00062 00063 if (line < 1) { 00064 string message = "Invalid value for argument [line]"; 00065 throw Isis::iException::Message(Isis::iException::Programmer,message,_FILEINFO_); 00066 } 00067 00068 int map = (line - 1) * MaxBands() + sample - 1; 00069 return setpos(map); 00070 } 00071 00072 } // end namespace isis