Isis 3 Programmer Reference
|
Handles converting buffers to and from disk. More...
#include <CubeIoHandler.h>
Classes | |
class | BufferToChunkWriter |
This class is designed to handle write() asynchronously. More... | |
Public Member Functions | |
CubeIoHandler (QFile *dataFile, const QList< int > *virtualBandList, const Pvl &label, bool alreadyOnDisk) | |
Creates a new CubeIoHandler using a RegionalCachingAlgorithm. More... | |
virtual | ~CubeIoHandler () |
Cleans up all allocated memory. More... | |
void | read (Buffer &bufferToFill) const |
Read cube data from disk into the buffer. More... | |
void | write (const Buffer &bufferToWrite) |
Write buffer data into the cube data on disk. More... | |
void | addCachingAlgorithm (CubeCachingAlgorithm *algorithm) |
This will add the given caching algorithm to the list of attempted caching algorithms. More... | |
void | clearCache (bool blockForWriteCache=true) const |
Free all cube chunks (cached cube data) from memory and write them to disk. More... | |
BigInt | getDataSize () const |
void | setVirtualBands (const QList< int > *virtualBandList) |
This changes the virtual band list. More... | |
virtual void | updateLabels (Pvl &labels)=0 |
Function to update the labels with a Pvl object. More... | |
QMutex * | dataFileMutex () |
Get the mutex that this IO handler is using around I/Os on the given data file. More... | |
Protected Member Functions | |
int | bandCount () const |
int | getBandCountInChunk () const |
BigInt | getBytesPerChunk () const |
int | getChunkCountInBandDimension () const |
int | getChunkCountInLineDimension () const |
int | getChunkCountInSampleDimension () const |
int | getChunkIndex (const RawCubeChunk &) const |
Given a chunk, what's its index in the file. More... | |
BigInt | getDataStartByte () const |
QFile * | getDataFile () |
int | lineCount () const |
int | getLineCountInChunk () const |
PixelType | pixelType () const |
int | sampleCount () const |
int | getSampleCountInChunk () const |
void | setChunkSizes (int numSamples, int numLines, int numBands) |
This should be called once from the child constructor. More... | |
virtual void | readRaw (RawCubeChunk &chunkToFill)=0 |
This needs to populate the chunkToFill with unswapped raw bytes from the disk. More... | |
virtual void | writeRaw (const RawCubeChunk &chunkToWrite)=0 |
This needs to write the chunkToWrite directly to disk with no modifications to the data itself. More... | |
Private Member Functions | |
CubeIoHandler (const CubeIoHandler &other) | |
Disallow copying of this object. More... | |
CubeIoHandler & | operator= (const CubeIoHandler &other) |
Disallow assignments of this object. More... | |
void | blockUntilThreadPoolEmpty () const |
This blocks (doesn't return) until the number of active runnables in the thread pool goes to 0. More... | |
QPair< QList< RawCubeChunk * >, QList< int > > | findCubeChunks (int startSample, int numSamples, int startLine, int numLines, int startBand, int numBands) const |
Get the cube chunks that correspond to the given cube area. More... | |
void | findIntersection (const RawCubeChunk &cube1, const Buffer &cube2, int &startX, int &startY, int &startZ, int &endX, int &endY, int &endZ) const |
Find the intersection between the buffer area and the cube chunk. More... | |
void | flushWriteCache (bool force=false) const |
This attempts to write the so-far-unwritten buffers from m_writeCache into the cube's RawCubeChunk cache. More... | |
void | freeChunk (RawCubeChunk *chunkToFree) const |
If the chunk is dirty, then we write it to disk. More... | |
RawCubeChunk * | getChunk (int chunkIndex, bool allocateIfNecessary) const |
Retrieve the cached chunk at the given chunk index, if there is one. More... | |
int | getChunkCount () const |
void | getChunkPlacement (int chunkIndex, int &startSample, int &startLine, int &startBand, int &endSample, int &endLine, int &endBand) const |
Get the X/Y/Z (Sample,Line,Band) range of the chunk at the given index. More... | |
RawCubeChunk * | getNullChunk (int chunkIndex) const |
This creates a chunk filled with NULLs whose placement is at chunkIndex's position. More... | |
void | minimizeCache (const QList< RawCubeChunk * > &justUsed, const Buffer &justRequested) const |
Apply the caching algorithms and get rid of excess cube data in memory. More... | |
void | synchronousWrite (const Buffer &bufferToWrite) |
This method takes the given buffer and synchronously puts it into the Cube's cache. More... | |
void | writeIntoDouble (const RawCubeChunk &chunk, Buffer &output, int startIndex) const |
Write the intersecting area of the chunk into the buffer. More... | |
void | writeIntoRaw (const Buffer &buffer, RawCubeChunk &output, int index) const |
Write the intersecting area of the buffer into the chunk. More... | |
void | writeNullDataToDisk () const |
Write all NULL cube chunks that have not yet been accessed to disk. More... | |
Static Private Member Functions | |
static bool | bufferLessThan (Buffer *const &lhs, Buffer *const &rhs) |
This is used for sorting buffers into the most efficient write order. More... | |
Private Attributes | |
QFile * | m_dataFile |
The file containing cube data. More... | |
BigInt | m_startByte |
The start byte of the cube data. More... | |
PixelType | m_pixelType |
The format of each DN in the cube. More... | |
double | m_base |
The additive offset of the data on disk. More... | |
double | m_multiplier |
The multiplicative factor of the data on disk. More... | |
ByteOrder | m_byteOrder |
The byte order (endianness) of the data on disk. More... | |
EndianSwapper * | m_byteSwapper |
A helper that swaps byte order to and from file order. More... | |
int | m_numSamples |
The number of samples in the cube. More... | |
int | m_numLines |
The number of lines in the cube. More... | |
int | m_numBands |
The number of physical bands in the cube. More... | |
QList< CubeCachingAlgorithm * > * | m_cachingAlgorithms |
The caching algorithms to use, in order of priority. More... | |
QMap< int, RawCubeChunk * > * | m_rawData |
The map from chunk index to chunk for cached data. More... | |
QMap< int, bool > * | m_dataIsOnDiskMap |
The map from chunk index to on-disk status, all true if not allocated. More... | |
QList< int > * | m_virtualBands |
Converts from virtual band to physical band. More... | |
int | m_samplesInChunk |
The number of samples in a cube chunk. More... | |
int | m_linesInChunk |
The number of lines in a cube chunk. More... | |
int | m_bandsInChunk |
The number of physical bands in a cube chunk. More... | |
QList< RawCubeChunk * > * | m_lastProcessByLineChunks |
This is an optimization for process by line. More... | |
QByteArray * | m_nullChunkData |
A raw cube chunk's data when it was all NULL's. Used for speed. More... | |
QPair< QMutex *, QList< Buffer * > > * | m_writeCache |
These are the buffers we need to write to raw cube chunks. More... | |
QThreadPool * | m_ioThreadPool |
This contains threads for doing cube writes (and later maybe cube reads). More... | |
bool | m_lastOperationWasWrite |
If the last operation was a write then we need to flush the cache when reading. More... | |
bool | m_useOptimizedCubeWrite |
This is true if the Isis preference for the cube write thread is optimized. More... | |
QMutex * | m_writeThreadMutex |
This enables us to block while the write thread is working. More... | |
volatile int | m_idealFlushSize |
Ideal write cache flush size. More... | |
int | m_consecutiveOverflowCount |
How many times the write cache has overflown in a row. More... | |
Handles converting buffers to and from disk.
This class handles converting buffers to and from disk. This class holds the cube chunks in memory and is capable of reading and writing them. It asks the caching algorithms to recommend cube chunks to not keep in memory. Children need to call setChunkSizes() in their constructor.
This class handles all of the virtual band conversions. This class also guarantees that unwritten cube data ends up read and written as NULLs. The default caching algorithm is a RegionalCachingAlgorithm.
Definition at line 109 of file CubeIoHandler.h.
Isis::CubeIoHandler::CubeIoHandler | ( | QFile * | dataFile, |
const QList< int > * | virtualBandList, | ||
const Pvl & | label, | ||
bool | alreadyOnDisk | ||
) |
Creates a new CubeIoHandler using a RegionalCachingAlgorithm.
The chunk sizes must be set by a child in its constructor.
dataFile | The file that contains cube data. This should be a valid, opened QFile and may not be NULL. The file should have at least read permissions. |
virtualBandList | A list where the indices are the vbands and the values are the physical bands. The values are 1-based. This can be specified as NULL, in which case the vbands are the physical bands. The virtual band list is copied (the pointer provided isn't remembered). |
label | The label which contains the "Pixels" and "Core" groups. |
alreadyOnDisk | True if the cube exists; false ensures all NULLs are initialized into the file before this object is destructed. |
Definition at line 63 of file CubeIoHandler.cpp.
References Isis::IString::DownCase(), Isis::PvlObject::findGroup(), Isis::PvlObject::findKeyword(), Isis::PvlContainer::findKeyword(), Isis::PvlObject::findObject(), and Isis::PixelTypeEnumeration().
|
virtual |
Cleans up all allocated memory.
Child destructors must call clearCache() because we can no longer do IO by the time this destructor is called.
Definition at line 157 of file CubeIoHandler.cpp.
|
private |
Disallow copying of this object.
other | The object to copy. |
void Isis::CubeIoHandler::addCachingAlgorithm | ( | CubeCachingAlgorithm * | algorithm | ) |
This will add the given caching algorithm to the list of attempted caching algorithms.
The algorithms are tried in the opposite order that they were added - the first algorithm added is the last algorithm tried.
This method takes ownership of algorithm.
algorithm | The caching algorithm to add to the Cube for I/O |
Definition at line 368 of file CubeIoHandler.cpp.
|
protected |
Definition at line 466 of file CubeIoHandler.cpp.
|
private |
This blocks (doesn't return) until the number of active runnables in the thread pool goes to 0.
This uses the m_writeThreadMutex, because the thread pool doesn't delete threads immediately, so runnables might actually still exist but are inconsequential/being deleted already.
Definition at line 674 of file CubeIoHandler.cpp.
This is used for sorting buffers into the most efficient write order.
lhs | The left hand side of the '<' operator |
rhs | The right hand side of the '<' operator |
Definition at line 688 of file CubeIoHandler.cpp.
References Isis::Buffer::Band(), Isis::Buffer::BandDimension(), Isis::Area3D::intersect(), Isis::Area3D::isValid(), Isis::Buffer::Line(), Isis::Buffer::LineDimension(), Isis::Buffer::Sample(), and Isis::Buffer::SampleDimension().
void Isis::CubeIoHandler::clearCache | ( | bool | blockForWriteCache = true | ) | const |
Free all cube chunks (cached cube data) from memory and write them to disk.
Child destructors need to call this method.
This method should only be called otherwise when lots of cubes are in memory and the many caches cause problems with system RAM limitations.
blockForWriteCache | This should be true unless this method is called from the write thread. |
Definition at line 383 of file CubeIoHandler.cpp.
Referenced by Isis::CubeBsqHandler::~CubeBsqHandler(), and Isis::CubeTileHandler::~CubeTileHandler().
QMutex * Isis::CubeIoHandler::dataFileMutex | ( | ) |
Get the mutex that this IO handler is using around I/Os on the given data file.
A lock should be acquired before doing any reads/writes on the data file externally.
Definition at line 459 of file CubeIoHandler.cpp.
|
private |
Get the cube chunks that correspond to the given cube area.
This will create and initialize the chunks if they are not already in memory.
startSample | The starting sample of the cube data |
numSamples | The number of samples of cube data |
startLine | The starting line of the cube data |
numLines | The number of lines of cube data |
startBand | The starting band of the cube data |
numBands | The number of bands of cube data |
Cube |
---|
-----— |
| | | <---------— Requested Area | | | | | -----— |
But our cube is split into "chunks" which may not line up to what was requested:
| | | || |------------------—|| | -----— | || |—|---—|-------—|| (User requested area intersected with | | | | | || cube chunks) |------------------—||
| 1 | 2 | 3 || |------------------—|| | 4 | 5 | 6 || |------------------—|| (User requested area intersected with | 7 | 8 | 9 || cube chunks) |------------------—||
(In this case we want chunks 4, 5, 7, and 8)
So we want to find which cube chunks line up to the requested area. To do this, we find which chunk intersects the top left of the requested cube area. That chunk is a given that we need it. Then we search in the positive X direction for more chunks that intersect the user-requested area until we no longer do. Then we know all of the chunks that intersect a whole y-range of the requested area. We shrink the requested area (remove the found y-range) and repeat.
Definition at line 737 of file CubeIoHandler.cpp.
|
private |
Find the intersection between the buffer area and the cube chunk.
This accounts for virtual bands when considering the buffer and may return an area where all of the bands don't actually intersect due to virtual bands. This is implemented the way it is for performance reasons - so much as returning an Area3D or a QList<int> caused undesirable slowdowns.
cube1 | The cube chunk to intersect |
cube2 | The buffer (in virtual band space) to intersect |
startX | (output) The leftmost sample position (inclusive) |
startY | (output) The topmost line position (inclusive) |
startZ | (output) The frontmost band position (inclusive) |
endX | (output) The rightmost sample position (inclusive) |
endY | (output) The bottommost line position (inclusive) |
endZ | (output) The backmost band position (inclusive) |
Definition at line 882 of file CubeIoHandler.cpp.
References Isis::Buffer::Band(), Isis::RawCubeChunk::bandCount(), Isis::Buffer::BandDimension(), Isis::RawCubeChunk::getStartBand(), Isis::RawCubeChunk::getStartLine(), Isis::RawCubeChunk::getStartSample(), Isis::Buffer::Line(), Isis::RawCubeChunk::lineCount(), Isis::Buffer::LineDimension(), Isis::Buffer::Sample(), Isis::RawCubeChunk::sampleCount(), and Isis::Buffer::SampleDimension().
|
private |
This attempts to write the so-far-unwritten buffers from m_writeCache into the cube's RawCubeChunk cache.
This will not do anything if there is a runnable and will block if the write cache grows to be too large.
force | Set to true to force start a flush |
Definition at line 947 of file CubeIoHandler.cpp.
|
private |
If the chunk is dirty, then we write it to disk.
Regardless, we then free it from memory.
chunkToFree | The chunk we're removing from memory |
Definition at line 1024 of file CubeIoHandler.cpp.
References Isis::RawCubeChunk::isDirty().
|
protected |
Definition at line 474 of file CubeIoHandler.cpp.
|
protected |
Definition at line 486 of file CubeIoHandler.cpp.
References Isis::SizeOf().
Referenced by Isis::CubeBsqHandler::getChunkStartByte(), and Isis::CubeTileHandler::getTileStartByte().
|
private |
Retrieve the cached chunk at the given chunk index, if there is one.
chunkIndex | The position of the chunk in the cube |
allocateIfNecessary | If true, the chunk will be read into cache when necessary and this method will not return NULL. |
Definition at line 1052 of file CubeIoHandler.cpp.
References Isis::RawCubeChunk::setDirty().
|
private |
Definition at line 1093 of file CubeIoHandler.cpp.
|
protected |
Definition at line 496 of file CubeIoHandler.cpp.
|
protected |
Definition at line 505 of file CubeIoHandler.cpp.
|
protected |
Definition at line 514 of file CubeIoHandler.cpp.
|
protected |
Given a chunk, what's its index in the file.
Chunks are ordered from left to right, then top to bottom, then front to back (BSQ). The first chunk is at the top left of band 1 and is index 0, for example. In other words, this is going from the value of m_rawData to the key.
Chunks which sit outside of the cube entirely must not be passed into this method; the results will be wrong.
Definition at line 530 of file CubeIoHandler.cpp.
References Isis::RawCubeChunk::getStartBand(), Isis::RawCubeChunk::getStartLine(), and Isis::RawCubeChunk::getStartSample().
Referenced by Isis::CubeBsqHandler::getChunkStartByte(), and Isis::CubeTileHandler::getTileStartByte().
|
private |
Get the X/Y/Z (Sample,Line,Band) range of the chunk at the given index.
chunkIndex | The chunk number in the cube file |
startSample | (output) The leftmost sample position (inclusive) |
startLine | (output) The topmost line position (inclusive) |
startBand | (output) The frontmost band position (inclusive) |
endSample | (output) The rightmost sample position (inclusive) |
endLine | (output) The bottommost line position (inclusive) |
endBand | (output) The backmost band position (inclusive) |
Definition at line 1111 of file CubeIoHandler.cpp.
|
protected |
Definition at line 562 of file CubeIoHandler.cpp.
Referenced by Isis::CubeBsqHandler::readRaw(), Isis::CubeTileHandler::readRaw(), Isis::CubeBsqHandler::writeRaw(), and Isis::CubeTileHandler::writeRaw().
BigInt Isis::CubeIoHandler::getDataSize | ( | ) | const |
Definition at line 425 of file CubeIoHandler.cpp.
|
protected |
Definition at line 551 of file CubeIoHandler.cpp.
Referenced by Isis::CubeBsqHandler::getChunkStartByte(), and Isis::CubeTileHandler::getTileStartByte().
|
protected |
Definition at line 579 of file CubeIoHandler.cpp.
Referenced by Isis::CubeTileHandler::updateLabels().
|
private |
This creates a chunk filled with NULLs whose placement is at chunkIndex's position.
This is used for getting NULL-filled chunks the first time the chunk is requested.
Ownership of the return value is given to the caller.
chunkIndex | The chunk's index which provides it's positioning. |
Definition at line 1143 of file CubeIoHandler.cpp.
References Isis::RawCubeChunk::bandCount(), Isis::RawCubeChunk::getRawData(), Isis::RawCubeChunk::getStartBand(), Isis::RawCubeChunk::getStartLine(), Isis::RawCubeChunk::getStartSample(), Isis::RawCubeChunk::lineCount(), Isis::Null, Isis::RawCubeChunk::sampleCount(), Isis::Brick::SetBasePosition(), Isis::RawCubeChunk::setDirty(), Isis::RawCubeChunk::setRawData(), and Isis::Buffer::size().
|
protected |
Definition at line 604 of file CubeIoHandler.cpp.
Referenced by Isis::CubeTileHandler::updateLabels().
|
protected |
Definition at line 571 of file CubeIoHandler.cpp.
Referenced by Isis::CubeBsqHandler::CubeBsqHandler(), and Isis::CubeTileHandler::CubeTileHandler().
|
private |
Apply the caching algorithms and get rid of excess cube data in memory.
This is intended to be called after every IO operation.
justUsed | The cube chunks that were used in the IO operation that is calling this method. |
justRequested | The buffer that was used in the IO operation that is calling this method. |
Definition at line 1196 of file CubeIoHandler.cpp.
References Isis::CubeCachingAlgorithm::CacheResult::algorithmUnderstoodData(), Isis::CubeCachingAlgorithm::CacheResult::getChunksToFree(), and Isis::CubeCachingAlgorithm::recommendChunksToFree().
|
private |
Disallow assignments of this object.
other | The CubeIoHandler on the right-hand side of the assignment that we are copying into *this. |
|
protected |
Definition at line 587 of file CubeIoHandler.cpp.
Referenced by Isis::CubeBsqHandler::CubeBsqHandler(), and Isis::CubeTileHandler::CubeTileHandler().
void Isis::CubeIoHandler::read | ( | Buffer & | bufferToFill | ) | const |
Read cube data from disk into the buffer.
This is not const because it caches the read cube chunks from the disk.
bufferToFill | The buffer to populate with cube data. |
Definition at line 230 of file CubeIoHandler.cpp.
References Isis::Buffer::Band(), Isis::Buffer::BandDimension(), Isis::Buffer::Line(), Isis::Buffer::LineDimension(), Isis::Null, Isis::Buffer::Sample(), Isis::Buffer::SampleDimension(), and Isis::Buffer::size().
|
protectedpure virtual |
This needs to populate the chunkToFill with unswapped raw bytes from the disk.
chunkToFill | The container that needs to be filled with cube data. |
Implemented in Isis::CubeTileHandler, and Isis::CubeBsqHandler.
|
protected |
Definition at line 596 of file CubeIoHandler.cpp.
Referenced by Isis::CubeBsqHandler::CubeBsqHandler(), and Isis::CubeTileHandler::CubeTileHandler().
|
protected |
This should be called once from the child constructor.
This determines the chunk sizes used for the cube and often should remain constant for a particular cube (BSQ, for example, doesn't need it to be constant but Tile does). These being large can cause excessive use of disk space that stores no cube data. These being large can also drastically increase the amount of RAM consumed.
numSamples | The chunk size in the sample dimension |
numLines | The chunk size in the line dimension |
numBands | The chunk size in the band dimension |
Definition at line 621 of file CubeIoHandler.cpp.
Referenced by Isis::CubeBsqHandler::CubeBsqHandler(), and Isis::CubeTileHandler::CubeTileHandler().
void Isis::CubeIoHandler::setVirtualBands | ( | const QList< int > * | virtualBandList | ) |
This changes the virtual band list.
virtualBandList | A list where the indices are the vbands and the values are the physical bands. The values are 1-based. This can be specified as NULL, in which case the vbands are the physical bands. The virtual band list is copied (the pointer provided isn't remembered). |
Definition at line 442 of file CubeIoHandler.cpp.
|
private |
This method takes the given buffer and synchronously puts it into the Cube's cache.
This includes reading missing cache areas and freeing extra cache areas. This is what the non-threaded CubeIoHandler::write used to do.
bufferToWrite | The buffer we're writing into this cube, synchronously |
Definition at line 1245 of file CubeIoHandler.cpp.
References Isis::Buffer::Band(), Isis::Buffer::BandDimension(), Isis::Buffer::Line(), Isis::Buffer::LineDimension(), Isis::Buffer::Sample(), and Isis::Buffer::SampleDimension().
|
pure virtual |
Function to update the labels with a Pvl object.
labels | Pvl object to update with |
Implemented in Isis::CubeBsqHandler, and Isis::CubeTileHandler.
void Isis::CubeIoHandler::write | ( | const Buffer & | bufferToWrite | ) |
Write buffer data into the cube data on disk.
This could do no IO if the cube chunks required are already in memory and our caching algorithms say to not free any of the cube chunks afterwards.
bufferToWrite | The buffer to get cube data from. |
Definition at line 338 of file CubeIoHandler.cpp.
|
private |
Write the intersecting area of the chunk into the buffer.
chunk | The data source |
output | The data destination |
index | int |
Definition at line 1360 of file CubeIoHandler.cpp.
References Isis::Buffer::Band(), Isis::Buffer::BandDimension(), Isis::Buffer::DoubleBuffer(), Isis::RawCubeChunk::getRawData(), Isis::RawCubeChunk::getStartBand(), Isis::RawCubeChunk::getStartLine(), Isis::RawCubeChunk::getStartSample(), Isis::Buffer::Index(), Isis::RawCubeChunk::lineCount(), Isis::Buffer::RawBuffer(), and Isis::RawCubeChunk::sampleCount().
|
private |
Write the intersecting area of the buffer into the chunk.
buffer | The data source |
output | The data destination |
index | int |
Definition at line 1560 of file CubeIoHandler.cpp.
References Isis::Buffer::Band(), Isis::Buffer::BandDimension(), Isis::Buffer::DoubleBuffer(), Isis::RawCubeChunk::getRawData(), Isis::RawCubeChunk::getStartBand(), Isis::RawCubeChunk::getStartLine(), Isis::RawCubeChunk::getStartSample(), Isis::Buffer::Index(), Isis::RawCubeChunk::lineCount(), Isis::RawCubeChunk::sampleCount(), and Isis::RawCubeChunk::setDirty().
|
private |
Write all NULL cube chunks that have not yet been accessed to disk.
Definition at line 1839 of file CubeIoHandler.cpp.
|
protectedpure virtual |
This needs to write the chunkToWrite directly to disk with no modifications to the data itself.
chunkToWrite | The container that needs to be put on disk. |
Implemented in Isis::CubeTileHandler, and Isis::CubeBsqHandler.
|
private |
The number of physical bands in a cube chunk.
Definition at line 323 of file CubeIoHandler.h.
|
private |
The additive offset of the data on disk.
Definition at line 284 of file CubeIoHandler.h.
|
private |
The byte order (endianness) of the data on disk.
Definition at line 290 of file CubeIoHandler.h.
|
private |
A helper that swaps byte order to and from file order.
Definition at line 293 of file CubeIoHandler.h.
|
private |
The caching algorithms to use, in order of priority.
Definition at line 305 of file CubeIoHandler.h.
|
mutableprivate |
How many times the write cache has overflown in a row.
Definition at line 362 of file CubeIoHandler.h.
|
private |
The file containing cube data.
Definition at line 271 of file CubeIoHandler.h.
|
mutableprivate |
The map from chunk index to on-disk status, all true if not allocated.
Definition at line 311 of file CubeIoHandler.h.
|
mutableprivate |
Ideal write cache flush size.
Definition at line 359 of file CubeIoHandler.h.
|
mutableprivate |
This contains threads for doing cube writes (and later maybe cube reads).
We're using a thread pool so that the same QThread is reused for performance reasons.
Definition at line 342 of file CubeIoHandler.h.
|
mutableprivate |
If the last operation was a write then we need to flush the cache when reading.
Keep track of this.
Definition at line 348 of file CubeIoHandler.h.
|
mutableprivate |
This is an optimization for process by line.
It relies on chunks found often being the exact same between multiple reads or multiple writes.
Definition at line 329 of file CubeIoHandler.h.
|
private |
The number of lines in a cube chunk.
Definition at line 320 of file CubeIoHandler.h.
|
private |
The multiplicative factor of the data on disk.
Definition at line 287 of file CubeIoHandler.h.
|
mutableprivate |
A raw cube chunk's data when it was all NULL's. Used for speed.
Definition at line 332 of file CubeIoHandler.h.
|
private |
The number of physical bands in the cube.
Definition at line 302 of file CubeIoHandler.h.
|
private |
The number of lines in the cube.
Definition at line 299 of file CubeIoHandler.h.
|
private |
The number of samples in the cube.
Definition at line 296 of file CubeIoHandler.h.
|
private |
The format of each DN in the cube.
Definition at line 281 of file CubeIoHandler.h.
|
mutableprivate |
The map from chunk index to chunk for cached data.
Definition at line 308 of file CubeIoHandler.h.
|
private |
The number of samples in a cube chunk.
Definition at line 317 of file CubeIoHandler.h.
|
private |
The start byte of the cube data.
This is 0-based (i.e. a value of 0 means write data into the first byte of the file). Usually the label is between 0 and m_startByte.
Definition at line 278 of file CubeIoHandler.h.
|
private |
This is true if the Isis preference for the cube write thread is optimized.
Definition at line 353 of file CubeIoHandler.h.
|
private |
Converts from virtual band to physical band.
Definition at line 314 of file CubeIoHandler.h.
These are the buffers we need to write to raw cube chunks.
Definition at line 335 of file CubeIoHandler.h.
|
private |
This enables us to block while the write thread is working.
Definition at line 356 of file CubeIoHandler.h.