Isis 3 Programmer Reference
|
A section of raw data on the disk. More...
#include <RawCubeChunk.h>
Public Member Functions | |
RawCubeChunk (const Area3D &placement, int numBytes) | |
This constructor creates a new cube chunk based on the provided placement and data size. More... | |
RawCubeChunk (int startSample, int startLine, int startBand, int endSample, int endLine, int endBand, int numBytes) | |
This constructor creates a new cube chunk based on the provided coordinates and data size. More... | |
virtual | ~RawCubeChunk () |
The destructor. More... | |
bool | isDirty () const |
QByteArray & | getRawData () const |
void | setRawData (QByteArray rawData) |
Sets the chunk's raw data. More... | |
unsigned char | getChar (int offset) const |
This method is currently not in use due to a faster way of getting data from the buffer (through the internal pointer). More... | |
short | getShort (int offset) const |
float | getFloat (int offset) const |
int | getStartSample () const |
int | getStartLine () const |
int | getStartBand () const |
int | sampleCount () const |
int | lineCount () const |
int | bandCount () const |
int | getByteCount () const |
void | setData (unsigned char value, int offset) |
Sets the char at the given offset in the raw data buffer of this chunk. More... | |
void | setData (short value, int offset) |
Sets the short at the given offset in the raw data buffer of this chunk. More... | |
void | setData (const float &value, const int &offset) |
Sets the float at the given offset in the raw data buffer of this chunk. More... | |
void | setDirty (bool dirty) |
Sets the chunk's dirty flag, indicating whether or not the chunk's data matches the data that is on disk. More... | |
Private Member Functions | |
RawCubeChunk (const RawCubeChunk &other) | |
The copy constructor is disabled. More... | |
RawCubeChunk & | operator= (const RawCubeChunk &other) |
The assignment operator is disabled. More... | |
Private Attributes | |
bool | m_dirty |
True if the data does not match what is on disk. More... | |
QByteArray * | m_rawBuffer |
This is the raw data to be put on disk. More... | |
char * | m_rawBufferInternalPtr |
This is the internal pointer to the raw buffer for performance. More... | |
int | m_sampleCount |
The number of samples in the cube chunk. More... | |
int | m_lineCount |
The number of lines in the cube chunk. More... | |
int | m_bandCount |
The number of bands in the cube chunk. More... | |
int | m_startSample |
The one-based (inclusive) start sample of the cube chunk. More... | |
int | m_startLine |
The one-based (inclusive) start line of the cube chunk. More... | |
int | m_startBand |
The one-based (inclusive) start band of the cube chunk. More... | |
A section of raw data on the disk.
This encapsulates a chunk's data. The data stored in this class is literally what is stored on disk - an unswapped byte array. These should only be used by CubeIoHandler and it's children to manage what is in memory versus what is on disk.
Definition at line 27 of file RawCubeChunk.h.
Isis::RawCubeChunk::RawCubeChunk | ( | const Area3D & | placement, |
int | numBytes | ||
) |
This constructor creates a new cube chunk based on the provided placement and data size.
placement | the 3D "cube" that this chunk will cover (inclusive) |
numBytes | the number of raw data bytes in the chunk |
Definition at line 29 of file RawCubeChunk.cpp.
References Isis::Area3D::getDepth(), Isis::Area3D::getHeight(), Isis::Area3D::getStartX(), Isis::Area3D::getStartY(), Isis::Area3D::getStartZ(), Isis::Area3D::getWidth(), m_bandCount, m_dirty, m_lineCount, m_rawBuffer, m_rawBufferInternalPtr, m_sampleCount, m_startBand, m_startLine, m_startSample, Isis::Displacement::pixels(), and Isis::Distance::pixels().
Isis::RawCubeChunk::RawCubeChunk | ( | int | startSample, |
int | startLine, | ||
int | startBand, | ||
int | endSample, | ||
int | endLine, | ||
int | endBand, | ||
int | numBytes | ||
) |
This constructor creates a new cube chunk based on the provided coordinates and data size.
This constructor is provided in addition to the previous one for performance gain.
startSample | the starting sample of the chunk (inclusive) |
startLine | the starting line of the chunk (inclusive) |
startBand | the starting band of the chunk (inclusive) |
endSample | the ending sample of the chunk (inclusive) |
endLine | the ending line of the chunk (inclusive) |
endBand | the ending band of the chunk (inclusive) |
numBytes | the number of raw data bytes in the chunk |
Definition at line 57 of file RawCubeChunk.cpp.
References m_bandCount, m_dirty, m_lineCount, m_rawBuffer, m_rawBufferInternalPtr, m_sampleCount, m_startBand, m_startLine, and m_startSample.
|
virtual |
The destructor.
Definition at line 78 of file RawCubeChunk.cpp.
References m_rawBuffer, and m_rawBufferInternalPtr.
|
private |
The copy constructor is disabled.
other | the other chunk to be copied from |
|
inline |
Definition at line 88 of file RawCubeChunk.h.
References m_bandCount.
Referenced by Isis::CubeIoHandler::findIntersection(), and Isis::CubeIoHandler::getNullChunk().
int Isis::RawCubeChunk::getByteCount | ( | ) | const |
Definition at line 154 of file RawCubeChunk.cpp.
References m_rawBuffer.
Referenced by Isis::CubeBsqHandler::readRaw(), Isis::CubeTileHandler::readRaw(), setData(), Isis::CubeBsqHandler::writeRaw(), and Isis::CubeTileHandler::writeRaw().
unsigned char Isis::RawCubeChunk::getChar | ( | int | offset | ) | const |
This method is currently not in use due to a faster way of getting data from the buffer (through the internal pointer).
offset | the offset into the raw data buffer |
Definition at line 121 of file RawCubeChunk.cpp.
References m_rawBuffer.
float Isis::RawCubeChunk::getFloat | ( | int | offset | ) | const |
offset | the offset into the raw data buffer |
Definition at line 145 of file RawCubeChunk.cpp.
References m_rawBuffer.
|
inline |
Definition at line 38 of file RawCubeChunk.h.
References m_rawBuffer.
Referenced by Isis::CubeIoHandler::getNullChunk(), Isis::CubeIoHandler::writeIntoDouble(), Isis::CubeIoHandler::writeIntoRaw(), Isis::CubeBsqHandler::writeRaw(), and Isis::CubeTileHandler::writeRaw().
short Isis::RawCubeChunk::getShort | ( | int | offset | ) | const |
offset | the offset into the raw data buffer |
Definition at line 133 of file RawCubeChunk.cpp.
References m_rawBuffer.
|
inline |
Definition at line 67 of file RawCubeChunk.h.
References m_startBand.
Referenced by Isis::CubeIoHandler::findIntersection(), Isis::CubeIoHandler::getChunkIndex(), Isis::CubeIoHandler::getNullChunk(), Isis::CubeIoHandler::writeIntoDouble(), and Isis::CubeIoHandler::writeIntoRaw().
|
inline |
Definition at line 60 of file RawCubeChunk.h.
References m_startLine.
Referenced by Isis::CubeIoHandler::findIntersection(), Isis::CubeIoHandler::getChunkIndex(), Isis::CubeIoHandler::getNullChunk(), Isis::BoxcarCachingAlgorithm::recommendChunksToFree(), Isis::CubeIoHandler::writeIntoDouble(), and Isis::CubeIoHandler::writeIntoRaw().
|
inline |
Definition at line 53 of file RawCubeChunk.h.
References m_startSample.
Referenced by Isis::CubeIoHandler::findIntersection(), Isis::CubeIoHandler::getChunkIndex(), Isis::CubeIoHandler::getNullChunk(), Isis::CubeIoHandler::writeIntoDouble(), and Isis::CubeIoHandler::writeIntoRaw().
bool Isis::RawCubeChunk::isDirty | ( | ) | const |
Definition at line 90 of file RawCubeChunk.cpp.
References m_dirty.
Referenced by Isis::CubeIoHandler::freeChunk().
|
inline |
Definition at line 81 of file RawCubeChunk.h.
References m_lineCount.
Referenced by Isis::CubeIoHandler::findIntersection(), Isis::CubeIoHandler::getNullChunk(), Isis::BoxcarCachingAlgorithm::recommendChunksToFree(), Isis::CubeIoHandler::writeIntoDouble(), and Isis::CubeIoHandler::writeIntoRaw().
|
private |
The assignment operator is disabled.
other | the other chunk to be copied from |
|
inline |
Definition at line 74 of file RawCubeChunk.h.
References m_sampleCount.
Referenced by Isis::CubeIoHandler::findIntersection(), Isis::CubeIoHandler::getNullChunk(), Isis::CubeIoHandler::writeIntoDouble(), and Isis::CubeIoHandler::writeIntoRaw().
void Isis::RawCubeChunk::setData | ( | const float & | value, |
const int & | offset | ||
) |
Sets the float at the given offset in the raw data buffer of this chunk.
The chunk's dirty flag is set to true.
value | the new float value |
offset | the position to place the new value at |
Definition at line 199 of file RawCubeChunk.cpp.
References getByteCount(), m_dirty, and m_rawBufferInternalPtr.
void Isis::RawCubeChunk::setData | ( | short | value, |
int | offset | ||
) |
Sets the short at the given offset in the raw data buffer of this chunk.
The chunk's dirty flag is set to true.
value | the new short value |
offset | the position to place the new value at |
Definition at line 184 of file RawCubeChunk.cpp.
References getByteCount(), m_dirty, and m_rawBufferInternalPtr.
void Isis::RawCubeChunk::setData | ( | unsigned char | value, |
int | offset | ||
) |
Sets the char at the given offset in the raw data buffer of this chunk.
The chunk's dirty flag is set to true.
value | the new char value |
offset | the position to place the new value at |
Definition at line 169 of file RawCubeChunk.cpp.
References getByteCount(), m_dirty, and m_rawBufferInternalPtr.
void Isis::RawCubeChunk::setDirty | ( | bool | dirty | ) |
Sets the chunk's dirty flag, indicating whether or not the chunk's data matches the data that is on disk.
dirty | bool indicating whether the chunk is dirty or not |
Definition at line 213 of file RawCubeChunk.cpp.
References m_dirty.
Referenced by Isis::CubeIoHandler::getChunk(), Isis::CubeIoHandler::getNullChunk(), and Isis::CubeIoHandler::writeIntoRaw().
void Isis::RawCubeChunk::setRawData | ( | QByteArray | rawData | ) |
Sets the chunk's raw data.
This size of the new raw data must match that of the chunk's current raw data buffer.
rawData | the raw data |
Definition at line 101 of file RawCubeChunk.cpp.
References m_dirty, m_rawBuffer, m_rawBufferInternalPtr, and Isis::IException::Programmer.
Referenced by Isis::CubeIoHandler::getNullChunk(), Isis::CubeBsqHandler::readRaw(), and Isis::CubeTileHandler::readRaw().
|
private |
The number of bands in the cube chunk.
Definition at line 129 of file RawCubeChunk.h.
Referenced by bandCount(), and RawCubeChunk().
|
private |
True if the data does not match what is on disk.
Definition at line 117 of file RawCubeChunk.h.
Referenced by isDirty(), RawCubeChunk(), setData(), setDirty(), and setRawData().
|
private |
The number of lines in the cube chunk.
Definition at line 127 of file RawCubeChunk.h.
Referenced by lineCount(), and RawCubeChunk().
|
private |
This is the raw data to be put on disk.
Definition at line 120 of file RawCubeChunk.h.
Referenced by getByteCount(), getChar(), getFloat(), getRawData(), getShort(), RawCubeChunk(), setRawData(), and ~RawCubeChunk().
|
private |
This is the internal pointer to the raw buffer for performance.
Definition at line 122 of file RawCubeChunk.h.
Referenced by RawCubeChunk(), setData(), setRawData(), and ~RawCubeChunk().
|
private |
The number of samples in the cube chunk.
Definition at line 125 of file RawCubeChunk.h.
Referenced by RawCubeChunk(), and sampleCount().
|
private |
The one-based (inclusive) start band of the cube chunk.
Definition at line 136 of file RawCubeChunk.h.
Referenced by getStartBand(), and RawCubeChunk().
|
private |
The one-based (inclusive) start line of the cube chunk.
Definition at line 134 of file RawCubeChunk.h.
Referenced by getStartLine(), and RawCubeChunk().
|
private |
The one-based (inclusive) start sample of the cube chunk.
Definition at line 132 of file RawCubeChunk.h.
Referenced by getStartSample(), and RawCubeChunk().