Isis Developer Reference
CubeBsqHandler.h
Go to the documentation of this file.
1 #ifndef CubeBsqHandler_h
2 #define CubeBsqHandler_h
3 
8 /* SPDX-License-Identifier: CC0-1.0 */
9 
10 #include "CubeIoHandler.h"
11 
12 namespace Isis {
41  class CubeBsqHandler : public CubeIoHandler {
42  public:
43  CubeBsqHandler(QFile * dataFile, const QList<int> *virtualBandList,
44  const Pvl &label, bool alreadyOnDisk);
46 
47  void updateLabels(Pvl &labels);
48 
49  protected:
50  virtual void readRaw(RawCubeChunk &chunkToFill);
51  virtual void writeRaw(const RawCubeChunk &chunkToWrite);
52 
53  private:
59  CubeBsqHandler(const CubeBsqHandler &other);
60 
68  CubeBsqHandler &operator=(const CubeBsqHandler &other);
69 
70  int findGoodSize(int maxSize, int dimensionSize) const;
71  BigInt getChunkStartByte(const RawCubeChunk &chunk) const;
72  };
73 }
74 
75 #endif
Isis::SizeOf
int SizeOf(Isis::PixelType pixelType)
Returns the number of bytes of the specified PixelType.
Definition: PixelType.h:46
Isis::RawCubeChunk
A section of raw data on the disk.
Definition: RawCubeChunk.h:27
Isis::IException::Io
@ Io
A type of error that occurred when performing an actual I/O operation.
Definition: IException.h:155
Isis::PvlObject
Contains Pvl Groups and Pvl Objects.
Definition: PvlObject.h:61
Isis::PvlKeyword
A single keyword-value pair.
Definition: PvlKeyword.h:82
QList< int >
Isis::CubeIoHandler::sampleCount
int sampleCount() const
Definition: CubeIoHandler.cpp:596
Isis::CubeIoHandler::pixelType
PixelType pixelType() const
Definition: CubeIoHandler.cpp:587
Isis::PvlContainer::addKeyword
void addKeyword(const PvlKeyword &keyword, const InsertMode mode=Append)
Add a keyword to the container.
Definition: PvlContainer.cpp:202
Isis::CubeIoHandler::getBytesPerChunk
BigInt getBytesPerChunk() const
Definition: CubeIoHandler.cpp:486
Isis::Pvl
Container for cube-like labels.
Definition: Pvl.h:119
Isis::RawCubeChunk::getRawData
QByteArray & getRawData() const
Definition: RawCubeChunk.h:38
Isis::CubeIoHandler::getDataFile
QFile * getDataFile()
Definition: CubeIoHandler.cpp:562
RawCubeChunk.h
Isis::CubeBsqHandler::updateLabels
void updateLabels(Pvl &labels)
Function to update the labels with a Pvl object.
Definition: CubeBsqHandler.cpp:68
Isis::RawCubeChunk::getByteCount
int getByteCount() const
Definition: RawCubeChunk.cpp:154
Isis::CubeBsqHandler::writeRaw
virtual void writeRaw(const RawCubeChunk &chunkToWrite)
This needs to write the chunkToWrite directly to disk with no modifications to the data itself.
Definition: CubeBsqHandler.cpp:100
Isis::CubeIoHandler::lineCount
int lineCount() const
Definition: CubeIoHandler.cpp:571
Pvl.h
Isis::CubeIoHandler::getDataStartByte
BigInt getDataStartByte() const
Definition: CubeIoHandler.cpp:551
_FILEINFO_
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
Isis::CubeIoHandler
Handles converting buffers to and from disk.
Definition: CubeIoHandler.h:109
Isis::BigInt
long long int BigInt
Big int.
Definition: Constants.h:49
Isis::PvlObject::findObject
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
Isis::CubeIoHandler::getChunkIndex
int getChunkIndex(const RawCubeChunk &) const
Given a chunk, what's its index in the file.
Definition: CubeIoHandler.cpp:530
Isis::IException
Isis exception class.
Definition: IException.h:91
Isis::RawCubeChunk::setRawData
void setRawData(QByteArray rawData)
Sets the chunk's raw data.
Definition: RawCubeChunk.cpp:101
IException.h
std
Namespace for the standard library.
Isis::PvlContainer::Replace
@ Replace
Definition: PvlContainer.h:95
PvlKeyword.h
Isis::CubeBsqHandler::readRaw
virtual void readRaw(RawCubeChunk &chunkToFill)
This needs to populate the chunkToFill with unswapped raw bytes from the disk.
Definition: CubeBsqHandler.cpp:75
Isis::CubeIoHandler::clearCache
void clearCache(bool blockForWriteCache=true) const
Free all cube chunks (cached cube data) from memory and write them to disk.
Definition: CubeIoHandler.cpp:383
PvlObject.h
Isis::CubeBsqHandler::CubeBsqHandler
CubeBsqHandler(QFile *dataFile, const QList< int > *virtualBandList, const Pvl &label, bool alreadyOnDisk)
Construct a BSQ IO handler.
Definition: CubeBsqHandler.cpp:34
Isis::IString
Adds specific functionality to C++ strings.
Definition: IString.h:165
Isis::CubeBsqHandler
IO Handler for Isis Cubes using the BSQ format.
Definition: CubeBsqHandler.h:41
CubeBsqHandler.h
Isis::CubeIoHandler::setChunkSizes
void setChunkSizes(int numSamples, int numLines, int numBands)
This should be called once from the child constructor.
Definition: CubeIoHandler.cpp:621
CubeIoHandler.h
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::CubeBsqHandler::~CubeBsqHandler
~CubeBsqHandler()
The destructor writes all cached data to disk.
Definition: CubeBsqHandler.cpp:58