File failed to load: https://isis.astrogeology.usgs.gov/dev/Object/assets/jax/output/NativeMML/config.js
Isis Developer Reference
Isis::GdalIoHandler Class Reference

Handles converting buffers to and from disk. More...

#include <GdalIoHandler.h>

Inheritance diagram for Isis::GdalIoHandler:
Inheritance graph
Collaboration diagram for Isis::GdalIoHandler:
Collaboration graph

Public Member Functions

 GdalIoHandler (QString &dataFilePath, const QList< int > *virtualBandList, GDALDataType pixelType=GDT_Float64, GDALAccess eAccess=GA_ReadOnly)
 
 GdalIoHandler (GDALDataset *geodataSet, const QList< int > *virtualBandList, GDALDataType pixelType=GDT_Float64)
 
void init ()
 
virtual ~GdalIoHandler ()
 
virtual void read (Buffer &bufferToFill) const
 
virtual void write (const Buffer &bufferToWrite)
 
virtual BigInt getDataSize () const
 
virtual void updateLabels (Pvl &labels)
 Function to update the labels with a Pvl object.
 
virtual void clearCache (bool blockForWriteCache=false)
 
virtual void addCachingAlgorithm (CubeCachingAlgorithm *algorithm)
 
virtual void clearCache (bool blockForWriteCache=true) const
 
void setVirtualBands (const QList< int > *virtualBandList)
 This changes the virtual band list.
 
QMutex * dataFileMutex ()
 Get the mutex that this IO handler is using around I/Os on the given data file.
 

Protected Attributes

QMutex * m_writeThreadMutex
 This enables us to block while the write thread is working.
 
QList< int > * m_virtualBands
 Converts from virtual band to physical band.
 

Detailed Description

Handles converting buffers to and from disk.

This class handles converting buffers to and from disk. This class holds the cube chunks in memory and is capable of reading and writing them. It asks the caching algorithms to recommend cube chunks to not keep in memory. Children need to call setChunkSizes() in their constructor.

This class handles all of the virtual band conversions. This class also guarantees that unwritten cube data ends up read and written as NULLs. The default caching algorithm is a RegionalCachingAlgorithm.

Author
2024-04-30 Adam Paquette

Constructor & Destructor Documentation

◆ GdalIoHandler() [1/2]

Isis::GdalIoHandler::GdalIoHandler ( QString & dataFilePath,
const QList< int > * virtualBandList,
GDALDataType pixelType = GDT_Float64,
GDALAccess eAccess = GA_ReadOnly )

◆ GdalIoHandler() [2/2]

Isis::GdalIoHandler::GdalIoHandler ( GDALDataset * geodataSet,
const QList< int > * virtualBandList,
GDALDataType pixelType = GDT_Float64 )

◆ ~GdalIoHandler()

Isis::GdalIoHandler::~GdalIoHandler ( )
virtual

References clearCache().

Member Function Documentation

◆ addCachingAlgorithm()

void Isis::ImageIoHandler::addCachingAlgorithm ( CubeCachingAlgorithm * algorithm)
virtualinherited

Reimplemented in Isis::CubeIoHandler.

◆ clearCache() [1/2]

virtual void Isis::GdalIoHandler::clearCache ( bool blockForWriteCache = false)
inlinevirtual

Referenced by ~GdalIoHandler().

◆ clearCache() [2/2]

void Isis::ImageIoHandler::clearCache ( bool blockForWriteCache = true) const
virtualinherited

Reimplemented in Isis::CubeIoHandler.

◆ dataFileMutex()

QMutex * Isis::ImageIoHandler::dataFileMutex ( )
inherited

Get the mutex that this IO handler is using around I/Os on the given data file.

A lock should be acquired before doing any reads/writes on the data file externally.

Returns
A mutex that can guarantee exclusive access to the data file

References m_writeThreadMutex.

◆ getDataSize()

BigInt Isis::GdalIoHandler::getDataSize ( ) const
virtual

Implements Isis::ImageIoHandler.

◆ init()

void Isis::GdalIoHandler::init ( )

References Isis::NULL8.

Referenced by GdalIoHandler(), and GdalIoHandler().

◆ read()

◆ setVirtualBands()

void Isis::ImageIoHandler::setVirtualBands ( const QList< int > * virtualBandList)
inherited

This changes the virtual band list.

Parameters
virtualBandListA list where the indices are the vbands and the values are the physical bands. The values are 1-based. This can be specified as NULL, in which case the vbands are the physical bands. The virtual band list is copied (the pointer provided isn't remembered).

References m_virtualBands.

Referenced by ImageIoHandler().

◆ updateLabels()

void Isis::GdalIoHandler::updateLabels ( Pvl & labels)
virtual

Function to update the labels with a Pvl object.

Parameters
labelsPvl object to update with

Implements Isis::ImageIoHandler.

References Isis::PvlContainer::addKeyword(), Isis::PvlObject::findObject(), and Isis::PvlContainer::Replace.

◆ write()

Member Data Documentation

◆ m_virtualBands

QList<int>* Isis::ImageIoHandler::m_virtualBands
protectedinherited

◆ m_writeThreadMutex

QMutex* Isis::ImageIoHandler::m_writeThreadMutex
protectedinherited

The documentation for this class was generated from the following files: