72 Buffer(
const int nsamps,
const int nlines,
const int nbands,
118 int Sample(
const int index = 0)
const;
119 int Line(
const int index = 0)
const;
120 int Band(
const int index = 0)
const;
121 void Position(
const int index,
int &i_samp,
int &i_line,
int &i_band)
const;
122 int Index(
const int i_samp,
const int i_line,
const int i_band)
const;
125 double at(
const int index)
const;
135 return (
p_buf[index]);
146 return (
p_buf[index]);
157 void Copy(
const Buffer &in,
bool includeRawBuf =
true);
182 const int start_band);
241 return const_cast<Buffer &
>(rvalue);
void Allocate()
Size or resize the memory buffer.
Buffer for reading and writing cube data.
double * DoubleBuffer() const
Returns the value of the shape buffer.
int Band(const int index=0) const
Returns the band position associated with a shape buffer index.
void * RawBuffer() const
Returns a void pointer to the raw buffer.
void SetBaseBand(const int start_band)
This method is used to set the base band position of the shape buffer.
const Isis::PixelType p_pixelType
The pixel type of the raw buffer.
void * p_rawbuf
The raw dm read from the disk.
void SetBasePosition(const int start_sample, const int start_line, const int start_band)
This method is used to set the base position of the shape buffer.
double at(const int index) const
Returns the value in the shape buffer at the given index.
void Copy(const Buffer &in, bool includeRawBuf=true)
Allows copying of the buffer contents to another Buffer.
int p_line
Starting line to read/write.
int LineDimension() const
Returns the number of lines in the shape buffer.
int size() const
Returns the total number of pixels in the shape buffer.
PixelType
Enumerations for Isis Pixel Types.
double & operator[](const int index)
Returns the value in the shape buffer at given index.
~Buffer()
Destroys the Buffer object and frees shape buffer.
int p_sample
Starting sample to read/write.
int p_npixels
Number of pixels (nsamps * nlines * nbands)
int Sample(const int index=0) const
Returns the sample position associated with a shape buffer index.
Isis::PixelType PixelType() const
Returns the raw buffer pixel type.
int BandDimension() const
Returns the number of bands in the shape buffer.
double * p_buf
Shape buffer allocated to the size of npixels for handling reads/writes.
int Line(const int index=0) const
Returns the line position associated with a shape buffer index.
int p_nbands
Number of bands to read/write.
const double & operator[](const int index) const
Returns the value in the shape buffer at given index.
void SetBaseSample(const int start_samp)
This method is used to set the base sample position of the shape buffer.
int p_band
Starting band to read/write.
int p_nlines
Number of lines to read/write.
void SetBaseLine(const int start_line)
This method is used to set the base line position of the shape buffer.
int SampleDimension() const
Returns the number of samples in the shape buffer.
Buffer & operator=(const Buffer &rvalue)
Copy operator.
Namespace for ISIS/Bullet specific routines.
Buffer()
Default constructor for proper initialization purposes.
int Index(const int i_samp, const int i_line, const int i_band) const
Given a sample, line, and band position, this returns the appropriate index in the shape buffer...
void Position(const int index, int &i_samp, int &i_line, int &i_band) const
Returns the sample, line, and band position associated with a shape buffer index. ...
int p_nsamps
Number of samples to read/write.
bool CopyOverlapFrom(const Buffer &in)
Allows copying of the buffer contents of a larger buffer to another same size or smaller Buffer...
Buffer & operator=(const double &d)
Assign the entire buffer to a constant double value.