Isis 3 Programmer Reference
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.";
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.";
71  }
72 
73  int map = (band - 1) * MaxLines() + line - 1;
74  return setpos(map);
75  }
76 
77 } // end namespace isis
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...
Definition: LineManager.cpp:60
Namespace for the standard library.
int MaxLines() const
Returns the number of lines in the cube.
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Definition: IString.cpp:226
This error is for when a programmer made an API call that was illegal.
Definition: IException.h:162
Manages a Buffer over a cube.
Definition: BufferManager.h:68
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:40
bool setpos(BigInt map)
Sets the position of the shape in the cube.
Isis exception class.
Definition: IException.h:107
Adds specific functionality to C++ strings.
Definition: IString.h:181
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
IO Handler for Isis Cubes.
Definition: Cube.h:170