7#include "RawCubeChunk.h"
15#include "Displacement.h"
17#include "IException.h"
34 m_sampleCount = (int)round(placement.getWidth().pixels()) + 1;
35 m_lineCount = (int)round(placement.getHeight().pixels()) + 1;
36 m_bandCount = (int)round(placement.getDepth().pixels()) + 1;
39 m_startLine = (int)round(placement.getStartY().pixels());
40 m_startBand = (int)round(placement.getStartZ().pixels());
57 int endSample,
int endLine,
int endBand,
102 IString msg =
"Cannot set raw data on a RawCubeChunk with a differently "
121 return ((
unsigned char *)
m_rawBuffer->data())[offset];
Represents a 3D area (a 3D "cube")
@ Programmer
This error is for when a programmer made an API call that was illegal.
Adds specific functionality to C++ strings.
int m_lineCount
The number of lines in the cube chunk.
short getShort(int offset) const
QByteArray * m_rawBuffer
This is the raw data to be put on disk.
int m_startBand
The one-based (inclusive) start band of the cube chunk.
bool m_dirty
True if the data does not match what is on disk.
void setData(unsigned char value, int offset)
Sets the char at the given offset in the raw data buffer of this chunk.
void setDirty(bool dirty)
Sets the chunk's dirty flag, indicating whether or not the chunk's data matches the data that is on d...
int m_startLine
The one-based (inclusive) start line of the cube chunk.
char * m_rawBufferInternalPtr
This is the internal pointer to the raw buffer for performance.
int m_bandCount
The number of bands in the cube chunk.
void setRawData(QByteArray rawData)
Sets the chunk's raw data.
RawCubeChunk(const Area3D &placement, int numBytes)
This constructor creates a new cube chunk based on the provided placement and data size.
int m_startSample
The one-based (inclusive) start sample of the cube chunk.
int m_sampleCount
The number of samples in the cube chunk.
float getFloat(int offset) const
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 ...
virtual ~RawCubeChunk()
The destructor.
This is free and unencumbered software released into the public domain.