![]() |
Isis 3 Developer 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... | |
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.
| 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 |
References Isis::Area3D::getDepth(), Isis::Area3D::getHeight(), Isis::Area3D::getStartX(), Isis::Area3D::getStartY(), Isis::Area3D::getStartZ(), Isis::Area3D::getWidth(), Isis::Displacement::pixels(), Isis::Distance::pixels(), and round.
| 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 |
|
virtual |
The destructor.
|
inline |
| int Isis::RawCubeChunk::getByteCount | ( | ) | const |
Referenced by Isis::CubeTileHandler::readRaw(), Isis::CubeBsqHandler::readRaw(), setData(), Isis::CubeTileHandler::writeRaw(), and Isis::CubeBsqHandler::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 |
| float Isis::RawCubeChunk::getFloat | ( | int | offset | ) | const |
| offset | the offset into the raw data buffer |
|
inline |
Referenced by Isis::CubeTileHandler::writeRaw(), and Isis::CubeBsqHandler::writeRaw().
| short Isis::RawCubeChunk::getShort | ( | int | offset | ) | const |
| offset | the offset into the raw data buffer |
|
inline |
Referenced by Isis::CubeIoHandler::getChunkIndex().
|
inline |
Referenced by Isis::CubeIoHandler::getChunkIndex(), and Isis::BoxcarCachingAlgorithm::recommendChunksToFree().
|
inline |
Referenced by Isis::CubeIoHandler::getChunkIndex().
| bool Isis::RawCubeChunk::isDirty | ( | ) | const |
|
inline |
Referenced by Isis::BoxcarCachingAlgorithm::recommendChunksToFree().
|
inline |
| 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 |
References ASSERT, and getByteCount().
| 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 |
References ASSERT, and getByteCount().
| 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 |
References ASSERT, and getByteCount().
| 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 |
| 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 |
References _FILEINFO_, and Isis::IException::Programmer.
Referenced by Isis::CubeTileHandler::readRaw(), and Isis::CubeBsqHandler::readRaw().