48 CubeTileHandler::CubeTileHandler(QFile * dataFile,
49 const QList<int> *virtualBandList,
const Pvl &labels,
bool alreadyOnDisk)
50 :
CubeIoHandler(dataFile, virtualBandList, labels, alreadyOnDisk) {
85 PvlContainer::Replace);
87 PvlContainer::Replace);
89 PvlContainer::Replace);
99 if(dataFile->seek(startByte)) {
100 QByteArray binaryData = dataFile->read(chunkToFill.
getByteCount());
109 IString msg =
"Reading from the file [" + dataFile->fileName() +
"] "
110 "failed with reading [" +
112 "] bytes at position [" + QString::number(startByte) +
"]";
120 bool success =
false;
123 if(dataFile->seek(startByte)) {
124 BigInt dataWritten = dataFile->write(chunkToWrite.
getRawData());
132 IString msg =
"Writing to the file [" + dataFile->fileName() +
"] "
133 "failed with writing [" +
135 "] bytes at position [" + QString::number(startByte) +
"]";
154 if(dimensionSize <= maxSize) {
155 ideal = dimensionSize;
158 int greatestDividend = maxSize;
160 while(greatestDividend > ideal) {
161 if(dimensionSize % greatestDividend == 0) {
162 ideal = greatestDividend;