File failed to load: https://isis.astrogeology.usgs.gov/6.0.0/Object/assets/jax/output/NativeMML/config.js
Isis 3 Programmer Reference
RawCubeChunk.h
1 #ifndef RawCubeChunk_h
2 #define RawCubeChunk_h
3 
8 /* SPDX-License-Identifier: CC0-1.0 */
9 
10 class QByteArray;
11 namespace Isis {
12  class Area3D;
13 
27  class RawCubeChunk {
28  public:
29  RawCubeChunk(const Area3D &placement, int numBytes);
30  RawCubeChunk(int startSample, int startLine, int startBand,
31  int endSample, int endLine, int endBand, int numBytes);
32  virtual ~RawCubeChunk();
33  bool isDirty() const;
34 
38  QByteArray &getRawData() const {
39  return *m_rawBuffer;
40  }
41 
42  void setRawData(QByteArray rawData);
43 
44  unsigned char getChar(int offset) const;
45  short getShort(int offset) const;
46  float getFloat(int offset) const;
47 
48  // The following methods are inlined for proven performance gain.
49 
53  int getStartSample() const {
54  return m_startSample;
55  }
56 
60  int getStartLine() const {
61  return m_startLine;
62  }
63 
67  int getStartBand() const {
68  return m_startBand;
69  }
70 
74  int sampleCount() const {
75  return m_sampleCount;
76  }
77 
81  int lineCount() const {
82  return m_lineCount;
83  }
84 
88  int bandCount() const {
89  return m_bandCount;
90  }
91 
92  int getByteCount() const;
93 
94  void setData(unsigned char value, int offset);
95  void setData(short value, int offset);
96  void setData(const float &value, const int &offset);
97  void setDirty(bool dirty);
98 
99  private:
105  RawCubeChunk(const RawCubeChunk &other);
106 
114 
115  private:
117  bool m_dirty;
118 
120  QByteArray *m_rawBuffer;
123 
130 
137  };
138 }
139 
140 #endif
141 
Isis::RawCubeChunk::setDirty
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...
Definition: RawCubeChunk.cpp:213
Isis::RawCubeChunk
A section of raw data on the disk.
Definition: RawCubeChunk.h:27
Isis::RawCubeChunk::getStartBand
int getStartBand() const
Definition: RawCubeChunk.h:67
Isis::RawCubeChunk::m_dirty
bool m_dirty
True if the data does not match what is on disk.
Definition: RawCubeChunk.h:117
Isis::RawCubeChunk::m_rawBufferInternalPtr
char * m_rawBufferInternalPtr
This is the internal pointer to the raw buffer for performance.
Definition: RawCubeChunk.h:122
Isis::RawCubeChunk::operator=
RawCubeChunk & operator=(const RawCubeChunk &other)
The assignment operator is disabled.
Isis::RawCubeChunk::getStartLine
int getStartLine() const
Definition: RawCubeChunk.h:60
Isis::RawCubeChunk::getFloat
float getFloat(int offset) const
Definition: RawCubeChunk.cpp:145
Isis::RawCubeChunk::m_startBand
int m_startBand
The one-based (inclusive) start band of the cube chunk.
Definition: RawCubeChunk.h:136
Isis::RawCubeChunk::sampleCount
int sampleCount() const
Definition: RawCubeChunk.h:74
Isis::RawCubeChunk::RawCubeChunk
RawCubeChunk(const RawCubeChunk &other)
The copy constructor is disabled.
Isis::RawCubeChunk::isDirty
bool isDirty() const
Definition: RawCubeChunk.cpp:90
Isis::RawCubeChunk::bandCount
int bandCount() const
Definition: RawCubeChunk.h:88
Isis::RawCubeChunk::m_bandCount
int m_bandCount
The number of bands in the cube chunk.
Definition: RawCubeChunk.h:129
Isis::RawCubeChunk::RawCubeChunk
RawCubeChunk(const Area3D &placement, int numBytes)
This constructor creates a new cube chunk based on the provided placement and data size.
Definition: RawCubeChunk.cpp:29
Isis::RawCubeChunk::m_startLine
int m_startLine
The one-based (inclusive) start line of the cube chunk.
Definition: RawCubeChunk.h:134
Isis::RawCubeChunk::getRawData
QByteArray & getRawData() const
Definition: RawCubeChunk.h:38
Isis::RawCubeChunk::m_startSample
int m_startSample
The one-based (inclusive) start sample of the cube chunk.
Definition: RawCubeChunk.h:132
Isis::RawCubeChunk::m_sampleCount
int m_sampleCount
The number of samples in the cube chunk.
Definition: RawCubeChunk.h:125
Isis::RawCubeChunk::getShort
short getShort(int offset) const
Definition: RawCubeChunk.cpp:133
Isis::RawCubeChunk::lineCount
int lineCount() const
Definition: RawCubeChunk.h:81
Isis::RawCubeChunk::m_rawBuffer
QByteArray * m_rawBuffer
This is the raw data to be put on disk.
Definition: RawCubeChunk.h:120
Isis::RawCubeChunk::getByteCount
int getByteCount() const
Definition: RawCubeChunk.cpp:154
Isis::RawCubeChunk::m_lineCount
int m_lineCount
The number of lines in the cube chunk.
Definition: RawCubeChunk.h:127
Isis::RawCubeChunk::~RawCubeChunk
virtual ~RawCubeChunk()
The destructor.
Definition: RawCubeChunk.cpp:78
Isis::RawCubeChunk::setData
void setData(unsigned char value, int offset)
Sets the char at the given offset in the raw data buffer of this chunk.
Definition: RawCubeChunk.cpp:169
Isis::RawCubeChunk::setRawData
void setRawData(QByteArray rawData)
Sets the chunk's raw data.
Definition: RawCubeChunk.cpp:101
Isis::RawCubeChunk::getStartSample
int getStartSample() const
Definition: RawCubeChunk.h:53
Isis::RawCubeChunk::getChar
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 ...
Definition: RawCubeChunk.cpp:121
Isis::Area3D
Represents a 3D area (a 3D "cube")
Definition: Area3D.h:29
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the USGS Astrogeology Discussion Board
To report a bug, or suggest a feature go to: ISIS Github
File Modified: 07/13/2023 15:17:11