|
Isis Developer Reference
|
Go to the documentation of this file.
56 Buffer(
const int nsamps,
const int nlines,
const int nbands,
102 int Sample(
const int index = 0)
const;
103 int Line(
const int index = 0)
const;
104 int Band(
const int index = 0)
const;
105 void Position(
const int index,
int &i_samp,
int &i_line,
int &i_band)
const;
106 int Index(
const int i_samp,
const int i_line,
const int i_band)
const;
109 double at(
const int index)
const;
119 return (
p_buf[index]);
130 return (
p_buf[index]);
141 void Copy(
const Buffer &in,
bool includeRawBuf =
true);
166 const int start_band);
225 return const_cast<Buffer &
>(rvalue);
int SizeOf(Isis::PixelType pixelType)
Returns the number of bytes of the specified PixelType.
Definition: PixelType.h:46
void SetBaseBand(const int start_band)
This method is used to set the base band position of the shape buffer.
Definition: Buffer.h:193
int SampleDimension() const
Returns the number of samples in the shape buffer.
Definition: Buffer.h:70
void Allocate()
Size or resize the memory buffer.
Definition: Buffer.cpp:340
@ Unknown
A type of error that cannot be classified as any of the other error types.
Definition: IException.h:118
double * DoubleBuffer() const
Returns the value of the shape buffer.
Definition: Buffer.h:138
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.
Definition: Buffer.cpp:197
QString MemoryAllocationFailed()
This error should be used when an error accrues during a memory allocation such as "new".
Definition: MemoryAllocationFailed.cpp:12
Buffer & operator=(const Buffer &rvalue)
Copy operator.
Definition: Buffer.h:224
bool CopyOverlapFrom(const Buffer &in)
Allows copying of the buffer contents of a larger buffer to another same size or smaller Buffer,...
Definition: Buffer.cpp:285
void * RawBuffer() const
Returns a void pointer to the raw buffer.
Definition: Buffer.h:151
void SetBaseLine(const int start_line)
This method is used to set the base line position of the shape buffer.
Definition: Buffer.h:183
Buffer for reading and writing cube data.
Definition: Buffer.h:53
Buffer()
Default constructor for proper initialization purposes.
Definition: Buffer.cpp:25
void Copy(const Buffer &in, bool includeRawBuf=true)
Allows copying of the buffer contents to another Buffer.
Definition: Buffer.cpp:255
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.
Definition: Buffer.cpp:106
Buffer & operator=(const double &d)
Assign the entire buffer to a constant double value.
Definition: Buffer.cpp:89
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
int LineDimension() const
Returns the number of lines in the shape buffer.
Definition: Buffer.h:79
double at(const int index) const
Returns the value in the shape buffer at the given index.
Definition: Buffer.cpp:231
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.
Definition: Buffer.cpp:177
Isis exception class.
Definition: IException.h:91
int p_line
Starting line to read/write.
Definition: Buffer.h:201
int Band(const int index=0) const
Returns the band position associated with a shape buffer index.
Definition: Buffer.cpp:162
PixelType
Enumerations for Isis Pixel Types.
Definition: PixelType.h:27
const Isis::PixelType p_pixelType
The pixel type of the raw buffer.
Definition: Buffer.h:211
void * p_rawbuf
The raw dm read from the disk.
Definition: Buffer.h:212
@ Programmer
This error is for when a programmer made an API call that was illegal.
Definition: IException.h:146
Namespace for the standard library.
int p_nsamps
Number of samples to read/write.
Definition: Buffer.h:199
const double & operator[](const int index) const
Returns the value in the shape buffer at given index.
Definition: Buffer.h:129
int p_band
Starting band to read/write.
Definition: Buffer.h:204
int p_nlines
Number of lines to read/write.
Definition: Buffer.h:202
int size() const
Returns the total number of pixels in the shape buffer.
Definition: Buffer.h:97
double & operator[](const int index)
Returns the value in the shape buffer at given index.
Definition: Buffer.h:118
~Buffer()
Destroys the Buffer object and frees shape buffer.
Definition: Buffer.cpp:68
int p_npixels
Number of pixels (nsamps * nlines * nbands)
Definition: Buffer.h:207
int Sample(const int index=0) const
Returns the sample position associated with a shape buffer index.
Definition: Buffer.cpp:127
void SetBaseSample(const int start_samp)
This method is used to set the base sample position of the shape buffer.
Definition: Buffer.h:173
QString ArraySubscriptNotInRange(int index)
This error should be used when an Isis object or application is checking array bounds and the legal r...
Definition: ArraySubscriptNotInRange.cpp:31
Isis::PixelType PixelType() const
Returns the raw buffer pixel type.
Definition: Buffer.h:160
int Line(const int index=0) const
Returns the line position associated with a shape buffer index.
Definition: Buffer.cpp:145
int p_sample
Starting sample to read/write.
Definition: Buffer.h:198
int BandDimension() const
Returns the number of bands in the shape buffer.
Definition: Buffer.h:88
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
double * p_buf
Shape buffer allocated to the size of npixels for handling reads/writes.
Definition: Buffer.h:208
int p_nbands
Number of bands to read/write.
Definition: Buffer.h:205
@ None
Definition: PixelType.h:28