VoxelBlur
Depth-of-field volume rendering
 All Classes Files Functions Variables Enumerations Enumerator
Public Member Functions | Private Member Functions | List of all members
VolumeLoader Class Reference

Class for loading volume meta data (VolumeMetaData) as well as the raw volume data itself. More...

#include <volumeloader.h>

Inheritance diagram for VolumeLoader:
Inheritance graph
[legend]
Collaboration diagram for VolumeLoader:
Collaboration graph
[legend]

Public Member Functions

 VolumeLoader (QObject *parent=nullptr)
 
bool getMetadata (const QFile &metadataFile, VolumeMetaData &metadata) const
 Reads the metadata of a file. More...
 
QByteArray readVolume (const VolumeMetaData &d) const
 Reads the volume represented by this metadata. More...
 

Private Member Functions

bool readGZippedVolume (QFile &src, QByteArray &dest) const
 

Detailed Description

Class for loading volume meta data (VolumeMetaData) as well as the raw volume data itself.

This uses a simple custom format for metadata, which is built on the Qt .ini file functionality provided by the QSettings class. Look at the example volumes to see the format, it is pretty straightforward. The loader supports reading gzipped volumes, through the gzip-library provided by Qt.

Member Function Documentation

bool VolumeLoader::getMetadata ( const QFile &  metadataFile,
VolumeMetaData metadata 
) const

Reads the metadata of a file.

Parameters
metadataFileThe file which contains the metadata.
metadataThe structure in which to store the return value
Returns
true if loading ok, false if error

Here is the caller graph for this function:

QByteArray VolumeLoader::readVolume ( const VolumeMetaData d) const

Reads the volume represented by this metadata.

Can handle gzipped data files.

Returns
a byte array of the volume data, or an empty one on error

Here is the caller graph for this function:


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