Isis 3.0 Programmer Reference
Back | Home
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:354
void * p_rawbuf
The raw dm read from the disk.
Definition: Buffer.h:227
This error is for when a programmer made an API call that was illegal.
Definition: IException.h:154
int p_npixels
Number of pixels (nsamps * nlines * nbands)
Definition: Buffer.h:222
double * p_buf
Shape buffer allocated to the size of npixels for handling reads/writes.
Definition: Buffer.h:223
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:38
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:220
int p_nlines
Number of lines to read/write.
Definition: Buffer.h:217
bool setpos(BigInt map)
Sets the position of the shape in the cube.
Isis exception class.
Definition: IException.h:99
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:214

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:14:53