Isis 3 Programmer Reference
Brick.cpp
Go to the documentation of this file.
1 
24 #include "Brick.h"
25 #include "IException.h"
26 
27 namespace Isis {
36  void Brick::Resize(const int nsamps, const int nlines, const int nbands) {
37  delete [] p_buf;
38  delete [](char *) p_rawbuf;
39  p_nsamps = nsamps;
40  p_nlines = nlines;
41  p_nbands = nbands;
43  Allocate();
44  }
45 
59  bool Brick::SetBrick(const int brick) {
60  if(brick < 1) {
61  QString message = "Invalid value for argument [brick]";
63  }
64 
65  return setpos(brick - 1);
66  }
67 } // end namespace isis
void Allocate()
Size or resize the memory buffer.
Definition: Buffer.cpp:356
void * p_rawbuf
The raw dm read from the disk.
Definition: Buffer.h:228
This error is for when a programmer made an API call that was illegal.
Definition: IException.h:162
int p_npixels
Number of pixels (nsamps * nlines * nbands)
Definition: Buffer.h:223
double * p_buf
Shape buffer allocated to the size of npixels for handling reads/writes.
Definition: Buffer.h:224
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:40
bool SetBrick(const int brick)
This method is used to set the position of the brick.
Definition: Brick.cpp:59
int p_nbands
Number of bands to read/write.
Definition: Buffer.h:221
int p_nlines
Number of lines to read/write.
Definition: Buffer.h:218
bool setpos(BigInt map)
Sets the position of the shape in the cube.
Isis exception class.
Definition: IException.h:107
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
void Resize(const int nsamps, const int nlines, const int nbands)
Resizes the memory buffer to the specified number of samples, lines, and bands.
Definition: Brick.cpp:36
int p_nsamps
Number of samples to read/write.
Definition: Buffer.h:215