Isis 3.0 Programmer Reference
Back | Home
TileManager.cpp
Go to the documentation of this file.
1 
23 #include "TileManager.h"
24 
25 #include "IException.h"
26 
27 using namespace std;
28 namespace Isis {
29 
41  TileManager::TileManager(const Isis::Cube &cube,
42  const int &bufNumSamples, const int &bufNumLines) :
43  Isis::BufferManager(cube.sampleCount(), cube.lineCount(), cube.bandCount(),
44  bufNumSamples, bufNumLines, 1,
45  cube.pixelType()) {
46 
47  p_numSampTiles = (cube.sampleCount() - 1) / bufNumSamples + 1;
48  p_numLineTiles = (cube.lineCount() - 1) / bufNumLines + 1;
49  }
50 
66  bool TileManager::SetTile(const int tile, const int band) {
67  if(tile < 1) {
68  string message = "Invalid value for argument [tile]";
70  }
71 
72  if(band < 1) {
73  string message = "Invalid value for argument [band]";
75  }
76 
77  int map = (band - 1) * (p_numSampTiles * p_numLineTiles) + tile - 1;
78 
79  return setpos(map);
80  }
81 } // end namespace isis
82 
This error is for when a programmer made an API call that was illegal.
Definition: IException.h:154
int p_numLineTiles
Stores the number of tiles in the line direction.
Definition: TileManager.h:59
int sampleCount() const
Definition: Cube.cpp:1404
Manages a Buffer over a cube.
Definition: BufferManager.h:67
bool SetTile(const int Tile, const int band=1)
Sets the current tile as requested.
Definition: TileManager.cpp:66
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:38
bool setpos(BigInt map)
Sets the position of the shape in the cube.
Isis exception class.
Definition: IException.h:99
int p_numSampTiles
Stores the number of tiles in the sample direction.
Definition: TileManager.h:58
int lineCount() const
Definition: Cube.cpp:1331
IO Handler for Isis Cubes.
Definition: Cube.h:158

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the ISIS Support Center
File Modified: 07/12/2023 23:30:55