File failed to load: https://isis.astrogeology.usgs.gov/6.0.0/Object/assets/jax/output/NativeMML/config.js
 |
Isis Developer Reference
|
Go to the documentation of this file.
8 #ifndef CubeIoHandler_h
9 #define CubeIoHandler_h
12 #include <QThreadPool>
21 template <
typename A>
class QList;
22 template <
typename A,
typename B>
class QMap;
23 template <
typename A,
typename B>
struct QPair;
27 class CubeCachingAlgorithm;
112 const Pvl &label,
bool alreadyOnDisk);
119 void clearCache(
bool blockForWriteCache =
true)
const;
147 void setChunkSizes(
int numSamples,
int numLines,
int numBands);
185 class BufferToChunkWriter :
public QRunnable {
189 ~BufferToChunkWriter();
198 BufferToChunkWriter(
const BufferToChunkWriter & other);
204 BufferToChunkWriter & operator=(
const BufferToChunkWriter & rhs);
232 void blockUntilThreadPoolEmpty()
const;
234 static bool bufferLessThan(
Buffer *
const &lhs,
Buffer *
const &rhs);
237 int startLine,
int numLines,
238 int startBand,
int numBands)
const;
241 const Buffer &cube2,
int &startX,
int &startY,
int &startZ,
242 int &endX,
int &endY,
int &endZ)
const;
244 void flushWriteCache(
bool force =
false)
const;
248 RawCubeChunk *getChunk(
int chunkIndex,
bool allocateIfNecessary)
const;
250 int getChunkCount()
const;
252 void getChunkPlacement(
int chunkIndex,
253 int &startSample,
int &startLine,
int &startBand,
254 int &endSample,
int &endLine,
int &endBand)
const;
259 const Buffer &justRequested)
const;
261 void synchronousWrite(
const Buffer &bufferToWrite);
263 void writeIntoDouble(
const RawCubeChunk &chunk,
Buffer &output,
int startIndex)
const;
267 void writeNullDataToDisk()
const;
317 int m_samplesInChunk;
332 mutable QByteArray *m_nullChunkData;
342 mutable QThreadPool *m_ioThreadPool;
348 mutable bool m_lastOperationWasWrite;
353 bool m_useOptimizedCubeWrite;
356 QMutex *m_writeThreadMutex;
359 mutable volatile int m_idealFlushSize;
362 mutable int m_consecutiveOverflowCount;
int SizeOf(Isis::PixelType pixelType)
Returns the number of bytes of the specified PixelType.
Definition: PixelType.h:46
A section of raw data on the disk.
Definition: RawCubeChunk.h:27
int getStartBand() const
Definition: RawCubeChunk.h:67
const short LOW_INSTR_SAT2
Definition: SpecialPixel.h:156
void addCachingAlgorithm(CubeCachingAlgorithm *algorithm)
This will add the given caching algorithm to the list of attempted caching algorithms.
Definition: CubeIoHandler.cpp:368
PvlGroupIterator findGroup(const QString &name, PvlGroupIterator beg, PvlGroupIterator end)
Find a group with the specified name, within these indexes.
Definition: PvlObject.h:129
int SampleDimension() const
Returns the number of samples in the shape buffer.
Definition: Buffer.h:70
const float VALID_MAX4
Definition: SpecialPixel.h:149
Contains Pvl Groups and Pvl Objects.
Definition: PvlObject.h:61
IString DownCase()
Converts all upper case letters in the object IString into lower case characters.
Definition: IString.cpp:644
int getStartLine() const
Definition: RawCubeChunk.h:60
const unsigned short LOW_INSTR_SATU2
Definition: SpecialPixel.h:165
int sampleCount() const
Definition: CubeIoHandler.cpp:596
int getBandCountInChunk() const
Definition: CubeIoHandler.cpp:474
const unsigned short HIGH_REPR_SATU2
Definition: SpecialPixel.h:167
const float LOW_REPR_SAT4
Definition: SpecialPixel.h:137
virtual void updateLabels(Pvl &labels)=0
Function to update the labels with a Pvl object.
PixelType pixelType() const
Definition: CubeIoHandler.cpp:587
const float LOW_INSTR_SAT4
Definition: SpecialPixel.h:140
const unsigned int HIGH_REPR_SATUI4
Definition: SpecialPixel.h:176
BigInt getBytesPerChunk() const
Definition: CubeIoHandler.cpp:486
const unsigned char VALID_MIN1
Definition: SpecialPixel.h:181
void setVirtualBands(const QList< int > *virtualBandList)
This changes the virtual band list.
Definition: CubeIoHandler.cpp:442
@ UnsignedWord
Definition: PixelType.h:31
This algorithm recommends chunks to be freed that are not within the last IO.
Definition: RegionalCachingAlgorithm.h:26
Container for cube-like labels.
Definition: Pvl.h:119
const unsigned char NULL1
Definition: SpecialPixel.h:182
QFile * getDataFile()
Definition: CubeIoHandler.cpp:562
@ SignedWord
Definition: PixelType.h:32
const unsigned char LOW_INSTR_SAT1
Definition: SpecialPixel.h:184
const unsigned short LOW_REPR_SATU2
Definition: SpecialPixel.h:164
const double HIGH_REPR_SAT8
Definition: SpecialPixel.h:116
int getSampleCountInChunk() const
Definition: CubeIoHandler.cpp:604
ByteOrder
Tests the current architecture for byte order.
Definition: Endian.h:42
Buffer for reading and writing cube data.
Definition: Buffer.h:53
CubeIoHandler(QFile *dataFile, const QList< int > *virtualBandList, const Pvl &label, bool alreadyOnDisk)
Creates a new CubeIoHandler using a RegionalCachingAlgorithm.
Definition: CubeIoHandler.cpp:63
const short VALID_MAX2
Definition: SpecialPixel.h:159
const unsigned char LOW_REPR_SAT1
Definition: SpecialPixel.h:183
int lineCount() const
Definition: CubeIoHandler.cpp:571
const short VALID_MIN2
Definition: SpecialPixel.h:153
Contains multiple PvlContainers.
Definition: PvlGroup.h:41
BigInt getDataStartByte() const
Definition: CubeIoHandler.cpp:551
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
virtual ~CubeIoHandler()
Cleans up all allocated memory.
Definition: CubeIoHandler.cpp:157
const float HIGH_REPR_SAT4
Definition: SpecialPixel.h:146
int getChunkCountInBandDimension() const
Definition: CubeIoHandler.cpp:496
const double VALID_MIN8
Definition: SpecialPixel.h:86
const unsigned char HIGH_INSTR_SAT1
Definition: SpecialPixel.h:185
QMutex * dataFileMutex()
Get the mutex that this IO handler is using around I/Os on the given data file.
Definition: CubeIoHandler.cpp:459
This is the parent of the caching algorithms.
Definition: CubeCachingAlgorithm.h:31
const short HIGH_REPR_SAT2
Definition: SpecialPixel.h:158
int LineDimension() const
Returns the number of lines in the shape buffer.
Definition: Buffer.h:79
Handles converting buffers to and from disk.
Definition: CubeIoHandler.h:109
const double NULL8
Definition: SpecialPixel.h:94
long long int BigInt
Big int.
Definition: Constants.h:49
PvlObjectIterator findObject(const QString &name, PvlObjectIterator beg, PvlObjectIterator end)
Find the index of object with a specified name, between two indexes.
Definition: PvlObject.h:274
const short HIGH_INSTR_SAT2
Definition: SpecialPixel.h:157
const double HIGH_INSTR_SAT8
Definition: SpecialPixel.h:110
int getChunkIndex(const RawCubeChunk &) const
Given a chunk, what's its index in the file.
Definition: CubeIoHandler.cpp:530
const float HIGH_INSTR_SAT4
Definition: SpecialPixel.h:143
virtual void writeRaw(const RawCubeChunk &chunkToWrite)=0
This needs to write the chunkToWrite directly to disk with no modifications to the data itself.
const short NULL2
Definition: SpecialPixel.h:154
Isis exception class.
Definition: IException.h:91
#define ASSERT(x)
Definition: IsisDebug.h:134
int getStartSample() const
Definition: RawCubeChunk.h:53
const unsigned short NULLU2
Definition: SpecialPixel.h:163
const unsigned int VALID_MINUI4
Definition: SpecialPixel.h:171
#define round(x)
This is free and unencumbered software released into the public domain.
Definition: ViewportBuffer.cpp:29
const double Null
Value for an Isis Null pixel.
Definition: SpecialPixel.h:95
const unsigned short VALID_MAXU2
Definition: SpecialPixel.h:168
int bandCount() const
Definition: CubeIoHandler.cpp:466
int getChunkCountInSampleDimension() const
Definition: CubeIoHandler.cpp:514
const unsigned int VALID_MAXUI4
Definition: SpecialPixel.h:177
const unsigned int HIGH_INSTR_SATUI4
Definition: SpecialPixel.h:175
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 unsigned int LOW_INSTR_SATUI4
Definition: SpecialPixel.h:174
void read(Buffer &bufferToFill) const
Read cube data from disk into the buffer.
Definition: CubeIoHandler.cpp:230
@ UnsignedInteger
Definition: PixelType.h:33
Namespace for the standard library.
const unsigned int LOW_REPR_SATUI4
Definition: SpecialPixel.h:173
const float NULL4
Definition: SpecialPixel.h:134
This is free and unencumbered software released into the public domain.
Definition: CubeIoHandler.h:23
const float VALID_MIN4
Definition: SpecialPixel.h:130
Byte swapper.
Definition: EndianSwapper.h:38
const unsigned short HIGH_INSTR_SATU2
Definition: SpecialPixel.h:166
void clearCache(bool blockForWriteCache=true) const
Free all cube chunks (cached cube data) from memory and write them to disk.
Definition: CubeIoHandler.cpp:383
const unsigned short VALID_MINU2
Definition: SpecialPixel.h:162
Isis::PixelType PixelTypeEnumeration(const QString &type)
Returns PixelType enumeration given a string.
Definition: PixelType.h:89
void write(const Buffer &bufferToWrite)
Write buffer data into the cube data on disk.
Definition: CubeIoHandler.cpp:338
This is free and unencumbered software released into the public domain.
Definition: CubeIoHandler.h:22
const unsigned char VALID_MAX1
Definition: SpecialPixel.h:187
int size() const
Returns the total number of pixels in the shape buffer.
Definition: Buffer.h:97
int getChunkCountInLineDimension() const
Definition: CubeIoHandler.cpp:505
PvlKeyword & findKeyword(const QString &kname, FindOptions opts)
Finds a keyword in the current PvlObject, or deeper inside other PvlObjects and Pvlgroups within this...
Definition: PvlObject.cpp:177
Adds specific functionality to C++ strings.
Definition: IString.h:165
PvlKeyword & findKeyword(const QString &name)
Find a keyword with a specified name.
Definition: PvlContainer.cpp:62
const double LOW_REPR_SAT8
Definition: SpecialPixel.h:98
void setChunkSizes(int numSamples, int numLines, int numBands)
This should be called once from the child constructor.
Definition: CubeIoHandler.cpp:621
const unsigned char HIGH_REPR_SAT1
Definition: SpecialPixel.h:186
int Sample(const int index=0) const
Returns the sample position associated with a shape buffer index.
Definition: Buffer.cpp:127
const double LOW_INSTR_SAT8
Definition: SpecialPixel.h:104
@ UnsignedByte
Definition: PixelType.h:29
virtual void readRaw(RawCubeChunk &chunkToFill)=0
This needs to populate the chunkToFill with unswapped raw bytes from the disk.
const unsigned int NULLUI4
Definition: SpecialPixel.h:172
const short LOW_REPR_SAT2
Definition: SpecialPixel.h:155
int Line(const int index=0) const
Returns the line position associated with a shape buffer index.
Definition: Buffer.cpp:145
int getLineCountInChunk() const
Definition: CubeIoHandler.cpp:579
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
BigInt getDataSize() const
Definition: CubeIoHandler.cpp:425
@ Real
Definition: PixelType.h:35