Class OpenVDS::VolumeDataPageAccessor

class VolumeDataPageAccessor

Public Types

enum AccessMode

Values:

enumerator AccessMode_ReadOnly

The volume data page accessor will only be used for reading.

enumerator AccessMode_ReadWrite

The volume data page accessor will be used for reading and writing (can only be used with LOD 0, the other LODs will be automatically updated)

enumerator AccessMode_Create

The volume data page accessor will be used to write new data, overwriting any existing data (can only be used with LOD 0, the other LODs will be automatically created)

enumerator AccessMode_CreateWithoutLODGeneration

The volume data page accessor will be used to write new data, overwriting any existing data (each LOD has to be created separately)

enumerator AccessMode_ReadWriteWithoutLODGeneration

The volume data page accessor will be used used for reading and writing (each LOD has to be created separately)

Public Functions

virtual VolumeDataLayout const *GetLayout() const = 0
virtual int GetLOD() const = 0
virtual int GetChannelIndex() const = 0
virtual VolumeDataChannelDescriptor GetChannelDescriptor() const = 0
virtual void GetNumSamples(int (&numSamples)[Dimensionality_Max]) const = 0
virtual int64_t GetChunkCount() const = 0
virtual void GetChunkMinMax(int64_t chunk, int (&min)[Dimensionality_Max], int (&max)[Dimensionality_Max]) const = 0
virtual void GetChunkMinMaxExcludingMargin(int64_t chunk, int (&minExcludingMargin)[Dimensionality_Max], int (&maxExcludingMargin)[Dimensionality_Max]) const = 0
virtual uint64_t GetChunkVolumeDataHash(int64_t chunkIndex) const = 0

Get the volume data hash for the given chunk index. The value returned may be tested using the methods VolumeDataHash_IsDefined, VolumeDataHash_IsNoValue, and VolumeDataHash_IsConstant defined in VolumeData.h.

Parameters:

chunkIndex – The chunk index to get the volume data hash for.

Returns:

The volume data hash for the chunk.

virtual int64_t GetChunkIndex(const int (&position)[Dimensionality_Max]) const = 0
virtual int64_t GetMappedChunkIndex(int64_t primaryChannelChunkIndex) const = 0

Get the chunk index for this VolumeDataPageAccessor corresponding to the given chunk index in the primary channel. Because some channels can have mappings (e.g. one value per trace), the number of chunks can be less than in the primary channel and we need to have a mapping to figure out the chunk index in each channel that is produced together.

Parameters:

primaryChannelChunkIndex – The index of the chunk in the primary channel (channel 0) that we want to map to a chunk index for this VolumeDataPageAccessor.

Returns:

The chunk index for this VolumeDataPageAccessor corresponding to the given chunk index in the primary channel.

virtual int64_t GetPrimaryChannelChunkIndex(int64_t chunkIndex) const = 0

Get the primary channel chunk index corresponding to the given chunk index of this VolumeDataPageAccessor. In order to avoid creating duplicates requests when a channel is mapped, we need to know which primary channel chunk index is representative of a particular mapped chunk index.

Parameters:

chunkIndex – The chunk index for this VolumeDataPageAccessor that we want the representative primary channel chunk index of.

Returns:

The primary channel chunk index corresponding to the given chunk index for this VolumeDataPageAccessor.

virtual int64_t GetSuperChunkCount() const = 0

Get the number of super-chunks for this VolumeDataPageAccessor. Each super-chunk is an overlapping block of chunks from the remap source of this VolumeDataPageAccessor and the chunks in this VolumeDataPageAccessor. In order to produce the chunks as efficiently as possible (if there are more chunks than super-chunks), any code that iterates over all the chunks of a page accessor should iterate over the super-chunks and then over the chunks within each super-chunk.

Returns:

The number of super-chunks for this VolumeDataPageAccessor.

inline std::vector<int64_t> GetChunkIndicesInSuperChunk(int64_t superChunkIndex) const

Get the list of chunks in the given super-chunk. Each super-chunk is an overlapping block of chunks from the remap source of this VolumeDataPageAccessor and the chunks in this VolumeDataPageAccessor. In order to produce the chunks as efficiently as possible (if there are more chunks than super-chunks), any code that iterates over all the chunks of a page accessor should iterate over the super-chunks and then over the chunks within each super-chunk.

Parameters:

superChunkIndex – The super-chunk index for this VolumeDataPageAccessor that we want the list of chunks in.

Returns:

The list of chunks in the super-chunk

virtual int AddReference() = 0
virtual int RemoveReference() = 0
virtual int GetMaxPages() = 0
virtual void SetMaxPages(int maxPages) = 0
virtual VolumeDataPage *CreatePage(int64_t chunkIndex) = 0
virtual void CopyPage(int64_t chunkIndex, VolumeDataPageAccessor const &source) = 0

Copy a page of data from another VolumeDataPageAccessor with a compatible layout. This method is not blocking so if you want to access the copied data you need to call ReadPage which will block until the copy is done and return the copied data.

Parameters:
virtual VolumeDataPage *ReadPage(int64_t chunkIndex) = 0
virtual VolumeDataPage *ReadPageAtPosition(const int (&position)[Dimensionality_Max]) = 0
virtual void Commit() = 0